Arrays: Left Rotation

  • + 0 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?