Sorting Algorithm
Visualizer

Discover how different sorting algorithms work. Compare their performance, understand their complexity, and learn through interactive visualization.

5 Algorithms
Real-time Animation
Performance Analysis

Bubble Sort

Average: O(n²)

Repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order.

Best: O(n)Avg: O(n²)Worst: O(n²)Space: O(1)Stable
Auto-rotating
Sorting VisualizationReady
Bubble SortAvg: O(n²)Space: O(1)
Data Configuration
1050
Animation Control
SlowFast
Actions
Ready to sort
Normal
Comparing
Swapping
Pivot
Sorted
Statistics

Comparisons

0

Element comparisons

Swaps

0

Array swaps

Array Accesses

0

Total array reads/writes

Time Elapsed

0ms

Visualization time

Bubble Sort Information

Time Complexity

Best:O(n)
Average:O(n²)
Worst:O(n²)

Properties

Space:O(1)
Stable:Yes
Array Size:25 elements

Repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order.