Rust dfs solution
rust\nuse std::rc::Rc;\nuse std::cell::RefCell;\nimpl Solution {\n    pub fn rob(root: Option<Rc<RefCell<TreeNode>>>) -> i32 {\n        let ret = Solution::dfs(
```rust\nuse std::rc::Rc;\nuse std::cell::RefCell;\nimpl Solution {\n    pub fn rob(root: Option<Rc<RefCell<TreeNode>>>) -> i32 {\n        let ret = Solution::dfs(&root);\n        std::cmp::max(ret.0, ret.1)\n    }\n    fn dfs(node: &Option<Rc<RefCell<TreeNode>>>) -> (i32, i32) {\n        if let Some(n) = node {\n            let l = Solution::dfs(&n.borrow().left);\n            let r = Solution::dfs(&n.borrow().right);\n            (\n                n.borrow().val + l.1 + r.1,\n                std::cmp::max(l.0, l.1) + std::cmp::max(r.0, r.1),\n            )\n        } else {\n            (0, 0)\n        }\n    }\n}\n```
['Depth-First Search', 'Rust']