Skip to content

Latest commit

 

History

History
16 lines (12 loc) · 485 Bytes

number_of_distinct_island.md

File metadata and controls

16 lines (12 loc) · 485 Bytes

Number of Distinct Islands

Prerequisite
  • require the basic knowledge of the BFS/DFS in 2D grid.
  • Extension of the flood fill.
Hint
  • make the basic flood fill first
  • then keep storing the coordinate you visit as a vector
  • and then vector as a set.
  • in order to maintain the uniqueness of the coordinate.
  • ofcourse the answer is the size of the set.