I want to sort an array and find the index of each element in the sorted order. So for instance if I run this on the array:
[3,2,4]
I'd get:
[1,0,2]
Is there an easy way to do this in Java?
I want to sort an array and find the index of each element in the sorted order. So for instance if I run this on the array:
[3,2,4]
I'd get:
[1,0,2]
Is there an easy way to do this in Java?