Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Bubble sort

A bubble sort is a simple sorting algorithm that repeatedly steps through a list to be sorted, comparing each pair of adjacent items and swapping them if they are in the wrong order.

The pass through the list is repeated until no swaps are needed, indicating the list is sorted. Sometimes referred to as a sinking sort.

Characteristics

Complexity

🔔 Complexity is considered in terms of worst case.

Time complexity

Notes
Θ(n2)

Space complexity

Notes
Θ(1) The sorting operations take place on the unsorted array