Skip to content

Commit 6908cd2

Browse files
authored
Update house_robber_iii.py
1 parent 72ef73f commit 6908cd2

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

house_robber_iii.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- coding: utf-8 -*-
1+
# coding: utf-8
22

33
class Solution:
44
# @param {TreeNode} root, the root of binary tree.
@@ -15,4 +15,6 @@ def _houseRobber3(self, root):
1515
rob_right = self._houseRobber3(root.right)
1616
not_rob = rob_left[1] + rob_right[1] + root.val
1717
rob = max(rob_left) + max(rob_right)
18-
return (not_rob, rob)
18+
return (not_rob, rob)
19+
20+
# medium: http://lintcode.com/zh-cn/problem/house-robber-iii/

0 commit comments

Comments
 (0)