C++: O(n) Simple recursion (Choosing vs Not choosing)
Approach: DFS on Tree\n On each node, Recursively store what value it would have if you choose vs not choosing it. Store both values :)\n If you choose current 
**Approach: DFS on Tree**\n* On each node, Recursively store what value it would have if you choose vs not choosing it. Store both values :)\n* If you choose current node, then you will have to add child node\'s not_choose values.\n* If you don\'t choose current node, then you can add maximum of child node\'s choose, not_choose values.\n\n```\nclass Solution {\npublic:\n    pair<int,int> findMaxMoney (TreeNode* root) {\n        if (!root) return {0, 0};\n        int choose, not_choose;\n        pair<int,int> left = findMaxMoney(root->left);\n        pair<int,int> right = findMaxMoney(root->right);\n        choose = root->val + left.second+right.second;\n        not_choose = max(left.first, left.second) + \n            max(right.first, right.second);\n        return {choose, not_choose};\n    }\n    int rob(TreeNode* root) {\n        pair<int,int> maxValue = findMaxMoney(root);\n        return max(maxValue.first, maxValue.second); \n    }\n};\n```
['Recursion', 'C']