Press Space to generate the array. Press S to sort it. You can set how many elements you want in the array before pressing Space. Turn sound on or off by pressing A. (NOTE: Turning audio on might slow down the algorithm a little bit. Also, use Turbo Mode on this project by holding Shift and clicking the flag.)
This sorting algorithm scans the array to check if the elements are in order, and if it finds a SINGLE element out of order, it shuffles the WHOLE ARRAY.