The Median Maintenance Problem

From NovaOrdis Knowledge Base
Revision as of 22:24, 9 October 2021 by Ovidiu (talk | contribs) (→‎Overview)
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.