Advent of Code Day 7 - No Space Left On Device

Question This was a fun day! we finally got something challenging. We got a device from the elves when trying to update that device we got an error that notifies us that there isn’t enough memory on our device 1 2 $ system-update --please --pretty-please-with-sugar-on-top Error: No space left on the device To determine what’s going on we start exploring the device file system and record the output (our puzzle input) For example...

December 8, 2022 · 7 min · 1488 words · Gal Elmalah

Advent of Code Day 6 - Tuning Trouble

Question Finally, we move out of camp! As we start heading out of the camp one of the elves gives us a communication device, it will come as no surprise that we got the only malfunctioning device… The device receives streams of signals that are built from a list of chars, to fix our device we need to be able to find the start-of-packet marker. Part 1 We are told that the start of the packet is defined as a series of four different consecutive chars....

December 5, 2022 · 5 min · 877 words · Gal Elmalah

Advent of Code Day 5 - Supply Stacks

Question Welcome to day 5 of AoC, aka, annoying AF parsing day. We are crane operators! What do we want?! More stacks and crates! Anyhow, we are charged to execute a series of delicate manuvers using our insane crane skills Our input is given to us as follows 1 2 3 4 5 6 7 8 9 [D] [N] [C] [Z] [M] [P] 1 2 3 move 1 from 2 to 1 move 3 from 1 to 3 move 2 from 2 to 1 move 1 from 1 to 2 The first half represents the current state of stacks and crates....

December 5, 2022 · 5 min · 952 words · Gal Elmalah

Advent of Code Day 4 - Camp Cleanup

Question Seems like this time we are tasked with optimizing the elves' cleaning tasks! those elves can improve their lists… The cleaning tasks are assigned to each pair of elves, for example: 1 2 3 4 5 6 2-4,6-8 2-3,4-5 5-7,7-9 2-8,3-7 6-6,4-6 2-6,4-8 For the first few pairs, this list means: Within the first pair of Elves, the first Elf was assigned sections 2-4 (sections 2, 3, and 4), while the second Elf was assigned sections 6-8 (sections 6, 7, 8)....

December 4, 2022 · 4 min · 794 words · Gal Elmalah