Skip to content

Commit

Permalink
Update repo by Shubhanshu
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhanshurav authored Dec 30, 2022
1 parent 6575ea0 commit 3bbb5d5
Showing 1 changed file with 1 addition and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,6 @@
*/
class Solution {
public:

// <................> Approach - 01 <................>(Recurisive Approach)
/*
TreeNode* searchBST(TreeNode* root, int val) {
if(root == NULL) return {};
if(root->val == val) return root;
if(root->val > val){
return searchBST(root->left,val);
}else{
return searchBST(root->right,val);
}
}
*/

// <................> Approach - 02 <................>(Iterative Approach)

TreeNode* searchBST(TreeNode* root, int val) {
Expand All @@ -48,4 +29,4 @@ class Solution {
return {};

}
};
};

0 comments on commit 3bbb5d5

Please sign in to comment.