JavaScript icon indicating copy to clipboard operation
JavaScript copied to clipboard

Added: Tarjan's SCC algorithm and test cases

Open vedas-dixit opened this issue 6 months ago • 2 comments

Pull Request Title:

Open in Gitpod Know more

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!

vedas-dixit avatar Apr 15 '25 11:04 vedas-dixit