From 56203d63a0a48f5ba68321afc7f33331cf1bcc02 Mon Sep 17 00:00:00 2001 From: Gabriel Bizdoc Date: Wed, 24 Dec 2025 22:46:38 +0200 Subject: [PATCH] day 9 --- year25/day9/part2.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/year25/day9/part2.go b/year25/day9/part2.go index 71565c5..7a4d118 100644 --- a/year25/day9/part2.go +++ b/year25/day9/part2.go @@ -78,13 +78,12 @@ func Part2(ctx aoc.Context) (result int, err error) { func isP1InsideP2(p1, p2 []Vertex) bool { for _, rectangleVertex := range p1 { corner := rectangleVertex.Start // for each point of retangle - // check if corner is on vertex. if yes we are fine + // check if corner is on vertex // count vertices verticesPassed := 0 for _, v := range p2 { if isPointOnLine(corner, v) { - verticesPassed = 1 - break + return true } if v.Start.Col == v.End.Col { // is vertical if v.Start.Line <= corner.Line && corner.Line <= v.End.Line {