@@ -77,7 +77,7 @@ vector<bool> visited; // keeps track of which vertices are already visited
77
77
78
78
// runs depth first search starting at vertex v.
79
79
// each visited vertex is appended to the output vector when dfs leaves it.
80
- void dfs (int v, vector<vector<int >> & adj, vector<int > &output) {
80
+ void dfs (int v, vector<vector<int >> const& adj, vector<int > &output) {
81
81
visited[ v] = true;
82
82
for (auto u : adj[ v] )
83
83
if (!visited[ u] )
@@ -88,7 +88,7 @@ void dfs(int v, vector<vector<int>> &adj, vector<int> &output) {
88
88
// input: adj -- adjacency list of G
89
89
// output: components -- the strongy connected components in G
90
90
// output: adj_cond -- adjacency list of G^SCC (by root vertices)
91
- void strongy_connected_components(vector<vector<int >> & adj,
91
+ void strongy_connected_components(vector<vector<int >> const& adj,
92
92
vector<vector<int >> &components,
93
93
vector<vector<int >> &adj_cond) {
94
94
int n = adj.size();
@@ -150,7 +150,7 @@ Our condensation graph is now given by the vertices `components` (one strongly c
150
150
151
151
## Practice Problems
152
152
153
- [SPOJ - Good Travels](http://www.spoj.com/problems/GOODA/)
153
+ * [SPOJ - Good Travels](http://www.spoj.com/problems/GOODA/)
154
154
* [SPOJ - Lego](http://www.spoj.com/problems/LEGO/)
155
155
* [Codechef - Chef and Round Run](https://www.codechef.com/AUG16/problems/CHEFRRUN)
156
156
* [Dev Skills - A Song of Fire and Ice](https://devskill.com/CodingProblems/ViewProblem/79)
0 commit comments