We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d68f456 commit 2dcc295Copy full SHA for 2dcc295
1 file changed
2025/9/index.html
@@ -312,6 +312,10 @@ <h2 id="problem-name">Movie Theater</h2>
312
public object PartTwo(string input) {
313
var points = Parse(input);
314
var segments = Boundary(points).ToArray();
315
+ // AabbCollision enables rectangles inside or outside the
316
+ // shape, but the input is set up in a way that big rectangles
317
+ // are all inside, so this loop will find the correct one for actual
318
+ // problems.
319
return (
320
from r in RectanglesOrderedByArea(points)
321
where segments.All(s => !AabbCollision(r, s))
0 commit comments