Arrays: Left Rotation

  • + 0 comments

    python implementation:

    def rotLeft(a, d):
       return [a[i%len(a)] for i in range(d,d+len(a))]