Skip to content

Commit 661e60b

Browse files
aQuaaQua
aQua
authored and
aQua
committed
611 accepted, 239ms
1 parent 25a7bce commit 661e60b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Algorithms/0611.valid-triangle-number/valid-triangle-number.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ func triangleNumber(a []int) int {
1414
for k := j + 1; k < n; k++ {
1515
if a[i]+a[j] > a[k] {
1616
res++
17+
} else {
18+
break
1719
}
1820
}
1921
}

0 commit comments

Comments
 (0)