question: public int rob ( TreeNode root ) { int [ ] res = dfs ( root ) ; return Math . max ( res [ 0 ] , res [ 1 ] ) ; }
target:  If current house is robbed, then subtrees' roots cannot be robbed. The maximum is root.val + rob(root.left.left) + rob(root.left.right) + rob(root.right.left) + rob(root.right.right) If current house is robbed, then subtrees' roots can be robbed. The maximum is rob(root.left) + rob(root.right) The base case is where we don't need to calculate sub problems. When root is null in our case. Just return 0.