Skip to content

Creates and solves a maze using Depth First Search and Prim Jarnik algorithms

Notifications You must be signed in to change notification settings

arkaic/MazeSolve

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MazeSolve

A data structures assignment from a few years ago. I wrote a Java program to generate a randomized 2D maze of n x n square dimensions and then solving it.

I implemented a graph (which in turn was implemented with a priority queue) whose nodes represent the walls, and edges represent the square rooms.

I then wrote an implementation of Prim's Jarnik algorithm to calculate the minimum spanning tree of the graph, and hence creating the maze.

Lastly, I implemented depth first search to find a valid path from a startpoint to endpoint of the graph, both located at the graph's edges.

The maze's ascii representation is also printed to the console.

About

Creates and solves a maze using Depth First Search and Prim Jarnik algorithms

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages