Definition:
A process designed to sort an unordered set of linear data into either ascending order (lowest to highest) or descending order (highest to lowest). This is done by repeatedly comparing neighboring elements and swapping them if they are in the order opposite of how they're being sorted. For example, if a 2 and 1 are being compared and the list is being sorted in ascending order then they'd be switched to 1 and 2. See an example of the procedure below.
Procedure for ASCENDING Bubble Sort:
Fun Fact: Bubble Sort is extremely slow and rarely used in real applications, however the algorithm is popular in introductory computer science classes because it teaches the general theory behind sorting algorithms very well.
Commonly Used In: