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
Published at
2023-12-22 22:57:34Event JSON
{
"id": "b5f82c764bdd8669e44a8c425fd2a2c726f54ab8ecd188cda0b074330aa43e12",
"pubkey": "d8deeeee9fcf88be9fdb85da854869fa1855bd20d23f54599dcc9d4adb42f1d0",
"created_at": 1703285854,
"kind": 1,
"tags": [
[
"t",
"adventofcode"
]
],
"content": "Advent of Code - Day 22 \n\nPart 1 : 04:03:29 (rank 4278)\nPart 2 : 05:56:03 (rank 4518)\n\nA very interesting simulation problem about the game of Jenga.\n\nIn 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.\n\nPart 2 was easier, as I only had to apply a BFS algorithm on the tree I had built earlier.\n\nPart 1 runs in 55 ms and Part 2 in 70 ms.\n\n#AdventOfCode",
"sig": "d0da8ba66ad7f32571ca5742f78419a5bf835a22e4796df22c627f8e8e01465a204e5fcd09b10e61e370a8a88efaa56140c82b887247241b52bf3e83dd54bc0c"
}