MCPcopy Create free account
hub / github.com/0xAX/go-algorithms / main

Function main

numerical/max_sub_array.go:25–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23}
24
25func main() {
26 array := []int{-3, -4, 7, 1, -2, 0, -5, 1, 0, 6, -5}
27 fmt.Println("Maximum subarray sum: ", maxSubarray(array))
28
29 array = []int{3, 4, -7, 2, 0, 0, -3, -1, 0, -5, 7}
30 fmt.Println("Maximum subarray sum: ", maxSubarray(array))
31}

Callers

nothing calls this directly

Calls 1

maxSubarrayFunction · 0.85

Tested by

no test coverage detected