Left Rotation

  • + 0 comments
    def rotateLeft(d, arr):
        # Write your code here
        for i in range(d):
            arr.append(arr[i])
        return arr[d:]