AOC2022/rust/1/README.me
Scramble 0e78baf6bc Fixed bug where it would ignore last elf.
Also did fmt, and forgot to separate the commits so now the diff is ugly.
2022-12-02 12:36:48 +00:00

6 lines
404 B
Plaintext

I just overwrote the first puzzle's solution with the second's, I'll have to be more organised in future days
First puzzle was just a single `let max: i32 = 0` instead of the `top` Vec, so same thing just a bit simpler
For the second part I keep the top 3 values and add a new one whenever it's at least greater than the smallest one, and keep those 3 values sorted so the smallest one is always first