What is the difference between rotating an array to the right by k positions and cyclically shifting it, and how do you compute the effective k?
Rotating an array to the right by k positions means every element moves k places towards the end and the elements that fall off the end wrap around to the front. That is exactly a cyclic shift by k. The classic confusion is with a left rotation, where elements move towards the front instead, and with the in-place variant where no new array may be allocated.
Because the shift repeats every n positions, rotating by k is the same as rotating by k modulo n. Any k at least as large as the length reduces with a single modulo, and handling that explicitly is worth it because it is a common source of off-by-one errors, as is the case of k equal to zero.
There are three standard implementations. The first builds a new list by concatenating the last k elements with the first n minus k elements, which is O of n time and O of n extra space. The second uses the three reversal trick: reverse the whole array, reverse the first k elements, then reverse the rest, giving the same result in place with O of 1 extra space. The third rotates one step at a time, which is O of n times k and worth mentioning only to explain why it is the wrong choice.
The trade-off to name is space against clarity. The slicing version is one line and almost impossible to get wrong, which makes it the right choice for a small array or a quick script. The three reversal version is what you want when the array is large and the allocation matters, and it is the version interviewers like to see because it shows you can manipulate an array in place.