1091. Shortest Path in Binary Matrix

A*

https://leetcode.com/problems/shortest-path-in-binary-matrix/discuss/313347/A*-search-in-Python

time: O(nlogn)

space: O(n)

之後回來寫

pure BFS

time: O(n^2)

space: O(n^2)

Last updated

Was this helpful?