Printing Shortest Path in Weighted Undirected Graph
Jan 15, 2023 · 1 min read · For this problem, we have to follow the same Dijkstra's Algorithm for the shortest path but this time we also need to memorize the path from where we are coming. So we need a Parent array also along with a Distance array and Min heap. Data Structures...
Join discussion