Skip to content

Commit 2008f6b

Browse files
authored
Update 1306.Jump-Game-III.cpp
1 parent d3fa516 commit 2008f6b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

DFS/1306.Jump-Game-III/1306.Jump-Game-III.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,13 @@ class Solution {
1111
return false;
1212

1313
visited[start] = 1;
14+
1415
if (canReach(arr, start-arr[start]))
1516
return true;
1617

1718
if (canReach(arr, start+arr[start]))
1819
return true;
1920

20-
visited[start] = 1;
21-
2221
return false;
2322
}
2423
};

0 commit comments

Comments
 (0)