github
264 of 394 new or added lines in 23 files covered. (67.01%)
7 existing lines in 4 files now uncovered.2606 of 3031 relevant lines covered (85.98%)
17052.76 hits per line
1 |
package utils
|
|
2 |
|
|
NEW
|
func Max[T any](arr []T, f func(T) int) int { |
× |
NEW
|
result := 0
|
× |
NEW
|
for _, el := range arr { |
× |
NEW
|
v := f(el) |
× |
NEW
|
if v > result {
|
× |
NEW
|
result = v |
× |
NEW
|
} |
× |
10 |
} |
|
NEW
|
return result
|
× |
12 |
} |