easiest soltuion || c-plus-plus || bst
Intuition\n Describe your first thoughts on how to solve this problem. \njust by using the main property of binary search tree which is left node is less than i
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\njust by using the main property of binary search tree which is left node is less than its root and right is more than its root\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\nby using its main property which is left node is less than its root and right is more than its root so if the val / targert value is less than the root then we search it in the left sub tree else in right sub tree and using the recursion for that \n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\n// please upvaote if it is helpful for u ..............\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(val<root->val) return searchBST(root->left,val);\n        else return searchBST(root->right,val);\n    }\n};\n```
['C++']