Source: Day 3: Mull It Over
Full solution for today (spoilers!).
Part 1
Given a string containing (among other gibberish) commands of the form
mul({A}, {B})where{A}and{B}are integers, calculate the sum ofA*Bs.
Full solution for today (spoilers!).
Given a string containing (among other gibberish) commands of the form
mul({A}, {B})where{A}and{B}are integers, calculate the sum ofA*Bs.
Full solution for today (spoilers!).
Count how many given lists of numbers are
safe:
- Sorted (either ascending or descending)
- Strictly increasing/decreasing (no duplicate values)
- No increase/decrease is by more than 3
Full solution for today (spoilers!).
Given two lists of numbers arranged in columns in a file, find the sum of differences (in sorted order).
Let’s do this (Advent of Code) thing again!
I’m sticking with Rust again. I still use Python when I need to hammer out something quickly, but if I want to do something correctly (and especially if I want it to be fast), you can’t beat Rust.
Let’s see how it goes!
Full solutions will once again be posted to GitHub (including previous years and possibly some I haven’t written up yet): jpverkamp/advent-of-code
A quick follow up to Advent of Code 2023: testing and timing.
It’s been bothering me a bit that I haven’t had a generic way to run tests and timing on every problem as I’m going.
So let’s fix it!
Full solution for today (spoilers!)
Given an undirected graph, find 3 edges that split the graph into two connected components. Return the product of the component’s sizes.
Full solution for today (spoilers!)
Given a set of 3D vectors (origin + velocity), count how many times the vectors would intersect. Ignore the Z-coordinate for this part; the collisions do not have to be at the same time.
Full solution for today (spoilers!)
Find the longest non-overlapping path through a maze with walls (
#) and one way paths (^v<>).
Full solution for today (spoilers!)
Given a series of 3D blocks, allow them to fall until the simulation is stable. Any cube of a block is sufficient to support another block, ignore rotations etc.
How many blocks are not the sole supporter for any other block?
Full solution for today (spoilers!)
Given a(n infinite) grid of walls
#, count how many points can be reached by exactly 64 steps from a starting point.