-
Notifications
You must be signed in to change notification settings - Fork 19.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add optimized version of DijkstraAlgorithm #6088
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6088 +/- ##
============================================
+ Coverage 73.52% 73.55% +0.03%
- Complexity 5099 5108 +9
============================================
Files 657 658 +1
Lines 17625 17649 +24
Branches 3393 3396 +3
============================================
+ Hits 12959 12982 +23
Misses 4165 4165
- Partials 501 502 +1 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add this as a separate optimized implementation? Both are good. The proposed one is faster, but the original one is simpler and easier to understand.
d1a3bce
to
e8223a1
Compare
e8223a1
to
56c0902
Compare
I added this implementation as a separate one. |
src/main/java/com/thealgorithms/datastructures/graphs/DijkstraOptimizedAlgorithm.java
Outdated
Show resolved
Hide resolved
56c0902
to
45d2e76
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
Speed up Dijkstra Algorithm by using another Dijkstra variant that is generally faster.
clang-format -i --style=file path/to/your/file.java