You are viewing a single comment's thread. Return to all comments →
Awesome solution! Make it a one liner by passing the length of the array into the sort method:
Arrays.sort(s, 0, n, Collections.reverseOrder(Comparator.comparing(BigDecimal::new)));
Seems like cookies are disabled on this browser, please enable them to open this website
Java BigDecimal
You are viewing a single comment's thread. Return to all comments →
Awesome solution! Make it a one liner by passing the length of the array into the sort method:
Arrays.sort(s, 0, n, Collections.reverseOrder(Comparator.comparing(BigDecimal::new)));