github
233 of 323 new or added lines in 21 files covered. (72.14%)
7 existing lines in 4 files now uncovered.2575 of 2960 relevant lines covered (86.99%)
17461.69 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 |
} |