cpp/algorithm/ranges/minmax element

@1@ Finds the smallest and largest elements in the range. @2@ Same as, but uses as the source range, as if using  as  and  as.

Return value
An object consisting of an iterator to the smallest element as the first element and an iterator to the greatest element as the second. Returns if the range is empty. If several elements are equivalent to the smallest element, the iterator to the first such element is returned. If several elements are equivalent to the largest element, the iterator to the last such element is returned.

Complexity
At most applications of the comparison and twice as many applications of the projection, where.