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.
"A left rotation operation on an array of size n shifts each of the array's elements d unit to the left."
This isn't a correct solution. It's merely masking itself to be a solution. It's taking input and stuffing it pre-ordered into a new array. You should be doing a left rotation on an existing array.
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 →
"A left rotation operation on an array of size n shifts each of the array's elements d unit to the left."
This isn't a correct solution. It's merely masking itself to be a solution. It's taking input and stuffing it pre-ordered into a new array. You should be doing a left rotation on an existing array.