jpages on Nostr: Advent of Code - Day 22 Part 1 : 04:03:29 (rank 4278) Part 2 : 05:56:03 (rank 4518) A ...
Advent of Code - Day 22
Part 1 : 04:03:29 (rank 4278)
Part 2 : 05:56:03 (rank 4518)
A very interesting simulation problem about the game of Jenga.
In Part 1, I was not sure which data structure was the most efficient and I spent too much time on this task (I changed the data structure twice !), but I ended with my best rank so far.
Part 2 was easier, as I only had to apply a BFS algorithm on the tree I had built earlier.
Part 1 runs in 55 ms and Part 2 in 70 ms.
#AdventOfCode
Part 1 : 04:03:29 (rank 4278)
Part 2 : 05:56:03 (rank 4518)
A very interesting simulation problem about the game of Jenga.
In Part 1, I was not sure which data structure was the most efficient and I spent too much time on this task (I changed the data structure twice !), but I ended with my best rank so far.
Part 2 was easier, as I only had to apply a BFS algorithm on the tree I had built earlier.
Part 1 runs in 55 ms and Part 2 in 70 ms.
#AdventOfCode