Validate Binary Search Tree

Check whether a binary tree satisfies the BST ordering rule.

For every node, all values in the left subtree must be strictly smaller, and all values in the right subtree must be strictly larger.

Examples
Input: [2,1,3]
Output: true
Hints
Related Problems

Validate Binary Search Tree

Check whether a binary tree satisfies the BST ordering rule.