aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorAndreas Grois <andi@grois.info>2021-12-11 21:12:24 +0100
committerAndreas Grois <andi@grois.info>2021-12-11 23:06:35 +0100
commitc916ccab4642b691fcd722ca1de2ede705ff82f7 (patch)
treee6cba6315316a0743708a1705154b435fd87d3d9 /src/lib.rs
parentebe8b96b80cf1c7ec4a81bc4a54aed382de20a47 (diff)
Add day 6 solutions. Both, naive and more elaborate.
The naive implementation uses simple ring buffers and scales linearly with the number of days needed. The matrix based implementation uses matrix multiplication (implemented in a brain-dead way inline here) and has the same scaling behaviour, however implementing it showed that the matrix is correct. The closed form is, well, a closed form based on the matrix based solution, but working in the matrix' Eigenspace.
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 66130bd..a558ff4 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -5,5 +5,6 @@ pub mod day2;
pub mod day3;
pub mod day4;
pub mod day5;
+pub mod day6;
aoc_lib!{ year = 2021 }