Question DSA-BST-124
EasyA tree has root 10 with left child 5 and right child 8. Is it a valid BST?
- A.
Yes
- B.
Only if 5 is a leaf
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Binary Search Trees question
A tree has root 10 with left child 5 and right child 8. Is it a valid BST?
Yes
Only if 5 is a leaf
Sign up free to see the answer and a step-by-step explanation.
Only if 8 is a leaf
No, because 8 is in the right subtree but is smaller than 10