Point in polygon - Day 10 - Advent of Code
Vložit
- čas přidán 9. 12. 2023
- Join me to solve Day 10 of Advent of Code 2023 - The Pipe Maze - in Ruby!
In this coding challenge, we'll navigate a grid map of different pipe connections to:
Parse the input grid data
Find starting points and valid neighbors
Traverse around the pipe loop to map its path
Determine enclosed tiles inside the loop
Use raycasting logic to count wall intersections
Handle tricky cases like squeezed openings
The solution builds a search to map out the full pipe structure. We'll refine the directional rules and fix bugs in the graph traversal logic.
Mapping polygons and counting enclosed regions employs some novel techniques like raycasting and parity checks.
Advent of Code: adventofcode.com/
My Solutions: gist.github.com/cjavdev/d15a2...
Playlist • Advent of Code
#adventofcode #ruby - Jak na to + styl
I'm still here. When I read 2nd part two days ago it scared me. Than yesterday I had whole day full of work, but this evening I sat, figured out how to do it and I did it.
Way to stick with it!! Every time you conquer another part you’ll get more confident and more capable. Becoming a better version of yourself. 💪💪💪