added floyd cycle detection algorithm#756
Closed
tashviks wants to merge 4 commits into
Closed
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #756 +/- ##
=======================================
Coverage 95.05% 95.05%
=======================================
Files 306 306
Lines 22718 22718
=======================================
Hits 21594 21594
Misses 1124 1124 ☔ View full report in Codecov by Sentry. |
Author
|
Is there any problem with the pr format |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Title: Add Floyd's Cycle Detection algorithm implementation in Rust
Description:
This PR adds an implementation of Floyd's Cycle Detection algorithm in Rust. Floyd's Cycle Detection algorithm is used to find a duplicate number in an array of integers, ensuring optimal time complexity and space efficiency.
Details:
Implemented the find_duplicate_number function using Floyd's Cycle Detection algorithm.
Handles edge cases such as empty arrays gracefully, returning None when no duplicate is found.
Added comprehensive test cases to validate the correctness of the implementation.