code: function rotate(a, i, j, n) {
  
    (0, _.reverse)(a, i, j);
    (0, _.reverse)(a, i, i + n);
    (0, _.reverse)(a, i + n, j);
  }
docs: In place O(n).
  
  Rotate right version.
  See http://prakhar.me/articles/the-string-rotation-problem/.