WOLFRAM NOTEBOOK

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
)
.
Wolfram Cloud

You are using a browser not supported by the Wolfram Cloud

Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.


I understand and wish to continue anyway »

You are using a browser not supported by the Wolfram Cloud. Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.