Arrays: Left Rotation

  • + 1 comment

    Here is the answer for right rotation:

         def rightRot(a,d):
            return a[d+1:]+a[:d+1]