Syntax:
#include <algorithm> void rotate( forward_iterator start, forward_iterator middle, forward_iterator end );
The rotate() algorithm moves the elements in the range [start,end) such that the middle element is now where start used to be, (middle+1) is now at (start+1), etc.
rotate() runs in linear time.
Related Topics: rotate_copy