×

Bubble sort

Sorting algorithm
Bubble sort, sometimes referred to as sinking sort, is a simple sorting algorithm that repeatedly steps through the input list element by element, comparing the current element with the one after it, swapping their values if needed. Wikipedia
Worst-case complexity: n^2
Best complexity: n
Average complexity: n^2
Class: Sorting algorithm
Data structure: Array