Shortest Path in Unweighted Graph
Algorithm: BFS.
Shortest distance means minimum number of edges.
Time: O(V+E) with adjacency lists.
Space: O(V).
Parent pointers allow path reconstruction.
Share via WhatsApp, X, Facebook, LinkedIn or copy link. Open Graph preview enabled.