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.