def rotate_v1(array, k):
array = array[:]<EOL>n = len(array)<EOL>for i in range(k):      <EOL><INDENT>temp = array[n - <NUM_LIT:1>]<EOL>for j in range(n-<NUM_LIT:1>, <NUM_LIT:0>, -<NUM_LIT:1>):<EOL><INDENT>array[j] = array[j - <NUM_LIT:1>]<EOL><DEDENT>array[<NUM_LIT:0>] = temp<EOL><DEDENT>return array<EOL>
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.