Array rotation. Given an array of n elements, give a linear-time algorithm to rotate the string k positions. That is, if the array contains a0, a1, …, an-1, the rotated array is ak,k+1, …, an-1, a0, …, ak-1. Use at most a constant amount of extra memory. Hint: Reverse three subarrays.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here