-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
feat: add Kosaraju Algoritm #699
Conversation
@raklaptudirm @tjgurwara99 Could you please review it ? |
} | ||
} | ||
|
||
func GetStronglyConnectedComponents(n int, adj [][]int) [][]int { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would have been much more easier to understand this algorithm if you had used the Graph
data structure defined in the graph.go
file. There are already a lot of helpers for that graph as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't use it because the Graph
used in graph.go has a slightly different representation with weighted edges which is not required for current algorithm. Using an adjacency list would make it much simpler.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you don't need the weighted edges, then don't use the weighted edges part of the graph 😄.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #699 +/- ##
=========================================
Coverage ? 87.05%
=========================================
Files ? 194
Lines ? 6241
Branches ? 0
=========================================
Hits ? 5433
Misses ? 677
Partials ? 131 ☔ View full report in Codecov by Sentry. |
This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
This PR was closed because it has been stalled for 7 days with no activity. |
No description provided.