Java BigDecimal

  • + 1 comment

    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)));