arrays #

fn idx_max #

fn idx_max<T>(a []T) int

idx_max returns the index of the first maximum

fn idx_min #

fn idx_min<T>(a []T) int

idx_min returns the index of the first minimum

fn max #

fn max<T>(a []T) T

max returns the maximum

fn merge #

fn merge<T>(a []T, b []T) []T

merge two sorted arrays (ascending) and maintain sorted order

fn min #

fn min<T>(a []T) T

min returns the minimum

fn shuffle #

fn shuffle<T>(mut a []T, n int)

shuffle randomizes the first n items of an array in place (all if n=0)