You are viewing a single comment's thread. Return to all comments →
what if array size is 3 and it is rotated 4 times
basically n=3 and k=4 and I want value at index = 0
That is the same as if the array was rotated once. So, at index 0 we'll find the element formerly located at index 1.
peace of cake..