logoalt Hacker News

ukokitoday at 1:22 AM1 replyview on HN

Only the median (or pair around the median) needs to be sorted, the other numbers can be unsorted :)


Replies

AdieuToLogictoday at 2:12 AM

How does one determine the median wherein "the other numbers can be unsorted"?

To wit, given the unordered set:

  [ 5, 1, 3 ]
How would "Only the median (or pair around the median) needs to be sorted" be satisfied?
show 1 reply