LetsGrowMoreCommunity / DSA-Playyard

Explore the world of Data Structures and Algorithm
18 stars 51 forks source link

4.Validate Binary Search Tree (TREES) #94

Open SnehaAgarwal361 opened 2 years ago

SnehaAgarwal361 commented 2 years ago

Contribution Guidelines for this question-

-Languages available: C++, Java, Python -Well Commented Code -In the starting, add a brief explanation of the algorithm -if possible, add time and space complexity -kindly upload your code in TREES -> Language (C++, Java, Python) Folder -NO PLAGIARISM

Also, watch this video and the README section before contributing to the project. https://youtu.be/qXeaN_ZVVIc

ayushi-manmohan commented 2 years ago

Problem Description : Given the root of a binary tree, determine if it is a valid binary search tree (BST).

My Contribution Details : I'll provide the well commented Java code with the most optimal Time Complexity of O(n) and Space Complexity of O(n) using the recursive approach.

Kindly assign this issue to me.

SnehaAgarwal361 commented 2 years ago

@ayushi-manmohan You can start working on it please do take care of guidelines.

ayushi-manmohan commented 2 years ago

Okay, thanks

Ruheej1 commented 2 years ago

I would like to add solution of this ques in C++ Please assign this to me.