MCPcopy Create free account
hub / github.com/neetcode-gh/leetcode / sum

Function sum

go/0682-baseball-game.go:28–34  ·  view source on GitHub ↗
(nums []int)

Source from the content-addressed store, hash-verified

26}
27
28func sum(nums []int) int {
29 res := 0
30 for _, n := range nums {
31 res += n
32 }
33 return res
34}

Callers 2

calPointsFunction · 0.70
numOfSubarraysFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected