View on GitHub

advent-of-code-2024

Readable Advent of Code 2024 algorithms and solutions in C language

Day 13: Claw Contraption

Let $S$ be a set where each pair $(\mathbf{A},\mathbf{b})\in S$ represents a system of linear equations $\mathbf{A}\mathbf{x}=\mathbf{b}$ using the $n\times n$ coefficient matrix $\mathbf{A}$, solution vector $\mathbf{x}$, and constant vector $\mathbf{b}$.

Let $\mathbf{v}$ be a weight vector.

Part A

Algorithm:

Time complexity: $O(n^3)$.

Space complexity: $O(1)$.