AlgoViz - Interactive Algorithm & Code Execution Visualizer
AlgoViz is a free, interactive educational workbench that helps computer science students, programmers, and educators visualize JavaScript and C++ execution step-by-step. Step through loops, recursion, lists, and trees to watch variables, call stack frames, and console outputs update in real time.
Interactive Algorithm Visualizers Included
-
Tree Visualizer: Animate Binary Search Trees (BST) and custom binary trees. Watch tree node insertions and traversal (In-order, Pre-order, Post-order) recursively.
-
Linked List Visualizer: Trace singly linked lists and doubly linked lists. Automatically highlights cycle detection using Floyd's Tortoise and Hare algorithm.
-
Stack & Queue Visualizer: Animate last-in-first-out (LIFO) stack operations and first-in-first-out (FIFO) queues with visual cell transitions.
-
Array and Matrix Grid Visualizers: Highlight pointer trackers (like i, j, left, right, mid) moving across index columns. Animate matrix traversal paths, grid pathfinding (DFS, BFS), and matrix flood fills.
-
Call Stack and Recursion Tracker: Demystify backtracking and deep recursion (like N-Queens, Fibonacci, Merge Sort, and Quick Sort) by inspecting active call stack frames and historical local variables.
Key Product Features
- Step-by-step Execution Controls: Play, pause, adjust speed, and scrub the timeline to watch statement transitions.
- Complexity Analyzer: Get live time complexity (Big-O notation) estimation, hot lines hitmaps, and operations counts.
- In-Browser C++ Compiler: Compile C++ code locally with WebAssembly Clang, or fallback to the GCC Wandbox compilation API.
- Variables Sparklines: Render inline SVG trendlines tracking variable value mutations.
- Enlarged Diagram View: Open zoomable/pannable full-screen views of tree, list, and graph diagrams.
Algorithmic Templates Library
Explore pre-built templates for quick loading:
- Search & Sort: Binary Search, Bubble Sort, Selection Sort, Insertion Sort, Merge Sort, Quick Sort
- Dynamic Programming: Climbing Stairs, Coin Change, 0/1 Knapsack
- Graphs: Dijkstra's Shortest Path, DFS, BFS