Tag Archive: priority queue

Median of numbers (part one take two): max-heap + min-heap = ♥

The first solution of this problem can be found here. The problem of finding the median value in a bounded array of items can be solved, again, by using a min heap and… Continue reading

Median of numbers (part one): max-heap + min-heap = ♥

Finding the median of an unsorted array of numbers is seen as a special case of the selection algorithm. There are at least three ways in which the problem can be solved: Quickselect, based… Continue reading

  • Archives

  • Advertisements