提交 8a2f374f 编写于 作者: N ningwei.shi

增加注释

上级 cfdfa288
......@@ -311,7 +311,9 @@ class Solution:
left = dp(root.left)
right = dp(root.right)
# 抢当前,则两个下家不抢
do = root.val + left[0] + right[0]
# 不抢当前,则下家随意
do_not = max(left) + max(right)
return do_not, do
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册