Skip to content
Branch: master
Find file History
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
__test__ Add test cases for sorting negative numbers and zeros. Jul 3, 2018
BubbleSort.js BubbleSort: use Destructuring assignment to swap values (#226) Oct 17, 2018
README.md Fix indentations in bubble-sort README. Dec 9, 2018

README.md

Bubble Sort

Bubble sort, sometimes referred to as sinking sort, is a simple sorting algorithm that repeatedly steps through the list to be sorted, compares each pair of adjacent items and swaps them if they are in the wrong order (ascending or descending arrangement). The pass through the list is repeated until no swaps are needed, which indicates that the list is sorted.

Algorithm Visualization

Complexity

Name Best Average Worst Memory Stable Comments
Bubble sort n n2 n2 1 Yes

References

You can’t perform that action at this time.