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

Advent of Code Day 3 - Rucksack Reorganization

Question We are going into the jungle! We put Legolas in charge of packing the supplies for our journey but it seems like his packing abilities are nothing like his bow-aiming skills and he kind of sucks at packing… We do however have a manifest of the items in each rucksack, that list looks as follows 1 2 3 4 5 6 vJrwpWtwJgWrhcsFMMfFFhFp jqHRNqRjqzjGDLGLrsFMfFZSrLrFZsSL PmmdzqPrVvPwwTWBwg wMqvLMZHhHMvwLHjbvcjnnSBnvTQFn ttgJtRGJQctTZtZT CrZsJsPPZsGzwwsLwLmpwMDw Each line represents one rucksack and each half of the line represents a compartment inside a rucksack....

December 4, 2022 · 6 min · 1068 words · Gal Elmalah

Advent of Code Day 2 - Rock Paper Scissors 🪨🧻✂

Question The Elves begin to set up camp on the beach. To decide whose tent gets to be closest to the snack storage, a giant Rock Paper Scissors tournament is already in progress. God the question’s description is always pure gold…now let’s jump right in. We are given a string, our “strategy guide” that represents a rock, paper, scissors turn decision. The string is divided into two columns, the first represents the first player’s decision and the second ours....

December 2, 2022 · 5 min · 1028 words · Gal Elmalah

Advent of Code Day 1 - Calorie Counting

The moment we have all been waiting for, December first. The end of the year is upon us and so those Advent of Code! To those of you who don’t know, AoC is a yearly programming competition where we try to help Santa do some funky sh**. The competition itself is speed and time based, you can read more about it here. Question Part 1 We are given a list of numbers where each consecutive block of numbers represents the calories an elf is carrying with him....

December 2, 2022 · 4 min · 650 words · Gal Elmalah