Array Rotation Algorithms: Multiple Approaches to Shift Elements Right
Given an array, shift its elements to the right by k positions, where k is a non-negative number. Example 1: Input: [1,2,3,4,5,6,7] and k = 3 Output: [5,6,7,1,2,3,4] Explenation: Right rotation by 1 step: [7,1,2,3,4,5,6] Right rotation by 2 steps: [6,7,1,2,3,4,5] Right rotasion by 3 steps: [5,6,7,1,...