I need help understanding Day 10 part II
# advent-of-code
s
I need help understanding Day 10 part II
So, it's not very hard to search for pipes which are enclosed by the loop path from all four sides. But this confuses me
image.png
j
It's basically saying for tiles that are not part of the main loop, ignore what is on that tile.
s
But in this example, I created the path, and there's only title which is surrounded by the loop from all sides. But the correct answer is 10, not 1
Tile is marked yellow
Or perhaps I am misunderstood something
m
In Part 2, the task is to identify the count of "air" pieces or unconnected pipes that are located INSIDE the path. It's important to note that these pieces don't necessarily have to be entirely surrounded by the path on all four sides. They just need to be within the confines of the path. Hope this clarification helps!
s
Well, so in this example the tiles that are marked 0 are also in the main path. So, why they are not counted?
image.png
Not all of them, but the five highlighted leading zeros, and below it
m
the trick is to see what's considered inside the loop, you can access the Os from the bottom, therefore those are not inside the path, however, the Is are inside since if you want to reach the outside you would need to cross a pipe from the main path, so the expected solution for that input is 4, without counting any Os
s
Thanks a lot. I think I understood now. As a non-native English speaker, the problem's description confuses me sometimes.
👍 2
b
As a native English speaker, it also confused me for a while