WOLFRAM|DEMONSTRATIONS PROJECT

Bubble Sort Algorithm

​
view
points
lines
array
graph
step (on points)
1
array size
10
seed
Bubble sort is a very simple algorithm for sorting used by beginners in computer science. The algorithm compares each pair of adjacent elements and switches their positions if they are in reverse order, repeating the process until the array is completely sorted. The algorithm is inefficient for large sets of data because its complexity is
O(
2
n
)
.