Sponsored
Use these hints if you're stuck. Try solving on your own first.
How many maximum rotations will be needed?
The array will be rotated for a max of N times, so try all possibilities as N = 1000.
Solve with full IDE support and test cases