import random


def fisherYatesShuffle(arr):
    """
    https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle
    for i from n−1 downto 1 do
     j ← random integer such that 0 ≤ j ≤ i
     exchange a[j] and a[i]
    """
    for i in range(len(arr)-1, 0, -1):
        j = random.randint(0, i)
        arr[i], arr[j] = arr[j], arr[i]
    return arr