Complete the code to check if the current node is None.
if [1].is_none() { return true; }
We check if the node itself is None to know if we reached a leaf.
Complete the code to get the value of the current node safely.
let val = [1].as_ref().unwrap().val;We use node.as_ref().unwrap() to get a reference to the node and then access val.
Fix the error in the comparison to check if left subtree max is less than current node value.
if let Some(max_left) = [1] { if max_left >= val { return false; } }
We compare the maximum value from the left subtree with the current node's value.
Fill both blanks to update the min and max values for the current subtree.
let min_val = [1].unwrap_or(val).min(val); let max_val = [2].unwrap_or(val).max(val);
We update min_val using left_min and max_val using right_max to cover the whole subtree.
Fill all three blanks to recursively validate left and right subtrees and return combined result.
return [1](node.as_ref().unwrap().left.as_ref(), [2], [3]) && [1](node.as_ref().unwrap().right.as_ref(), [2], [3]);
We recursively call is_bst_helper on left and right children passing updated min and max values.
