fn indexOfMinMax(comptime T: type, slice: []const T) struct { index_min: usize, index_max: usize, }
[src]
Finds the indices of the smallest and largest number in a slice. O(n). Returns an anonymous struct with the fields index_min
and index_max
. slice
must not be empty.