Complete the code to check if a node's left child value is greater than or equal to the node's value.
if (node.left && node.left.value [1] node.value) { return false; }
The BST property requires left child values to be less than the node's value.
Complete the code to check if a node's right child value is less than or equal to the node's value.
if (node.right && node.right.value [1] node.value) { return false; }
The BST property requires right child values to be greater than the node's value.
Fix the error in the BST validation condition for the left subtree.
return isBST(node.left, [1], node.value) && isBST(node.right, node.value, max);
The left subtree must have values between min and the current node's value.
Fill both blanks to complete the BST validation recursive calls with correct boundaries.
return isBST(node.left, [1], node.value) && isBST(node.right, node.value, [2]);
Left subtree values must be between min and node.value; right subtree values between node.value and max.
Fill all three blanks to complete the BST property check in the recursive function.
if (!node) return true; if (node.value [1] min || node.value [2] max) return false; return isBST(node.left, min, [3]) && isBST(node.right, node.value, max);
Check if node.value is not less or equal to min, and not greater or equal to max. Then recurse with updated boundaries.