Validate Binary Search Tree
Medium
Binary Search Tree
Given a binary tree in level-order form, determine whether it is a valid BST: for every node, all values in the left subtree are strictly smaller and all values in the right subtree are strictly greater.
Constraints
1 <= number of nodes <= 10^4 -2^31 <= value <= 2^31 - 1
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.