Shortest Path For A Dag
I have a graph with an s and t vertex that I need to find the shortest path between. The graph has a lot of special properties that I would like to capitalize on: The graph is a DAG (directed acyclic graph). I can create a topological sort in O(|V|) time, faster than the traditional O(|V + E|). Within the topological sort, s is the first item in the list and t is the last. I was told that once I have a topological sort of the vertices I could find the shortest path faster than my current standard of Dijkstra's Uniform Cost, but I cannot seem to find the algorithm for it. Pseudo code would be