Time O(n). Space O(n).
Tag Archives: BFS
Zombie in Matrix – Python 3 (Week 12 – 12)
Time O(nm). Space O(mn).
Walls and Gates – Python 3 (Week 12 – 11)
Time O(nm). Space O(nm).
Surrounded Regions – Python 3 (Week 12 – 10)
Solution 1 BFS Time O(n * m). Space O(n * m). Solution 2 BFS