You are viewing a single comment's thread. Return to all comments →
sorry to bother..i'm having trouble calculating for these values.. array length=5, no._of rotations=7.
if i take i=0 i=(0+(5-7)%5); which is equal to -2??
what am i doing wrong?
Seems like cookies are disabled on this browser, please enable them to open this website
I agree to HackerRank's Terms of Service and Privacy Policy.
Arrays: Left Rotation
You are viewing a single comment's thread. Return to all comments →
sorry to bother..i'm having trouble calculating for these values.. array length=5, no._of rotations=7.
if i take i=0 i=(0+(5-7)%5); which is equal to -2??
what am i doing wrong?