Skip to content

Commit 62fa345

Browse files
committed
add min constant
1 parent 4de7ff8 commit 62fa345

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

cmd/fund/doubling/main.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,17 @@ func main() {
2626
}
2727
}
2828

29-
const maxInteger = 1000000
29+
const (
30+
min = -1000000
31+
max = 1000000
32+
)
3033

3134
// Returns the amount of time to call ThreeSumCount() with n random
3235
// 6-digit integers
3336
func timeTrial(n int) float64 {
3437
a := make([]int, n)
3538
for i := 0; i < n; i++ {
36-
a[i] = rand.UniformIntRange(-maxInteger, maxInteger)
39+
a[i] = rand.UniformIntRange(min, max)
3740
}
3841
timer := testutil.NewStopwatch()
3942

0 commit comments

Comments
 (0)