There was an error while loading. Please reload this page.
1 parent c05f08d commit 1b07f21Copy full SHA for 1b07f21
algorithms/dfs/dfs.cpp
@@ -3,10 +3,10 @@
3
std::vector<bool> &dfs(
4
const std::vector<std::vector<int64_t>> &graph,
5
std::vector<bool> &reachable,
6
- int node
+ int64_t node
7
) {
8
reachable[node] = true;
9
- for (int neighbour : graph[node]) {
+ for (int64_t neighbour : graph[node]) {
10
if (false == reachable[neighbour]) {
11
dfs(graph, reachable, neighbour);
12
}
algorithms/dfs/dfs.hpp
@@ -4,5 +4,5 @@
);
0 commit comments