Problem Description
Loading...
Problem Analysis
Ask how many oil regions
Note that as long as there is oil in any of the eight directions
then this region is considered connected
so just use dfs to flood-fill
cpp
| |
Ask how many oil regions
Note that as long as there is oil in any of the eight directions
then this region is considered connected
so just use dfs to flood-fill
| |
Loading...