中级农民
- 积分
- 106
- 大米
- 颗
- 鳄梨
- 个
- 水井
- 尺
- 蓝莓
- 颗
- 萝卜
- 根
- 小米
- 粒
- 学分
- 个
- 注册时间
- 2016-2-7
- 最后登录
- 1970-1-1
|
695 | max area of Island | dfs | 5/15 | dfs recursive 和iterative(stack)
判断条件是否还在grid内
是否要改变input不改变的话需要额外的O(1)空间存visited
| 690 | Employee Importance | dfs | 5/15 | 使用stack做dfs"}">使用hashmap<id, Employee> 使用stack做dfs | 100 | same tree | dfs tree | 5/15 | 判断是否为空:
1.都为空 true
2.一个为空 false
当前node值是否相等 | 733 | Flood Fill | bfs/dfs | 5/15 | |
|
|