Dark Mode
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
-1 - A wall or an obstacle. 0 - A gate. INF - Infinity means an empty room. We use the value
For example, given the 2D grid: INF -1 0 INF INF INF INF -1 INF -1 INF -1 0 -1 INF INF After
Solution: O(n x m): Treat each coordinate of grid with 0 as a source and destination as the