Algorithm For Time Complexity Graph For Dijkstra