Arrays: Left Rotation

  • + 4 comments

    I agree - I ended up not using 'n' (Python):

    def left_shift(n,k,a):
       for _ in range(k):
          a.append(a.pop(0))
       print(*a)