Skip to content

ak91456/maze-solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 

Repository files navigation

🧩 Maze Solver in C

C

This project is a stack-based maze solver written in C, which finds a valid path from the start (top-left corner) to the end (bottom-right corner) of a maze. It uses a custom stack implementation and depth-first search (DFS) to explore all possible paths.


πŸ” Overview

  • Accepts user input for the maze dimensions and structure.
  • Navigates from (0, 0) to (rows-1, cols-1) if a path exists.
  • Uses a stack to simulate recursive DFS traversal.
  • Backtracks automatically when a dead end is reached.
  • Outputs the solution path and a visual representation of the maze with the path marked.

πŸ“ File Structure

  • maze-solver.c β€” Main source code file containing:
    • Maze input & validation
    • DFS logic using a stack
    • Visual maze printer with marked path
    • Memory cleanup

βš™οΈ How to Compile and Run

🧰 Compile:

gcc maze-solver.c -o maze-solver

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages