- 🔍 BFS Solver - Finds shortest path guaranteed
- 🌊 DFS Solver - Explores depth-first with backtracking
- 📊 Path Visualization - Shows solution route
- ⚡ Interactive Input - Custom maze creation
- 🎨 Visual Output - Clear path marking
- Start point:
S| End point:E - Walls:
#| Open paths:. - Solution path:
*
|
File:
|
File:
|
# BFS Implementation
g++ -o maze_bfs MazeSolverBFS.cpp
# DFS Implementation
g++ -o maze_dfs MazeSolverDFS.cppS . . # . . E
# . # # . # .
. . . . . # .
# # . # . . .
. . . # # . .
🧩 Maze solved using BFS:
S * * # . . E
# * # # . # *
. * . . . # *
# # * # . . *
. . * # # * *
✅ Path found! Length: 12 steps
- Initialize queue with start position
- Explore all adjacent cells level by level
- Mark visited cells to avoid cycles
- Track parent cells for path reconstruction
- Return shortest path when end is reached
- Start from initial position
- Explore one direction completely
- Backtrack when hitting dead end
- Mark visited cells during exploration
- Return first valid path found
- ✅ Graph traversal algorithms (BFS vs DFS)
- ✅ Queue and stack data structures
- ✅ Pathfinding and backtracking techniques
- ✅ 2D array manipulation and navigation
- ✅ Algorithm complexity analysis
- 🎲 Random maze generation
- 🏃 A algorithm* for optimal pathfinding
- 🎨 GUI visualization with graphics
- 📊 Performance benchmarking
- 🧭 Multiple path solutions
🧩 Navigate Your Way Out! 🗺️