Loading page…
An exam portal needs the middle score as papers arrive. Two heaps, a max-heap for the lower half and a min-heap for the upper half, put the two middle values on top. The lecture covers the order and size rules, adding a value with one move across the cut, reading the median with a 64 bit sum, a percentile as a cut at a fixed rank, running totals, the two ends of a list, lazy deletion, the costs and the classic mistakes.
An online exam portal shows the median score while students hand in their papers.