I was trying to implement strongly connected algorithms from different sources. I found one that confuses me at http://www.oneous.com/Tutorial-Content.php?id=18
The reason for my confusion is this line:
if (used[v[s][i]] == 0)
DFS(v[s][i]);
We have declared v as a one-dimensional vector, but here it is used as a 2-dimensional vector. I think this is an error but can’t figure out how to fix it. Please help me solve this problem.
vis declared as:i.e. an array of vectors. So the first index accesses into the array, the second accesses into the vector.