Classic: reverse all, reverse first k, reverse rest. k %= n.
Input
7 3 1 2 3 4 5 6 7
Output
5 6 7 1 2 3 4
4 2 -1 -100 3 99
3 99 -1 -100