# Advent of Code 2023 - Testing and Timing

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!

# AoC 2023 Day 25: Graph Splitinator

Full solution for today (spoilers!)

## Part 1

Given an undirected graph, find 3 edges that split the graph into two connected components. Return the product of the component’s sizes.

# AoC 2023 Day 24: Collisionator

## Source: Day 24: Never Tell Me The Odds

Full solution for today (spoilers!)

## Part 1

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.

# AoC 2023 Day 23: Looong Mazinator

## Source: Day 23: A Long Walk

Full solution for today (spoilers!)

## Part 1

Find the longest non-overlapping path through a maze with walls (#) and one way paths (^v<>).

# AoC 2023 Day 22: Block Dropinator

## Source: Day 22: Sand Slabs

Full solution for today (spoilers!)

## Part 1

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?

# AoC 2023 Day 21: Step Step Stepinator

## Source: Day 21: Step Counter

Full solution for today (spoilers!)

## Part 1

Given a(n infinite) grid of walls #, count how many points can be reached by exactly 64 steps from a starting point.

# AoC 2023 Day 20: Flip-Flopinator

## Source: Day 20: Pulse Propagation

Full solution for today (spoilers!)

## Part 1

Simulate a virtual circuit with high and low pulses and four kinds of chips:

• Broadcast - Re-transmit all pulses
• Flip-flops - On a low pulse, toggle internal state; if it was on, send high; otherwise send low
• Conjunction - Remember input from each attached module; if all inputs were high, send a low, otherwise send high
• Output - Do nothing; just receive pulses

Count the product of low and high pulses sent after 1000 low inputs to broadcaster.

# AoC 2023 Day 19: Assembly Lininator

## Source: Day 19: Aplenty

Full solution for today (spoilers!)

## Part 1

You are given a series of parts with 4 ratings as such:

{x=787,m=2655,a=1222,s=2876}

In addition, you are given a series of rules describing a graph as such:

px{a<2006:qkq,m>2090:A,rfg}

In this example, if you are at the node px, if a < 2006, move to qkq. Otherwise, if m > 2090 move to A. If no other case matches, the last defaults to rfg.

A and R are special cases for accept and reject.

Calculate the sum of sum of all four ratings for all nodes that end at Accept.

# AoC 2023 Day 18: Flood Fillinator

## Source: Day 18: Lavaduct Lagoon

Full solution for today (spoilers!)

## Part 1

Given a sequence of direction + distance that draws a polygon, calculate the area.

# AoC 2023 Day 17: A-Starinator

## Source: Day 17: Clumsy Crucible

Full solution for today (spoilers!)

## Part 1

Given a grid of costs, find the shortest path from top left to bottom right. You may not double back or go straight more than 3 steps in a row.