Suppose I want an array that has the index of the sorted xCoordinates: sample input : [20, 10, 30, 40, 50] sample output : [1, 0, 2, 3, 4]
I tried: