r**u 发帖数: 1567 | 1 Given a n*m matrix having numbers such that each row and each column sorted.
Now print the numbers in present in the matrix in sorted order..
ps: He gave me the hint as, we can rearrange the matrix.
Is it possible to do it better than k-way merge? |
t*****9 发帖数: 569 | 2 这个就是堆吧?
sorted.
【在 r**u 的大作中提到】 : Given a n*m matrix having numbers such that each row and each column sorted. : Now print the numbers in present in the matrix in sorted order.. : ps: He gave me the hint as, we can rearrange the matrix. : Is it possible to do it better than k-way merge?
|
r**u 发帖数: 1567 | 3 I see your point. Thx.
【在 t*****9 的大作中提到】 : 这个就是堆吧? : : sorted.
|
x****r 发帖数: 17 | |
r**u 发帖数: 1567 | 5 yes.
【在 x****r 的大作中提到】 : 行和列都是同时sorted的么?
|