From 965e704d39c757960c1c54b2d57fbce51bd4a48d Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Sun, 8 Dec 2024 21:46:44 +0000 Subject: [PATCH] no need to check outofbounds here --- day-08/internal/two/solve.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/day-08/internal/two/solve.go b/day-08/internal/two/solve.go index 1526554..3ab1650 100644 --- a/day-08/internal/two/solve.go +++ b/day-08/internal/two/solve.go @@ -29,7 +29,7 @@ func Solve(buf []byte) (int, error) { all := []coords{a.coords, b.coords} for _, coords := range calcAntiNodePos(a.coords, b.coords, graph, all) { - if !graph.isOutOfBounds(coords) && !graph.antinodes.contains(coords) { + if !graph.antinodes.contains(coords) { graph.antinodes.insert(coords) } }