• + 0 comments

    My respost in Python:

    def rotateLeft(d, arr):
        n = len(arr)
        d = d % n
        return arr[d:] + arr[:d]
    

    I used loops the first time, but they weren't very efficient.