Skip to main content
Validate Binary Search Tree | AlgoCracked
AlgoCracked
ProblemsValidate Binary Search Tree
Medium32.0% acceptance
Blind75TreeDfsBinary Search Tree

Validate Binary Search Tree

Return true if a binary tree is a valid binary search tree : every node in a left subtree is strictly less than the node, every node in a right subtree strictly greater, and both subtrees are themselves valid BSTs. Input format Level-order JSON array with nulls, e.g. [[2,1,3]] . TreeNode is predefined.

Loading workspace…