When you search on Amazon, it sorts millions of products in milliseconds. Watch how different sorting algorithms work step by step and compare their speed.
Designed with the WJEC specification in mindRepeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order. The pass is repeated until the list is sorted.