9 8 7 6 5 4 3 2 1 0
0 1 2 3 4 5 6 7 8 9
1 5 6 8 9 7 3 4 2 0
9 8 6 5 1 7 3 4 2 0
why is the output coming out to be 9 8 6 5 1 7 3 4 2 0 instead of 1 5 6 8 9 7 3 4 2 0 ?
9 8 7 6 5 4 3 2 1 0
0 1 2 3 4 5 6 7 8 9
1 5 6 8 9 7 3 4 2 0
9 8 6 5 1 7 3 4 2 0
why is the output coming out to be 9 8 6 5 1 7 3 4 2 0 instead of 1 5 6 8 9 7 3 4 2 0 ?
u have used greater it means it will sort first five elements in the descending order
which i it doing perfectly and leaving the rest of the elements as it is
if u want ascending order, remove greater() and it will work fine
if your doubt is solved, please mark it as resolved