Java sort int[] base on another int[]

后端 未结 0 517
一整个雨季
一整个雨季 2020-12-30 03:08

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:

<
相关标签:
回答
  • 消灭零回复
提交回复
热议问题