Qvault.io – Coding courses to launch your tech career Bubble sort is named for the way elements “bubble up” to the top of the list.

Bubble sort is famous for how easy it is to write.

While bubble sort is considered fast and easy to write, its actually one of the slowest sorting algorithms out there. Because bubble sort needs to move through the entire list for each element in the list, which in code is a nested for-loop, bubble sort has a complexity of O(n^2).

Related Articles