Skip to content

Conversation

kpousti
Copy link

@kpousti kpousti commented Jul 29, 2025

Summary

Added an implementation of Tarjan’s Algorithm for detecting Strongly Connected Components (SCCs) in a directed graph.

Details

  • Time complexity: O(V + E)
  • Language: C++
  • File: graph/strongly_connected_components.cpp
  • Includes a working test case that prints 3 SCCs

Author

Kia Pousti (@kpousti)


// Print SCCs
cout << "Strongly Connected Components:\n";
for (const auto& scc : sccs) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests should be in a tests function

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