Algorithm Visualizer

Learn algorithms
by watching them
think.

Merge SortStep 7 of 18
1
3
5
8
2
9
Comparing 5 and 8 — merging left and right partitions

Both 5 and 8 are being pulled from separate sorted halves. Since 5 is smaller, it gets placed first into the merged result.

12 algorithms
Step by step
AI explanations
Free & open source

What you can trace

12 algorithms
Sorting
  • 01Bubble Sort
  • 02Selection Sort
  • 03Insertion Sort
  • 04Merge Sort
  • 05Quick Sort
Searching
  • 01Linear Search
  • 02Binary Search
Data Structures
  • 01Linked List
  • 02Stack
  • 03Queue
  • 04Binary Search Tree