当前位置:网站首页>LeetCode-337. House Robber III
LeetCode-337. House Robber III
2022-08-10 15:35:00 【51CTO】
The thief has found himself a new place for his thievery again. There is only one entrance to this area, called the "root." Besides the root, each house has one and only one parent house. After a tour, the smart thief realized that "all houses in this place forms a binary tree". It will automatically contact the police if two directly-linked houses were broken into on the same night.
Determine the maximum amount of money the thief can rob tonight without alerting the police.
Example 1:
Example 2:
题解:先把非叶节点补全,减少情况。
边栏推荐
猜你喜欢
A test tool for ABAP Development Tool custom service endpoint
全志V853开发板移植基于 LVGL 的 2048 小游戏
fastposter v2.9.1 programmer must-have poster generator
dedecms支持Word内容自动导入
APP automation testing with Uiautomator2
一个 ABAP Development Tool 自定义 service endpoint 的测试工具
商业版SSL证书
JS 从零手写实现一个bind方法
QOS function introduction
一个 ABAP 开发的新浪微博语义情感分析工具
随机推荐
力扣+牛客--刷题记录
Recommend a few had better use the MySQL open source client, collection!
Redis -- Nosql
JS 从零手写实现一个bind方法
scala basics
Pytest framework optimization
How to code like a pro in 2022 and avoid If-Else
FFmpeg 交叉编译
容器化 | 在 S3 实现定时备份
C#去水印软件源代码
数据类型与整型存储
全部内置函数详细认识(中篇)
Mobileye joins hands with Krypton to open a new chapter in advanced driver assistance through OTA upgrade
Containerization | Scheduled Backups in S3
Methodology of multi-living in different places
Cesium Quick Start 4-Polylines primitive usage explanation
网络工程师的背包(EDC总结推荐)
Chapter one module of the re module,
社区动态——恭喜海豚调度中国区用户组新晋 9 枚“社群管理员”
异地多活方法论