Bubble Sort

Bubble sort is a sorting algorithm that compares two adjacent elements and swaps them until they are in the intended order. Imagine you have a set of numbered cards that are all mixed up. With bubble sort, you start at one end and look at pairs of cards. If a card with a smaller digit is in front … Read more