Bubble Sort is a simple sorting algorithm that works by iteratively swapping adjacent elements until the list is sorted.
The algorithm's worst case complexity is O(n2). Generally other sorting algorithms have better worst-case or average complexity, leaving bubble sort rarely used for cases other than learning.
Bubble sort is a stable sort. This means that two objects with equal keys appear in the same order in sorted output as they appeared in the unsorted input. Other examples of stable sort algorithms include Insertion sort, Merge Sort, and Counting Sort