(array, k)
return array
Rotate the entire array 'k' times
    T(n)- O(nk)

    :type array: List[int]
    :type k: int
    :rtype: void Do not return anything, modify array in-place instead.
Rotate the entire array 'k' times
    T(n)- O(nk)
Rotate the entire array k times T ( n ) - O ( nk )
def rotate_v1(array, k):
    """
    Rotate the entire array 'k' times
    T(n)- O(nk)

    :type array: List[int]
    :type k: int
    :rtype: void Do not return anything, modify array in-place instead.
    """
    array = array[:]
    n = len(array)
    for i in range(k):      # unused variable is not a problem
        temp = array[n - 1]
        for j in range(n-1, 0, -1):
            array[j] = array[j - 1]
        array[0] = temp
    return array
def rotate_v1 ( array , k ) : array = array [ : ] n = len ( array ) for i in range ( k ) : # unused variable is not a problem temp = array [ n - 1 ] for j in range ( n - 1 , 0 , - 1 ) : array [ j ] = array [ j - 1 ] array [ 0 ] = temp return array