The algorithm package defines min and max functions for three, four or five arguments. They have the same kind of interface as std::min(), which returns the minimum of two arguments, For example:
It also defines the ads::sign() function.
There are functions for sorting and ranking.
I have implementations of the is_sorted() functions. I implement them here to avoid dependence on the SGI extensions.
There are functions for skipping elements in a sequence.
The insertion_sort() functions are useful for sorting nearly sorted sequences.
The statistics functions compute the minimum, maximum and mean of a range of elements.
The areElementsUnique() functions determine if the unsorted elements in a range are unique.
The ads::Triplet class is analogous to std::pair. The ads::OrderedPair class is a pair in which the first element precedes the second.
There are functions to find the extreme element (minimum or maximum) in a sequence.