A browser-based visualizer for classic algorithms and data structures, with frame-by-frame playback controls.
The project now includes sorting, search, data structure operations, and a complete graph algorithms module.
- Bubble Sort
- Selection Sort
- Quick Sort
- Heap Sort
- Linear Search
- Binary Search
- Singly Linked List
- Doubly Linked List
- Stack (LIFO)
- Queue (FIFO)
- Union-Find (Disjoint Set Union)
- Max Heap (structure operations)
- Trie (prefix tree)
- DFS
- BFS
- Topological Sort
- Floyd-Warshall
- Dijkstra
- Bellman-Ford
- SPFA
- Prim
- Kruskal
- Bipartite Coloring (2-coloring)
- Hungarian (Kuhn) for bipartite matching
AlgorithmData SizeSpeedTarget(for search algorithms)Timeline
Random (R)RunPlay / Pause (Space)Prev (Left)Next (Right)Reset (Home)
Space: play / pauseArrowLeft: previous stepArrowRight: next stepR: randomize input dataHome: reset playback
Open index.html in a browser.
cd algo-visualizer
python -m http.server 5500Open: http://localhost:5500
algo-visualizer/
index.html # Single-page UI
src/
app.js # Runtime entry (algorithms + data + renderers + controls)
styles/
main.css # UI and visualization styles
- All algorithm step generation is in
src/app.js. - Playback (
Play/Pause,Prev/Next, timeline, speed) is shared by all modules. - Visualizations currently use multiple view types:
barsfor array-based algorithmslist,stack,queue,uf,heap,triefor data structuresgraphandmatrixfor graph-related algorithms
- Add a step generator function in
src/app.js. - Register it in the
algorithmsarray. - Return one of the existing view types (
bars,graph,matrix, etc.), or add a new renderer branch inrenderStep.
- Demonstrates algorithm knowledge with concrete visual output.
- Shows engineering beyond static code examples (state stepping, controls, reusable renderer flow).
- Easy for reviewers to run locally in under one minute.
MIT