Overview
Dijkstraverse visualizes Dijkstra's shortest-path algorithm on a grid. You place walls and weighted cells, then watch the algorithm explore the grid and highlight the shortest path.
Key Features
- Step-by-step animation of node exploration, with an adjustable speed from step-by-step to instant.
- Editable grid: draw walls, set cell weights from 1 to 9, drag the start and end markers, and resize the grid from 10x10 to 50x50.
- Maze and random tools: perfect-maze generation by recursive backtracking, random walls and random weights.
- Run stats: the nodes visited and the length of the path found.
- Saved layouts in local storage.
Technical Implementation
The code is plain JavaScript with no framework, split into classes for the grid, nodes, the algorithm, the maze generator and the heap. The algorithm uses a binary min-heap as its priority queue.