Algorithm Visualizer

Visualize sorting and graph algorithms with interactive animations.

Input Array

Speed: 1x

Algorithm & Controls

Visualization

Algorithm Information: Bubble Sort

Description:

Bubble Sort is a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order. The pass through the list is repeated until no swaps are needed, which indicates that the list is sorted.

Time Complexity:

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

Space Complexity:

  • O(1) auxiliary space