Rust Solution
Rust\n// Definition for a binary tree node.\n// #[derive(Debug, PartialEq, Eq)]\n// pub struct TreeNode {\n//   pub val: i32,\n//   pub left: Option<Rc<RefCell<
```Rust\n// Definition for a binary tree node.\n// #[derive(Debug, PartialEq, Eq)]\n// pub struct TreeNode {\n//   pub val: i32,\n//   pub left: Option<Rc<RefCell<TreeNode>>>,\n//   pub right: Option<Rc<RefCell<TreeNode>>>,\n// }\n// \n// impl TreeNode {\n//   #[inline]\n//   pub fn new(val: i32) -> Self {\n//     TreeNode {\n//       val,\n//       left: None,\n//       right: None\n//     }\n//   }\n// }\n\n\nuse std::rc::Rc;\nuse std::cell::RefCell;\nimpl Solution {\n    pub fn sorted_array_to_bst(nums: Vec<i32>) -> Option<Rc<RefCell<TreeNode>>> {\n        if nums.is_empty() {\n            return None;\n        }\n        let mid = nums.len() / 2;\n        let mut root = Rc::new(RefCell::new(TreeNode::new(nums[mid])));\n        root.borrow_mut().left = Self::sorted_array_to_bst(nums[..mid].to_vec());\n        root.borrow_mut().right = Self::sorted_array_to_bst(nums[mid+1..].to_vec());\n        Some(root)\n    }\n}\n```
[]