Validate BST
Implement a function to check if a binary tree is a binary search tree.
BST Property: For every node, all values in the left subtree are strictly less than the node, and all values in the right subtree are strictly greater.
Examples:
5
/ \
3 7 → True (valid BST)
/ \
2 4
5
/ \
3 7 → False (6 is in left subtree of 7 but > 5)
/ \
2 6
Hints
solution.py
Python ready
Test Output
▶
Click "Run Tests" to execute your code