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 understand that. But in this question i was required just to print the rotated form so i did the same. If i was to use the array later on, it wouldn't have been tough to declare a new array and start storing in it using a counter variable. So i kept it simple here just to pass all the test cases :)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Left Rotation
You are viewing a single comment's thread. Return to all comments →
I understand that. But in this question i was required just to print the rotated form so i did the same. If i was to use the array later on, it wouldn't have been tough to declare a new array and start storing in it using a counter variable. So i kept it simple here just to pass all the test cases :)