The std::rotate is a surprisingly useful, yet very simple algorithm.
The algorithm left-rotates the elements of the given range, so that the element under the iterator passed as the second argument ends up as the first element.
Compiler Explorer link: https://compiler-explorer.com/z/vs1e797f5