We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
I also thought the same. Even if the rotations are made subsequent we can have two pointers x and y take care of the start of new array after rotations and end of new array after rotations. Then we can print from x to y.(Only in case of multiple query)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Arrays: Left Rotation
You are viewing a single comment's thread. Return to all comments →
I also thought the same. Even if the rotations are made subsequent we can have two pointers x and y take care of the start of new array after rotations and end of new array after rotations. Then we can print from x to y.(Only in case of multiple query)