This is the introductory problem for the "fixed-size min-heap" pattern used in many top-k problems.
Enable JavaScript for the full StreamPrep guide.