How do I find the median of numbers in linear time using heaps?

Posted by eSKay on Stack Overflow See other posts from Stack Overflow or by eSKay
Published on 2010-04-05T17:38:19Z Indexed on 2010/04/05 17:43 UTC
Read the original article Hit count: 224

Filed under:
|
|
|

Wikipedia says:

Selection algorithms: Finding the min, max, both the min and max, median, or even the k-th largest element can be done in linear time using heaps.

All it says is that it can be done, not how.

Can you give me some start on how this can be done using heaps?

© Stack Overflow or respective owner

Related posts about heap

Related posts about algorithm