avinash201199 / DSA-Questions

Collection of data structure and algorithms questions
https://www.instagram.com/lets__code/
MIT License
75 stars 170 forks source link

Binary Search Tree Validation #354

Open arihantthriwe opened 2 years ago

arihantthriwe commented 2 years ago

Given a binary tree root, return whether it's a binary search tree. A binary tree node is a binary search tree if : ------(C++)

  1. All nodes on its left subtree are smaller than node.val
  2. All nodes on its right subtree are bigger than node.val
  3. All nodes hold the these properties.

Constraint : n ≤ 100,000 where n is the number of nodes in root

arihantthriwe commented 2 years ago

Please assign me this :)