There was an error while loading. Please reload this page.
1 parent 193857d commit e9a4600Copy full SHA for e9a4600
2025/Day09/Solution.cs
@@ -21,6 +21,10 @@ select Area(r)
21
public object PartTwo(string input) {
22
var points = Parse(input);
23
var segments = Boundary(points).ToArray();
24
+ // AabbCollision enables rectangles inside or outside the
25
+ // shape, but the input is set up in a way that big rectangles
26
+ // are all inside, so this loop will find the correct one for actual
27
+ // problems.
28
return (
29
from r in RectanglesOrderedByArea(points)
30
where segments.All(s => !AabbCollision(r, s))
0 commit comments