Time complexity

how time complexity is reduced even if we are storing in two arrays corresponding to source to other vertices and other vertices to destination,it will be still O(V.E.logV)

Hey @varu

from what i get from the video is you have to go delhi or amrita puri from given cities.so instead of applying Dijkstra from all cities to reach delhi or amrita puri,if you take delhi or amritapuri as source you need to apply dijkstra for only two times, so if you apply dikstra from all cities it will be V times (ElogV) time, but in this case it will be 2 ElogV.

not just two time ,sir told he is applying dijkstra first from dest to all other y and second from source to all other x,so it will be again O(2.v.e.logv)=O(v.e.logv)