Looking for a problem that applies shortest path in a DAG using topological sort

Правка en1, от JasonMendoza2008, 2024-09-06 13:03:29

I am looking for a problem that applies shortest path in a DAG using topological sort to get linear time (V + E). I couldn't find this kind of problem on the internet even though that's (I assume) a relatively standard problem, am I not looking correctly? Do you guys have an idea where I could find such an algorithm on an online judge (hackerrank, leetcode, codeforces, codechef, I don't particularly care about the platform).

Ideally, some edges are negative, otherwise Djikstra also works.

Thanks!

Теги topological sort

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский JasonMendoza2008 2024-09-06 13:03:29 588 Initial revision (published)