Skip to content

Commit 4c4f368

Browse files
committed
chnages done
1 parent edfac9d commit 4c4f368

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

dsa/Algorithms/dijkstra.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -346,9 +346,9 @@ Bidirectional Dijkstra runs two simultaneous searches: one forward from the sour
346346
### Time Complexity
347347

348348
The time complexity of Dijkstra's Algorithm depends on the data structures used:
349-
- Using a simple list: O(V^2)
350-
- Using a binary heap (priority queue): O((V + E) log V)
351-
- Using a Fibonacci heap: O(V log V + E)
349+
- Using a simple list: $O(V^2)$
350+
- Using a binary heap (priority queue): $O((V + E) log V)$
351+
- Using a Fibonacci heap: $O(V log V + E)$
352352

353353
### Handling Negative Weights
354354

@@ -361,5 +361,3 @@ To reconstruct the shortest path from the source to a target node, we can backtr
361361
## Conclusion
362362

363363
In this tutorial, we covered the fundamentals of Dijkstra's Algorithm, its implementation in Python, Java, C++, and JavaScript, and various optimizations and applications. Dijkstra's Algorithm is a powerful tool for finding the shortest path in graphs and is widely used in numerous domains. By mastering this algorithm, you can effectively solve a variety of shortest path problems in your projects.
364-
365-
Happy coding!

0 commit comments

Comments
 (0)