Leetcode 1162. As Far from Land as Possible Type: Search (bfs) Approach: The key idea to solve the problem is that find all land cells and use bfs to search for water cells. Complexity: Time: O(n) Space: O(n)