Skip to content

Commit ade9b14

Browse files
authored
Update find-eventual-safe-states.cpp
1 parent f542eb8 commit ade9b14

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

C++/find-eventual-safe-states.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class Solution {
66
enum Color { WHITE, GRAY, BLACK };
77

88
vector<int> eventualSafeNodes(vector<vector<int>>& graph) {
9-
vector<Color> lookup(size(graph));
9+
vector<Color> lookup(size(graph), WHITE);
1010

1111
const function<bool(int)> dfs = [&](int node) {
1212
if (lookup[node] != WHITE) {

0 commit comments

Comments
 (0)