Visualize and understand sorting algorithms with interactive animations
O(n)
O(n²)
O(n²)
O(1)
// Select an algorithm and click "Export Code" to see the implementation
Watch sorting algorithms come to life with animated visualizations. Perfect for students learning algorithms or developers understanding time complexity:
Select from Bubble Sort, Quick Sort, Merge Sort, Insertion Sort, Selection Sort, or Heap Sort. Each has different time complexity and use cases.
Adjust array size (10-100 elements) and animation speed (slow/medium/fast). Smaller arrays show details better, while larger ones demonstrate efficiency differences.
Click "Start Sort" to see the algorithm in action. Color-coded bars show comparisons, swaps, and sorted elements in real-time. Use pause/resume controls to study specific steps.
View comparison count, swaps, and time taken. Export the JavaScript implementation to use in your own projects.