✅Recursive solution with time complexity of O(longn)
\n## Explanation:\n\n### Solution 01\n\n- Using Recursion.\n- Here we have 4 possible cases:\n    - if(root== NULL) means we didn\u2019t find the element in the
\n## Explanation:\n\n### Solution 01\n\n- Using ***Recursion.***\n- Here we have 4 possible cases:\n    - `if(root== NULL)` means we didn\u2019t find the element in the tree, so we\u2019ll return null.\n    - `if(root->val == val)` we find our root, simply return it.\n    - `if(root->val > val)` as our current value is greater & in BST lift side we\u2019ll have smaller values, so we\u2019ll search for the left tree only.\n    - `if(root->val < val)` here current value is less so we\u2019ll simply search on the right tree.\n- **Time complexity:** O(n), worst case it can have 1node in every stage!\n\n---\n\n## Code:\n\n```cpp\n//Solution 01:\nclass Solution {\npublic:\n    TreeNode* searchBST(TreeNode* root, int val) {\n        if(root== NULL) return NULL;\n        if(root->val == val) return root;\n        if(root->val > val) return searchBST(root->left, val);\n        return searchBST(root->right, val);\n    }\n};\n```\n\n---\n\n> **Please upvote this solution**\n>
['Recursion', 'C', 'C++']