An algorithm is a method to process items contained in a container. However, algorithms in the STL are written to only depend on iterators rather than containers. This means that the same algorithm can be applied to iterators that are associated with different types of containers.
Basic algorithms offered by the STL include searching, sorting, finding the minimum, maximum, copying, reversing, counting, and shuffling.