BEST C++ solutions || Recursive and iterative approach || Beats 100% !!
\n\n# Code\n\n// Recusive solution\nclass Solution {\npublic:\n    TreeNode* searchBST(TreeNode* root, int val) {\n        if(root == NULL)\n            return 
\n\n# Code\n```\n// Recusive solution\nclass Solution {\npublic:\n    TreeNode* searchBST(TreeNode* root, int val) {\n        if(root == NULL)\n            return NULL;\n        \n        if(root->val == val)\n            return root;\n        else if(val < root->val)\n            return searchBST(root->left, val);\n        else\n            return searchBST(root->right, val);\n        \n        return root;\n    }\n};\n\n// Iterative solution\nclass Solution {\npublic:\n    TreeNode* searchBST(TreeNode* root, int val) {   \n        TreeNode *curr = root;\n        while(true){\n            if(curr == NULL || val == curr->val){\n                break;\n            }\n            else if(val < curr->val)\n                curr = curr->left;\n            else\n                curr = curr->right;\n        }\n        return curr;\n    }\n};\n```
['Tree', 'Binary Search Tree', 'Binary Tree', 'C++']