Heaps and greedyIntro
The Programming Masterclass · Act 2
Ten thousand scores. Print the top five.
The obvious move is to sort everything and take the first five. It works. It also sorts nine thousand nine hundred and ninety five numbers you did not need in order, which is a lot of work for five answers.
Quick, honest: how does this feel right now?