Understanding Bidirectional Dijkstra’s Algorithm

Ritesh Kapoor
4 min readJan 18, 2022
Photo by Florian Steciuk on Unsplash

Dijkstra’s algorithm is well known shortest path finding algorithm in a graph. But there exists Bidirectional Dijkstra algorithm as well which runs two simultaneous searches, one in the forward direction from source and the other in the backward direction from destination until they meet eventually. In this article, we will cover the algorithm with an example and implement it in Java Language.

--

--

Ritesh Kapoor

Software Architect — Passionate about Algorithms, Architectural Designs, Agile Methodologies