Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.

Commit fa8634f

Browse files
committed
918 adding
1 parent 7c10a18 commit fa8634f

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
11
package problem0918
22

33
func maxSubarraySumCircular(A []int) int {
4+
size := len(A)
5+
res := -30001
6+
tmp := 0
47

8+
for i := 0; i < size; i++ {
9+
for j := i + 1; j < i+size; j++ {
10+
if tmp < 0 {
11+
tmp=
12+
}
13+
}
14+
}
515
return 0
616
}
17+
18+
func max(a, b int) int {
19+
if a > b {
20+
return a
21+
}
22+
return b
23+
}

0 commit comments

Comments
 (0)