Added: Tarjan's SCC algorithm and test cases
Pull Request Title:
Description of the Change:
I’ve implemented Tarjan’s Algorithm for finding Strongly Connected Components (SCC) in a directed graph, and added test cases to ensure correctness. This algorithm uses a depth-first search (DFS) approach and provides an efficient solution for identifying SCCs.
What did I do?
- Implemented Tarjan's SCC algorithm.
- Created test cases for validating the algorithm's correctness.
- Ensured edge cases are covered in the test cases.
Checklist:
- [*] I have read the CONTRIBUTING.md guidelines.
- [*] This pull request is my own work and I have not plagiarized.
- [*] I understand that pull requests will not be merged if they fail the automated tests.
- [*] This PR only modifies the algorithm file related to Tarjan’s SCC.
- [*] All new files follow the UpperCamelCase naming convention (e.g.,
TarjanSCC.js). - [*] I’ve linked any algorithm-related references or explanations in the comments.
Let me know if any adjustments are needed!
Codecov Report
Attention: Patch coverage is 98.16514% with 2 lines in your changes missing coverage. Please review.
Project coverage is 85.94%. Comparing base (
1d252d7) to head (ae3b7fb).
| Files with missing lines | Patch % | Lines |
|---|---|---|
| Graphs/TarjanSCC.js | 98.16% | 2 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #1774 +/- ##
==========================================
+ Coverage 85.87% 85.94% +0.06%
==========================================
Files 377 378 +1
Lines 19720 19829 +109
Branches 3005 3028 +23
==========================================
+ Hits 16935 17042 +107
- Misses 2785 2787 +2
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
@appgurueu can you please review my pr and give feedback. thanks.