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 algorithms to detect cycle in graph #721

Merged
merged 3 commits into from
May 20, 2024

Conversation

Zzocker
Copy link
Contributor

@Zzocker Zzocker commented May 18, 2024

Description

Add algorithms to detect cycles in directed and undirected graphs using both bfs and dfs traversal

Type of change

  • New feature (add algorithms to detect cycle in graph)

Checklist:

  • I ran bellow commands using the latest version of rust nightly.
  • I ran cargo clippy --all -- -D warnings just before my last commit and fixed any issue that was found.
  • I ran cargo fmt just before my last commit.
  • I ran cargo test just before my last commit and all tests passed.
  • I added my algorithm to the corresponding mod.rs file within its own folder, and in any parent folder(s).
  • I added my algorithm to DIRECTORY.md with the correct link.
  • I checked COUNTRIBUTING.md and my code follows its guidelines.

@codecov-commenter
Copy link

codecov-commenter commented May 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.85%. Comparing base (87673f0) to head (0f7c196).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #721      +/-   ##
==========================================
+ Coverage   94.80%   94.85%   +0.05%     
==========================================
  Files         301      302       +1     
  Lines       22356    22575     +219     
==========================================
+ Hits        21195    21414     +219     
  Misses       1161     1161              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Pritam Singh <pkspritam16@gmail.com>
src/graph/detect_cycle.rs Outdated Show resolved Hide resolved
Signed-off-by: Pritam Singh <pkspritam16@gmail.com>
@vil02 vil02 merged commit 0aa3f8d into TheAlgorithms:master May 20, 2024
4 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.

None yet

3 participants