min_element, max_element, minmax_element, and tests