v0.0.625
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Failing after 1m31s

This commit is contained in:
2026-03-11 11:43:26 +01:00
parent 2054c04442
commit 44ec5e4804
4 changed files with 65 additions and 16 deletions

View File

@@ -631,3 +631,23 @@ func ArrShuffle[T any](arr []T) []T {
return arr
}
func ArrMax[T NumberConstraint](first T, arr []T) T {
res := first
for _, v := range arr {
if v > res {
res = v
}
}
return res
}
func ArrMin[T NumberConstraint](first T, arr []T) T {
res := first
for _, v := range arr {
if v < res {
res = v
}
}
return res
}