Arrays: Left Rotation

  • + 1 comment

    Python solution:

    def rotLeft(a, d):
            return a[d%len(a):] + a[:d%len(a)]