图遍历
Data Structures & Algorithms · 3 notes
- Unique Pathshistorical
A robot starts at the top-left corner of an m × n grid and can move only down or right. Count the paths to the bottom-right corner.
- Number of Islandshistorical
Given a 2D grid consisting of '1' (land) and '0' (water), calculate the number of islands in the grid.
- Maximal Squarehistorical
In a 2D matrix consisting of '0' and '1', find the largest square containing only '1' and return its area.