Skip to content

Commit 15b6f5b

Browse files
authored
Fix formatting in practice list + use const& in impl
1 parent d45b892 commit 15b6f5b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/graph/strongly-connected-components.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ vector<bool> visited; // keeps track of which vertices are already visited
7777

7878
// runs depth first search starting at vertex v.
7979
// 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) {
8181
visited[v] = true;
8282
for (auto u : adj[v])
8383
if (!visited[u])
@@ -88,7 +88,7 @@ void dfs(int v, vector<vector<int>> &adj, vector<int> &output) {
8888
// input: adj -- adjacency list of G
8989
// output: components -- the strongy connected components in G
9090
// 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,
9292
vector<vector<int>> &components,
9393
vector<vector<int>> &adj_cond) {
9494
int n = adj.size();
@@ -150,7 +150,7 @@ Our condensation graph is now given by the vertices `components` (one strongly c
150150
151151
## Practice Problems
152152
153-
[SPOJ - Good Travels](http://www.spoj.com/problems/GOODA/)
153+
* [SPOJ - Good Travels](http://www.spoj.com/problems/GOODA/)
154154
* [SPOJ - Lego](http://www.spoj.com/problems/LEGO/)
155155
* [Codechef - Chef and Round Run](https://www.codechef.com/AUG16/problems/CHEFRRUN)
156156
* [Dev Skills - A Song of Fire and Ice](https://devskill.com/CodingProblems/ViewProblem/79)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy