Sorting one array in the same order as another array

前端 未结 2 751
渐次进展
渐次进展 2021-01-13 04:38

I have two arrays. Let\'s say:

array = \"Dave\", \"Mike\", \"Joe\", \"Jason\", \"Kevin\"

and

IQ = 110, 145, 75, 122, 130
         


        
2条回答
  •  日久生厌
    2021-01-13 04:46

    Construct a 2d array with first row as names and second row as IQ Sort this array according to the IQ in O(nlogn)

提交回复
热议问题