The Median Maintenance Problem
Jump to navigation
Jump to search
Internal
Overview
The median maintenance problem is a canonical use case for a heap.
Problem
Give a sequence of numbers x1, x2, .... xn, report at each step the median number of those number seen so far.