How to find median on unsorted matrix?

Revision en5, by MODDI, 2023-03-08 01:21:07

We have an N*N matrix, can we achieve better than transposing the matrix into an array, and then sorting it?

I did some online searching and found that quickselect eliminates the log factor, how can we extend quickselect to 2 dimensions?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en5 English MODDI 2023-03-08 01:21:07 2
en4 English MODDI 2023-03-08 01:20:50 0 (published)
en3 English MODDI 2023-03-08 01:20:42 130 (saved to drafts)
en2 English MODDI 2023-03-07 00:35:37 0 (published)
en1 English MODDI 2023-03-07 00:35:15 146 Initial revision (saved to drafts)