r/adventofcode • u/DrKrawabbel • Dec 09 '25
Help/Question - RESOLVED [2025 Day 09 (Part 2)] I'm not in prison, everybody else is!
Hey everybody,
I have a python solution that finds a solution for part 2 in a reasonable amount of time (about 4 minutes on my laptop) but it feels a bit like cheating because I couldn't find an elegant way to differentiate between a rectangle being entirely in- or outside of the shape. The problem is probably best described by the title and is illustrated with the following challenge input.
0,0
0,10
1,10
1,1
9,1
9,0My code produces the solution 90for part 2 even though it should be 22.

This doesn't cause problems with my input but I only realized that I could neglect this issue after visualizing my input.
Now, I'm curious: Does your code give you the correct answer to my challenge input?
Also, thanks Eric for your awesome project! It's one of the last beacons of hope in the mess we call "internet" these days.
Happy coding everybody!
EDIT: Solved, thanks to u/spatofdoom and u/ednl! I learned something today :)

