Sort the array in reverse order
Integer [ ] input = Arrays . stream ( b ) . boxed ( ) . toArray ( Integer [ ] :: new ) ; Arrays . sort ( input , ( x , y ) -> y - x ) ; b = Arrays . stream ( input ) . mapToInt ( Integer :: intValue ) . toArray ( ) ;