From 13c03884f1e0c8f44d5e88805c282925fe13e434 Mon Sep 17 00:00:00 2001 From: Pok Date: Wed, 5 Nov 2025 21:45:14 +0700 Subject: pwc346 solution in go - tiny revise to pre-allocate slice --- challenge-346/pokgopun/go/ch-2.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenge-346/pokgopun/go/ch-2.go b/challenge-346/pokgopun/go/ch-2.go index fd1973cdb8..3a643b15aa 100644 --- a/challenge-346/pokgopun/go/ch-2.go +++ b/challenge-346/pokgopun/go/ch-2.go @@ -76,7 +76,7 @@ func (sc SegmentCombo) process(n, l int, s []int, yield func([]int) bool) { func segCmb(n, l int) SegmentCombo { return func(yield func([]int) bool) { - new(SegmentCombo).process(n, l, []int{}, yield) + new(SegmentCombo).process(n, l, make([]int, 0, n), yield) } } -- cgit