Skip to content

Conversation

TripleCamellya
Copy link
Contributor

Add Tarjan's strongly connected components algorithm.

Tarjan algorithm is another important algorithm for finding strongly connected components(SCCs) in directed graph. Comparing to Kosaraju algorithm, Tarjan doesn't need to generate transpose Graph.

Changes in PR:

  1. Implementation of Tarjan, add in strongly_connected_components.
  2. Add related tests for Tarjan.
  3. Modify original strongly_connected_components tests. I think there is no need to return components in a specific order.

@TripleCamellya
Copy link
Contributor Author

Fixes: #636

@czgdp1807 czgdp1807 enabled auto-merge (squash) March 19, 2025 05:50
@czgdp1807 czgdp1807 merged commit eb5fab1 into codezonediitj:main Mar 19, 2025
7 checks passed
@TripleCamellya TripleCamellya deleted the tarjan-scc branch March 19, 2025 05:58
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