easy rust recursive
Code\n\nuse std::rc::Rc;\nuse std::cell::RefCell;\nimpl Solution {\n    pub fn build_tree(inorder: Vec<i32>, postorder: Vec<i32>) -> Option<Rc<RefCell<TreeNode>
# Code\n```\nuse std::rc::Rc;\nuse std::cell::RefCell;\nimpl Solution {\n    pub fn build_tree(inorder: Vec<i32>, postorder: Vec<i32>) -> Option<Rc<RefCell<TreeNode>>> {\n        Self::builder(&inorder, &postorder)\n    }\n    pub fn builder(inorder: &[i32], mut postorder: &[i32]) -> Option<Rc<RefCell<TreeNode>>>{\n        if inorder.is_empty() {\n            return None\n        }\n\n        let mut root = TreeNode::new(*postorder.last().unwrap());\n\n        let in_split = inorder.split(|&val| val == root.val).collect::<Vec<&[i32]>>();\n\n        root.left = Self::builder(in_split[0], &postorder[..in_split[0].len()]);\n        root.right = Self::builder(in_split[1], &postorder[in_split[0].len()..postorder.len()-1]);\n\n        Some(Rc::new(RefCell::new(root)))\n    }\n}\n```
['Rust']