This C++ code demonstrates a real-time application of Dijkstra's algorithm to find the shortest paths from a source location to all other destinations within the Delhi Metro system. In this pilot project, 56 metro locations are represented as integers starting from 0. Upon receiving the user's input for the source location and thedestination, the algorithm calculates and displays the shortest path from source to destination.
TIME COMPLEXITY: The time complexity of Dijkstras algorithm is O((V+E)logV),where V is the number of vertices in the graph,E is the no. of edges.
SPACE COMPLEXITY:The space complexity of Dijkstras algorithm is O(V) ,where V is the number of vertices in the graph.