How do you use a Bidirectional BFS to find the shortest path?
How do you use a Bidirectional BFS to find the shortest path? Let's say there is a 6x6 grid. The start point is in (0,5) and the end point is in (4,1). What is the shortest path using bidirectional bfs? There are no path costs. And it is undirected. amit How does Bi-directional BFS work? Simultaneously run two BFS's from both source and target vertices, terminating once a vertex common to both runs is discovered. This vertex will be halfway between the source and the target. Why is it better than BFS? Bi-directional BFS will yield much better results than simple BFS in most cases. Assume the