forked from wisdompeak/LeetCode
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit 06e55b3
authored
Update 1778.Shortest-Path-in-a-Hidden-Grid.cpp
起始点是500, 数据范围是 1<= i , j <= 500, 所以最大点可能是[999,999],但是因为最大点还需要检测边界,所以需要1001的长度(OJ Case 36)。
把矩阵改成1001之后提示stackoverflow, 把 dir 和 move 拉出去就可以通过了。1 parent 866c184 commit 06e55b3
File tree
1 file changed
+6
-8
lines changed- DFS/1778.Shortest-Path-in-a-Hidden-Grid
1 file changed
+6
-8
lines changedLines changed: 6 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
15 | - | ||
16 | - | ||
17 | - | ||
15 | + | ||
16 | + | ||
17 | + | ||
18 | + | ||
19 | + | ||
18 | 20 |
| |
19 | 21 |
| |
20 | 22 |
| |
21 | 23 |
| |
22 | 24 |
| |
23 | - | ||
24 | - | ||
25 | - | ||
25 | + | ||
26 | 26 |
| |
27 | 27 |
| |
28 | 28 |
| |
| |||
56 | 56 |
| |
57 | 57 |
| |
58 | 58 |
| |
59 | - | ||
60 | - | ||
61 | 59 |
| |
62 | 60 |
| |
63 | 61 |
| |
|
0 commit comments