Posts

Advent of code 2023 - Day 7: Camel Cards

2024-01-04
python

This year I try to record my attempt at solving the Advent of Code 2023 riddles. This is Day 7 - see https:adventofcode.com/2023/day/7 Part 1 # Lets first read the task: In Camel Cards, you get a list of hands, and your goal is to order them based on the strength of each hand. A hand consists of five cards labeled one of A, K, Q, J, T, 9, 8, 7, 6, 5, 4, 3, or 2. ...

Advent of code 2023 - Day 6: Wait For It

2024-01-04
python

This year I try to record my attempt at solving the Advent of Code 2023 riddles. This is Day 6 - see https:adventofcode.com/2023/day/6 Part 1 # Lets first read the task: You manage to sign up as a competitor in the boat races just in time. The organizer explains that it’s not really a traditional race - instead, you will get a fixed amount of time during which your boat has to travel as far as it can, and you win if your boat goes the farthest. ...

Advent of code 2023 - Day 5: If You Give A Seed A Fertilizer

2023-12-30
python

This year I try to record my attempt at solving the Advent of Code 2023 riddles. This is Day 5 - see https:adventofcode.com/2023/day/5 Update [2023-12-31 So]: subsitute get_generator() (own implementation) with range() (Python inbuilt) improve grid search so that it goes through all location ranges, still starting with the lowest range Part 1 # Lets first read the task: The almanac (your puzzle input) lists all of the seeds that need to be planted. ...

Advent of code 2023 - Day 4: Scratchcards

2023-12-19
python

This year I try to record my attempt at solving the Advent of Code 2023 riddles. This is Day 4 - see https:adventofcode.com/2023/day/4 Part 1 # Lets first read the task: The Elf leads you over to the pile of colorful cards. There, you discover dozens of scratchcards, all with their opaque covering already scratched off. Picking one up, it looks like each card has two lists of numbers separated by a vertical bar (|): a list of winning numbers and then a list of numbers you have. ...

Advent of code 2023 - Day 3: Gear Ratios

2023-12-18
python

This year I try to record my attempt at solving the Advent of Code 2023 riddles. This is Day 3 - see https:adventofcode.com/2023/day/3 Part 1 # Lets first read the task: The engine schematic (your puzzle input) consists of a visual representation of the engine. There are lots of numbers and symbols you don’t really understand, but apparently any number adjacent to a symbol, even diagonally, is a “part number” and should be included in your sum. ...

Advent of code 2023 - Day 2: Cube Conundrum

2023-12-11
python

This year I try to record my attempt at solving the Advent of Code 2023 riddles. This is Day 2 - see https:adventofcode.com/2023/day/2 Part 1 # Lets first read the task: As you walk, the Elf shows you a small bag and some cubes which are either red, green, or blue. Each time you play this game, he will hide a secret number of cubes of each color in the bag, and your goal is to figure out information about the number of cubes. ...

Advent of code 2023 - Day 1: Trebuchet?!

2023-12-10
python

This year I try to record my attempt at solving the Advent of Code 2023 riddles. This is Day 1 - see https:adventofcode.com/2023/day/1 Part 1 # Our first task is the following: The newly-improved calibration document consists of lines of text; each line originally contained a specific calibration value that the Elves now need to recover. On each line, the calibration value can be found by combining the first digit and the last digit (in that order) to form a single two-digit number. ...