From c916ccab4642b691fcd722ca1de2ede705ff82f7 Mon Sep 17 00:00:00 2001 From: Andreas Grois Date: Sat, 11 Dec 2021 21:12:24 +0100 Subject: 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. --- Cargo.toml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Cargo.toml') diff --git a/Cargo.toml b/Cargo.toml index 2938a76..1498d06 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,5 +9,7 @@ edition = "2021" aoc-runner = "0.3" aoc-runner-derive = "0.3" +boxed_array_ringbuffer = { path = '../boxed_array_ringbuffer', version = '*'} + [profile.dev] opt-level=3 -- cgit v1.2.3