Returns the largest number in a slice. O(n).
slice must not be empty.
pub fn max(comptime T: type, slice: []const T) T
pub fn max(comptime T: type, slice: []const T) T {
assert(slice.len > 0);
var best = slice[0];
for (slice[1..]) |item| {
best = @max(best, item);
}
return best;
}