Rotate a list to the right by k steps in place using O(1) extra space: [1,2,3,4,5,6,7] rotated by 3 is [5,6,7,1,2,3,4]. k may be larger than the length.
Use the three reversals trick: reverse everything, then reverse the first k and the remaining parts. Implement your own reverse(nums, i, j) helper.