Arrays: Left Rotation

  • + 0 comments

    No loops. Just split and reconnect. def rotLeft(a, d): b = [] b = a[d:len(a)] + a[0:d] return b