This is Djikstra's Algorithm used for single source shortest path and its TC is O(VELogV)
To contribute