[perf] evaluateBonus can start from sidx - 1

This commit is contained in:
Junegunn Choi
2016-08-14 11:58:47 +09:00
parent d9c8a9a880
commit 41e916a511
3 changed files with 6 additions and 9 deletions

View File

@@ -10,14 +10,11 @@ import (
)
// Max returns the largest integer
func Max(first int, items ...int) int {
max := first
for _, item := range items {
if item > max {
max = item
}
func Max(first int, second int) int {
if first >= second {
return first
}
return max
return second
}
// Min returns the smallest integer