arr = [1, 2, 3, 4, 5, 6, 7]

# ROTATE ARRAY — DYNAMIC ARRAY
def left_rotate(arr, n):
    return arr[n:] + arr[:n]
    
# ROTATE ARRAY — STATIC ARRAY   
def left_rotate_static(arr, rotations, arr_size):
    for i in range(rotations):
        temp = arr[0]
        for i in range(arr_size-1):
            arr[i] = arr[i+1]
        arr[arr_size-1] = temp
    return arr
    
print(left_rotate(arr, 2))
print(left_rotate_static(arr, 2, 7))
6cf4515e962cdf3a602af6fc6ddc98d8b1c8c5d5
<mask token>


def left_rotate(arr, n):
    return arr[n:] + arr[:n]


<mask token>

<mask token>


def left_rotate(arr, n):
    return arr[n:] + arr[:n]


def left_rotate_static(arr, rotations, arr_size):
    for i in range(rotations):
        temp = arr[0]
        for i in range(arr_size - 1):
            arr[i] = arr[i + 1]
        arr[arr_size - 1] = temp
    return arr


<mask token>

<mask token>


def left_rotate(arr, n):
    return arr[n:] + arr[:n]


def left_rotate_static(arr, rotations, arr_size):
    for i in range(rotations):
        temp = arr[0]
        for i in range(arr_size - 1):
            arr[i] = arr[i + 1]
        arr[arr_size - 1] = temp
    return arr


print(left_rotate(arr, 2))
print(left_rotate_static(arr, 2, 7))

arr = [1, 2, 3, 4, 5, 6, 7]


def left_rotate(arr, n):
    return arr[n:] + arr[:n]


def left_rotate_static(arr, rotations, arr_size):
    for i in range(rotations):
        temp = arr[0]
        for i in range(arr_size - 1):
            arr[i] = arr[i + 1]
        arr[arr_size - 1] = temp
    return arr


print(left_rotate(arr, 2))
print(left_rotate_static(arr, 2, 7))

arr = [1, 2, 3, 4, 5, 6, 7]

# ROTATE ARRAY — DYNAMIC ARRAY
def left_rotate(arr, n):
    return arr[n:] + arr[:n]
    
# ROTATE ARRAY — STATIC ARRAY   
def left_rotate_static(arr, rotations, arr_size):
    for i in range(rotations):
        temp = arr[0]
        for i in range(arr_size-1):
            arr[i] = arr[i+1]
        arr[arr_size-1] = temp
    return arr
    
print(left_rotate(arr, 2))
print(left_rotate_static(arr, 2, 7))