View on GitHub

advent-of-code-2024

Readable Advent of Code 2024 algorithms and solutions in C language

Day 14: Restroom Redoubt

Let $L$ be a set of pairs $(\vec{s},\vec{v})$ where $\vec{s},\vec{v}$ are integer vectors $(x,y)$ for $x,y\in\mathbb{Z}$. Let $x^\ast,y^\ast\in\mathbb{N}$ be the boundaries and $t$ be the duration.

Part A

Let $S_0,\dots,S_3$ be sets of vectors.

Algorithm:

Time complexity: $O(\lvert L\rvert)$.

Space complexity: $O(1)$.