Given an array of integers `elements` of size `n` and an integer `shifts`, implement a function to rotate the array by `shifts` positions to the right.
Explanation: Rotate the array [1,2,3,4,5] 2 steps to the right, resulting in [4,5,1,2,3].
Analyze constraints and compute optimal solutions step-by-step.
No dry run loaded.
🚀 Practice this problem
Run code, get AI hints & track streak