Problem 1086 · Easy

High Five

Keep each student’s five best scores in a small min-heap; the smallest kept score is the one a higher score replaces.

Open the interactive visualisation