From e570358fa71f5a94d456780aae4a529661046785 Mon Sep 17 00:00:00 2001 From: Jan-Bulthuis Date: Sat, 21 Dec 2024 17:43:40 +0100 Subject: [PATCH] day21 working but not fast enough for part 2 --- aoc_2024/src/day21.rs | 256 ++++++++++++++++++++++++++++-------------- 1 file changed, 173 insertions(+), 83 deletions(-) diff --git a/aoc_2024/src/day21.rs b/aoc_2024/src/day21.rs index cbed375..55b37f2 100644 --- a/aoc_2024/src/day21.rs +++ b/aoc_2024/src/day21.rs @@ -1,6 +1,44 @@ -use aoc_runner_derive::{aoc, aoc_generator}; +use std::iter::once; -#[derive(Debug, Clone, Copy, PartialEq, Eq)] +use aoc_runner_derive::{aoc, aoc_generator}; +use hashbrown::{hash_map::Entry, HashMap}; + +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] +struct Path { + steps: usize, + path: [Option