stl_algor.h implementations:

  swap, reverse, rotate(forwardIterator and bidirectionalIterator),
   next_permutations in C++
  swap, reverse, rotate in java