Travis build: 943
This commit is contained in:
@ -2,11 +2,11 @@ from copy import deepcopy
|
||||
from random import randint
|
||||
|
||||
|
||||
def shuffle(arr):
|
||||
temp_arr = deepcopy(arr)
|
||||
m = len(temp_arr)
|
||||
def shuffle(lst):
|
||||
temp_lst = deepcopy(lst)
|
||||
m = len(temp_lst)
|
||||
while (m):
|
||||
m -= 1
|
||||
i = randint(0, m)
|
||||
temp_arr[m], temp_arr[i] = temp_arr[i], temp_arr[m]
|
||||
return temp_arr
|
||||
temp_lst[m], temp_lst[i] = temp_lst[i], temp_lst[m]
|
||||
return temp_lst
|
||||
Reference in New Issue
Block a user