diff --git a/day-23/internal/two/solve.go b/day-23/internal/two/solve.go index 89b543a..1e79699 100644 --- a/day-23/internal/two/solve.go +++ b/day-23/internal/two/solve.go @@ -39,7 +39,7 @@ func Solve(buf []byte) (string, error) { wg.Add(1) go func() { defer wg.Done() - next([]string{}, nodes, set.New(), cliquesChan, networks, &wg) + next([]string{}, nodes, set.New(), cliquesChan, networks) }() go func() { @@ -65,7 +65,6 @@ func next( P, X *set.Set, cliquesChan chan<- clique, networks map[string]*set.Set, - wg *sync.WaitGroup, ) { if P.Size() == 0 && X.Size() == 0 { cliquesChan <- clique{slices.Clone(R)} @@ -75,7 +74,7 @@ func next( for _, v := range P.List() { nextR := append(R, v) - next(nextR, P.Intersection(networks[v]), X.Intersection(networks[v]), cliquesChan, networks, wg) + next(nextR, P.Intersection(networks[v]), X.Intersection(networks[v]), cliquesChan, networks) P.Remove(v) X.Add(v)