Ivan on Tech video


4 replies
  1. Oliver Bergqvist
    Oliver Bergqvist says:

    I just did this on the first one:

    def left_rotation(arr, d):
    return arr[d:] + arr[:d]

    n, d = list(map(int, input().split(' ')))
    arr = list(map(int, input().split(' ')))

    rotated_arr = left_rotation(arr, d)
    result = " ".join(map(str, rotated_arr))



Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *