Defined in header <algorithm> template< class ForwardIt >
void rotate( ForwardIt first, ForwardIt n_first, ForwardIt last ); (until C++11) template< class ForwardIt >
ForwardIt rotate( ForwardIt first, ForwardIt n_first, ForwardIt last ); (since C++11)
Performs a left rotation on a range of elements.
Specifically, std::rotate swaps the elements in the range [first, last) in such a way that the element n_first becomes the first element of the new range and