Title
s

Safi K

12/13/2023, 4:51 PM
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

Johannes Gätjen

12/13/2023, 4:54 PM
It's basically saying for tiles that are not part of the main loop, ignore what is on that tile.
s

Safi K

12/13/2023, 4:59 PM
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

Manuel Casariego

12/13/2023, 5:10 PM
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

Safi K

12/13/2023, 5:14 PM
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

Manuel Casariego

12/13/2023, 5:18 PM
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

Safi K

12/13/2023, 5:21 PM
Thanks a lot. I think I understood now. As a non-native English speaker, the problem's description confuses me sometimes.
👍 2
b

bj0

12/13/2023, 7:51 PM
As a native English speaker, it also confused me for a while
3 Views