Validate a Binary Search Tree

easy
Unit 5 · Trees0/3 to milestone

Return True if a binary tree is a valid BST: every node's value is strictly greater than all values in its left subtree and strictly less than all in its right subtree. Checking only immediate children is not enough.

TreeNode and build(values) are provided.

#trees#bst#recursion2 visible + 1 hidden tests
solution.py · Python 3.13
Loading editor…
Run your code to see results. ⌘↵ to run · ⌘⇧↵ to submit
Validate a Binary Search Tree · TechGradify