Algorithms and Iterators
The previous Exploration introduced vectors and iterators using std::sort to sort a vector of integers. This Exploration examines iterators in more depth and introduces generic algorithms, which perform useful operations on iterators.
The std::sort function is an example of a generic algorithm, so named because these functions implement common algorithms and operate generically. That is, they work for just about anything you can express as a sequence. Most of the standard algorithms are declared in the <algorithm> header, although the <numeric> header contains a few that are numerically oriented. ...