AoC 2022 D1: Calorie Counting
| Problem statement | Source code | Tags: Brute force
Part 1
Yes, yes, I know that finding the th largest number in a list can be done in linear time with the Quickselect algorithm, but given that the input has fewer than 300 elves, I decided to just sort the list and pick the first element.
Part 2
The same function as above, just picking the first three elements instead of just the first. Again, if I used Quickselect, this would be instead of .