rotate [C++ Reference]
Keywords: stl,algorithm,rotate
Date: 2009-10-09T01:37:55-0700

[[rotate]]
C++ Reference
Translations of this page?:

- en
- br-pt
- cn
- cz
- de
- es
- fr
- it
- jp
- nl
- pl
- ro
- ru
- sk
- tr
- tw

## rotate

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

Edit this page • Old revisions
• • • Login • Index • Recent changes • RSS • cc •