Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Add day 6 solutions. Both, naive and more elaborate. | Andreas Grois | 2021-12-11 | 1 | -0/+121 |
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. |