The STL algorithms exist to offer functions that can operate on ranges and single elements in a way that is type-nonspecific. Each function that makes up the algorithms collection is designed to be used to iterate through a range, select from a range, modify a range, or provide miscellaneous single-element generic functions.
STL algorithms can be used with the template classes (vector, queue, list, and so on) or they can be used with built-in types that support ranges (arrays, for example). Some can also be used with individual elements based on user-defined classes, built-in types, or elements obtained from STL container classes.
This discussion classifies the STL algorithms into the following areas: