You need to shuffle an array so that every permutation is equally likely. This is harder than it sounds.
Given an array of integers, implement a class that can reset the array to its original state and shuffle it randomly. Each permutation must have equal probability of where is the array length.
Before reading on, think about this: if you pick random swaps without a plan, will every permutation have equal chance?