Skip to content
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

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

likespro
Copy link
Contributor

Speed up Dijkstra Algorithm by using another Dijkstra variant that is generally faster.

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized it.
  • All filenames are in PascalCase.
  • All functions and variable names follow Java naming conventions.
  • All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
  • All new code is formatted with clang-format -i --style=file path/to/your/file.java

@codecov-commenter
Copy link

codecov-commenter commented Nov 13, 2024

Codecov Report

Attention: Patch coverage is 95.83333% with 1 line in your changes missing coverage. Please review.

Project coverage is 73.55%. Comparing base (7ec5d24) to head (45d2e76).

Files with missing lines Patch % Lines
...astructures/graphs/DijkstraOptimizedAlgorithm.java 95.83% 0 Missing and 1 partial ⚠️
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.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@likespro likespro marked this pull request as ready for review November 13, 2024 13:52
Copy link
Member

@siriak siriak left a 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.

@likespro likespro force-pushed the dijkstra-speedup branch 2 times, most recently from d1a3bce to e8223a1 Compare November 18, 2024 13:53
@likespro likespro marked this pull request as draft November 18, 2024 14:04
@likespro likespro marked this pull request as ready for review November 18, 2024 14:18
@likespro
Copy link
Contributor Author

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.

I added this implementation as a separate one.

@likespro likespro requested a review from siriak November 18, 2024 14:19
@likespro likespro changed the title Speed up DijkstraAlgorithm Add optimized version of DijkstraAlgorithm Nov 18, 2024
Copy link
Member

@siriak siriak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@siriak siriak merged commit 1a2aedd into TheAlgorithms:master Nov 19, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants