You are viewing a single comment's thread. Return to all comments →
Its easy man i cant figure out the last test case though !!
1.Input an array of size n
2.Input number of rotations as r
3. r=r%n -> it reduces the number of repeatative rotations thus decreasing the complexity of our code . suppose the size of the array is 3 and number of rotations is also 3 then our loop wont run it will simply print the same elements .