Let G(V, E) be a directed graph where every edge has weight as either 1, 2 or 5, what is the algorithm used for the shortest path from a given source vertex to a given destination vertex to get the time complexity of O(V+E)?
1.BFS
2.DFS
3.Binary search
4.Radix sort
Posted Date:-2022-05-13 09:59:24