Skip to content

Latest commit

 

History

History
13 lines (7 loc) · 429 Bytes

solution.md

File metadata and controls

13 lines (7 loc) · 429 Bytes

Day 24 Solution

Part 1

Keep track of the current maximum, as well as the current Elf's sum as you go through the list. Everytime you see a newline, reset the current sum.

Part 2

Similar to part 1, but store the sums in an array everytime you see a newline. Sort the resulting array and take the 3 largest elements.

Thoughts

Leaderboard filled up pretty quickly, missed top 100 by 10-20 seconds for both parts.