Sorting Algorithm Visualizer

Step through Quick, Merge, Insertion, Selection, and Bubble Sort with comparison and swap counters. Built for Data Structures & Algorithms, this workbench updates the animated bar trace and scalar readouts in real time as parameters change.

Technical Reference & Equations

  • Comparison Sort Lower Bound: \Omega(n \log n) (Decision-tree bound for any comparison-based sort (Merge Sort, Heapsort, Timsort).)
  • BST Height Bounds: h_{\text{balanced}} = \lfloor \log_2 n \rfloor, \quad h_{\text{skewed}} = n - 1 (Search/insert/delete run in O(h) time.)
  • Dijkstras Priority-Queue Complexity: O\big((V + E)\log V\big) (Requires non-negative edge weights w(u, v) >= 0.)

View full Data Structures & Algorithms Formula Sheet | Constants Table

Related Data Structures Calculators

  • Binary Search Tree Visualizer: Insert, delete, and search nodes on a live binary search tree with in-order, pre-order, and post-order traversals.
  • AVL Self-Balancing Tree & Rotations: Insert and delete keys with live per-node balance factors, heights, automatic LL/RR/LR/RL rotations, and a step-by-step rotation audit log.
  • Hash Table & Collision Resolution Simulator: Compare Linear Probing, Quadratic Probing, Double Hashing, and Separate Chaining with live load factor, probe sequences, and clustering metrics.
  • Binary Heap & Priority Queue: Synchronize Min-Heap and Max-Heap binary trees with their 0-indexed backing arrays, Sift-Up/Sift-Down paths, Extract-Root, and Floyd O(n) Build-Heap.
  • Dijkstra Shortest Path: Edit edge weights on a network graph and watch Dijkstra’s shortest-path tree update.
  • Minimum Spanning Tree (Kruskal & Prim): Step through Kruskal Union-Find edge sorting and Prim cut-frontier expansion on weighted undirected graphs with cycle rejection tracking.