【在 b***s 的大作中提到】 : the problem definition is not clear. How do you change from the 2-dimension : to the 1-dimension array? Column by column?
b*s
4 楼
still not clear, how is the 2d array got arranged in the first place? Random?
2-dimension
【在 s********l 的大作中提到】 : 将二维数组按照从大到小的顺序排列,得到1维。
b*e
5 楼
the straight-forward way i can think of is that you create a new array out[n,3], copy all the data from source to the first column, mark the (i,j) in the 2nd and 3rd column. Then do a sorting based on the first column.