github.com/EndlessCheng/codeforces-go
(a []int)
| 2 | |
| 3 | // github.com/EndlessCheng/codeforces-go |
| 4 | func arraySign(a []int) int { |
| 5 | s := 1 |
| 6 | for _, v := range a { |
| 7 | if v == 0 { |
| 8 | return 0 |
| 9 | } |
| 10 | if v < 0 { |
| 11 | s *= -1 |
| 12 | } |
| 13 | } |
| 14 | return s |
| 15 | } |
nothing calls this directly
no outgoing calls
no test coverage detected