+ 1

How to fill in array before sorting while keeping descending order?

Anyone knows how to fill in random number into array while keeping their descending order? Can not fill in array then sorting.

19th Nov 2018, 5:50 AM
Jimmy Chen
Jimmy Chen  - avatar
1 Respuesta
+ 4
"before sorting while keeping descending" Somehow `keeping descending` eliminates `before sorting` since if you fill in the array in a descending/ascending manner, then there's no need to sort them, anyway!
19th Nov 2018, 6:07 AM
Babak
Babak - avatar