We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2c0e21c commit 216f073Copy full SHA for 216f073
leetcode/medium/1091_shortest_path_in_binary_matrix.md
@@ -54,7 +54,6 @@ class Solution:
54
We can further improve the run-time of the BFS by using a bi-directional BFS.
55
If you imagine a circle, every time you expand the circle, the number of neighbors being visited almost doubles.
56
Now if you used two circles and expanded them both simultaneously, when they touch, it would have visited less neighbors compared to using one circle.
57
-This decreases the run-time for some inputs, worst case, is the same as the first BFS solution.
58
59
```
60
from collections import deque
0 commit comments