*BFS (breadth first search) 1. Finding the nearest exit in maze. 2. Finding the sum of path with minimum edge weight.