Skip to content
๐ŸŽฌ

Algorithm Visualizer

Developer

Visualize sorting, searching, and graph algorithms step by step with animation.

0
0
Step 1 of 1
64
34
25
12
22
11
90
Comparing
Swapping
Sorted
Bubble Sort

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 the list is sorted.

Time: O(nยฒ) | Space: O(1)

A flowchart shows a program's static branching logic, which path leads where, but it can't actually show what happens to the data itself while an algorithm runs, two array elements swapping places during a sort, a search range narrowing step by step, a graph traversal visiting one node before moving to the next, the kind of runtime behavior that's genuinely hard to picture just by reading code. This tool animates sorting, searching, and graph algorithms operating on sample data step by step, showing what actually happens to the data at each step rather than the code's static structure.

See more about the Algorithm Visualizer

Useful for watching a sorting algorithm's actual swaps happen to understand why one approach is faster than another, seeing a search narrow its range step by step instead of just reading about it, or watching a graph traversal visit nodes in the order it actually does.

Key features

  • Clean interface
  • Fast processing
  • No signup required
  • Works offline

Quick answers for Algorithm Visualizer

Which sorting algorithms can I visualize?
Bubble sort, selection sort, and insertion sort. Each run generates the full sequence of comparison and swap steps for the array you provide, then steps through them one at a time.
Can I use my own array of numbers?
Yes. Enter your own values and the tool generates the step-by-step sort sequence for that exact array instead of a preset example.
Does it explain the time complexity of each algorithm?
The tool focuses on the visual step-through of comparisons and swaps rather than a written complexity breakdown, so pair it with a reference on Big O if you need the formal complexity classes.