Press "Sort" to show the sorting process or reset the timer. Press "Randomize" to randomize the list. Have fun and ask questions if you're confused or need info. :) HOW IT WORKS: You might have noticed that while sorting, the first item changes height (index) but doesn't turn green for most of the time. This happens because when sorting, the algorithm swaps an out of place item with number one while putting the last grabbed item in its place. Once the first item is in the correct spot, the algorithm uses a new item for this task.
All me. I actually got the idea for this particular sorting algorithm from a game I made up to make sorting Nutcrackers by size fun for me and my sister. They had numbers on the bottom which indicated where they should go on the shelf. We started by picking one and putting it in its spot and taking that one and putting it in its spot. We continued this until they were all in the correct place.