Advent of Code Day 12 - Hill Climbing Algorithm

Question We are stuck at a river between two mountains, our communication device can’t get a decent signal but don’t worry THIS IS FINE!! we can get through this if we only find a high enough place to get a signal out cool cool cool, no doubt no doubt no doubt stay optimistic, and don’t panic!!! The one thing going for us at the moment is that we have a height map from our device, we just need to get to the heighst point and send a distress signal...

December 14, 2022 · 11 min · 2163 words · Gal Elmalah

Advent of Code Day 10 - Cathode-Ray Tube

Question Crap seems like our rope physics knowledge from yesterday didn’t help and we wound up in the river… The elves are nowhere to be found and our communication system is spitting out weird signals and noise Luckily we can probably get this device up and running in no time we just need to make a drop-in replacement for the device’s video system. To do that we need to decode the instructions from the CPU and the register value first...

December 13, 2022 · 6 min · 1066 words · Gal Elmalah

Advent of Code Day 9 - Rope Bridge

Question AkA doing weird rope physics! You come across an old rope bridge and you are not sure it can hold your fat a** so you decide to model some rope physics to distract yourself (like that’s going to help…) Directly from AoC Consider a rope with a knot at each end; these knots mark the head and the tail of the rope. If the head moves far enough away from the tail, the tail is pulled toward the head....

December 10, 2022 · 5 min · 905 words · Gal Elmalah

Advent of Code Day 8 - Treetop Tree House

Question The elves come to you with a problem, they want to build a tree house but they want to make sure that they have enough cover. We are given a map of the forest with a number representing each tree’s height. 1 2 3 4 5 30373 25512 65332 33549 35390 Parsing We care about the location of each tree and its height. All of the above is available to us if we parse our map into a matrix [][]int...

December 8, 2022 · 5 min · 1045 words · Gal Elmalah