Rotate Array Right

Arrays ยท medium

Implement `rotate(arr, k)` returning a new array rotated to the right by `k` positions. `k` may exceed the array length.

Learning resources

Loading...

Run your code to see results.