Skip to content

Latest commit

 

History

History
7 lines (7 loc) · 288 Bytes

note1162.md

File metadata and controls

7 lines (7 loc) · 288 Bytes
  • 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)