For shortest walk in weighted DAG.

Pseudo-code

Dijkstra(𝑠):1for all vertices 𝑣𝑉:2𝑣.𝑑𝑖𝑠𝑡34𝑞 priorityQueue()5𝑞.Insert(𝑠,0)6while 𝑞 is not empty:7𝑢 ExtractMin(𝑞)// 𝑂(log𝑉)8for all edges 𝑢𝑣:9if 𝑢𝑣 is tense:10Relax(𝑢𝑣)// update 𝑣.𝑑𝑖𝑠𝑡11if 𝑣𝑞:12𝑞.DecreaseKey(𝑣,𝑣.𝑑𝑖𝑠𝑡)// 𝑂(log𝑉) or 𝑂(1) if use Fibonacci heap13else:14𝑞.Insert(𝑣,𝑣.𝑑𝑖𝑠𝑡)15

Runtime

𝑂((𝑉+𝐸)log𝑉)

then if we use Fibonacci heap instead of binary heap in queue, it will be

𝑂(𝑉+𝐸log𝑉)

or worst cases(dense graph) 𝑂(𝑉2log𝑉) and 𝑂(𝑉2)