For Part One I used a depth-first search which took too long for part two. Part Two I created an adjacency list of the junction points while keeping track of the distance to the adjacent nodes at the same time. Then depth-first search through the adjacency list.
- 0 Posts
- 6 Comments
Joined 3 years ago
Cake day: June 14th, 2023
You are not logged in. If you use a Fediverse account that is able to follow users, you can follow this user.
deleted by creator
Memories of Day 8. It took me too long to realize I forgot to remove the 1000 iteration limit for part two.
landreville@lemmy.worldto
Advent Of Code@programming.dev•☃️ - 2023 DAY 11 SOLUTIONS - ☃️
1·2 years agoMultiplied the manhattan distance by the number of empty space lines crossed.
Used Shoelace Algorithm to get the interior area and then Pick’s Theorem to get the number of interior points based on the area and the points along the boundary loop.
Took me way too long to realize I could simply add jokers to the count of the most common card in the hand.
Rust
Blunt force grid navigation https://gitlab.com/landreville/advent-of-code-2024/-/blob/main/src/bin/04.rs