Skip to content

added floyd cycle detection algorithm#756

Closed
tashviks wants to merge 4 commits into
TheAlgorithms:masterfrom
tashviks:master
Closed

added floyd cycle detection algorithm#756
tashviks wants to merge 4 commits into
TheAlgorithms:masterfrom
tashviks:master

Conversation

@tashviks
Copy link
Copy Markdown

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.

@tashviks tashviks requested review from imp2002 and vil02 as code owners June 22, 2024 12:01
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jun 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.05%. Comparing base (616b1fb) to head (37d5408).

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.
📢 Have feedback on the report? Share it here.

@tashviks
Copy link
Copy Markdown
Author

tashviks commented Jul 2, 2024

Is there any problem with the pr format

@tashviks tashviks closed this Jul 8, 2024
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.

2 participants