MazeSolver

It was a difficult problem to find a shortest path in a 2D Maze. During my second year exams, I got a mail in which I was asked to write a program for this. I started to think but first no solution could come into my mind, but soon I thought that this could be done using graphs. The maze is similar to a graph, with every element of the maze (node) adjacent to its left, right, top and bottom nodes. After this I applied simple breadth first search to find the shortest path.

Advertisements

2 Responses to “MazeSolver”

  1. Faisal Nasim Says:

    Tell this to ZQ, he’ll be extremely happy to hear this! I’m sure this will serve as a great example to the new students. See if you can prepare a ratta-able tutorial for it! 🙂

  2. Syed Mehroz Alam Says:

    by the way, dont you think my article can serve as a tutorial for this…


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: