A variant of Dijkstra's Algorithm, Directing-Crowd method, creates a directed graph, which shows the path from any node to the exit point. Thus this method works for multi-source or single-source-unique-destination problems. Its called the "Directing-Crowd" method as every node in the graph, after parsing, points to its next node which takes us one step closer to the exit point, no matter where we start from (here, we start from 'E' point). This method is exactly like you are searching for a person in the crowd and every guy in the crowd points you towards that guy who is one step closer to the person you are looking for.