An interactive, visually stunning way to learn Data Structures and Algorithms through a real-world World Map.
Learning Data Structures and Algorithms shouldn't be boring. DSA GeoVisualizer brings abstract technical concepts to life by overlaying them on a beautiful, interactive world map. Watch as graphs, linked lists, and pathfinding algorithms animate in real-time across cities and continents!
Note: Replace the placeholder image above with a real screenshot or GIF of the visualizer.
- 🗺️ Interactive World Map UI: Learn visually with real-world geography instead of plain whiteboards.
- ⏯️ Step-by-Step Execution: Play, pause, and step through each algorithmic frame at your own speed.
- 🔌 Decoupled Architecture: Algorithms run independently of the React state. You can plug in new logic easily!
- 🎨 Premium Aesthetics: Glassmorphism UI, smooth animations, and a responsive dark theme.
- Framework: React 19 + Vite
- Routing: React Router v7
- Map Rendering: react-simple-maps (d3-geo)
- Icons: lucide-react
- Styling: Pure Vanilla CSS (Glassmorphism & Flex/Grid layouts)
Follow these steps to get a local copy up and running.
- Node.js (v18 or higher)
- npm or yarn
-
Clone the repository:
git clone https://github.com/diusazzad/algorithms_visualization.git
-
Navigate to the project directory:
cd algorithms_visualization -
Install dependencies: (Note:
--legacy-peer-depsis required for react-simple-maps compatibility with React 19)npm install --legacy-peer-deps
-
Start the development server:
npm run dev
-
Open your browser: Visit
http://localhost:5173/
We built this project with a highly decoupled architecture. You can contribute new algorithms without touching the complex React UI!
- Algorithm Engine (
src/algorithms/): Pure JavaScript functions that take data and return an array of "frames" (animation steps). - UI & Visualizer (
src/components/Visualizer/): Reads the frames using a custom hook (useAlgorithmVisualizer) and blindly animates them on the map.
Create a new JS file in src/algorithms/ (e.g., bfs.js):
export function generateBFSFrames(graph, startNode) {
const frames = [];
// Your logic here...
// Push a new frame for every step you want to animate on the map
frames.push({
activeNode: 'dhaka',
visitedNodes: ['dhaka'],
edges: [{from: 'dhaka', to: 'dubai'}],
description: "Checking neighbors of Dhaka"
});
return frames;
}- Import your function into
src/components/Visualizer/Visualizer.jsx. - Add a button in the Control Panel to trigger your algorithm.
- Pass your generated frames into the existing animation state.
Give a ⭐️ if this project helped you learn or inspired you!
Distributed under the MIT License. See LICENSE for more information.
