We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
//Write your code here
Arrays.sort( s, (as,bs) -> {BigDecimal bd = new BigDecimal(bs);
return bd.compareTo(new BigDecimal(as));} );
FAILED with...
Exception in thread "main" java.lang.NullPointerException
at java.math.BigDecimal.<init>(BigDecimal.java:806)
at Solution.lambda`$main$`0(Solution.java:17)
BECAUSE the provided code declared the array too large!
Java BigDecimal
You are viewing a single comment's thread. Return to all comments →
My Java 8 lambda solution...
FAILED with...
BECAUSE the provided code declared the array too large!
With the above fix, it now passes all TC's.