Bubble sort is a simple comparison sorting algorithm where the list is repeatedly traversed through, swapping in-place any items that are in the wrong order. As the list is traversed through n times, and each traversal is at maximum about n items long, bubble sort has O(n²) complexity (both average-case and worst-case). The algorithm is named as such because large values "bubble" up rather fast early up in the algorithm.
Attributes | Values |
---|---|
rdfs:label |
|
rdfs:comment |
|
sameAs | |
dcterms:subject | |
dbkwik:code/proper...iPageUsesTemplate | |
abstract |
|