[C++] old/new recursion/iteration = 4-solution
\n//with BST property\nclass Solution { // Recusion\npublic: // Time/Space: O(h); O(h); h is height of BST\n    TreeNode* searchBST(TreeNode* root, int val) {\n
```\n//with BST property\nclass Solution { // Recusion\npublic: // Time/Space: O(h); O(h); h is height of BST\n    TreeNode* searchBST(TreeNode* root, int val) {\n        if(!root) return nullptr;\n        if(root->val == val) return root;\n        return root->val > val ? searchBST(root->left, val) : searchBST(root->right, val) ;        \n    }\n};\n\n```\n\n```\n//with BST property\nclass Solution {//BEST:  Iteration\npublic: // Time/Space: O(h); O(1); h is height of BST\n    TreeNode* searchBST(TreeNode* root, int val) {\n        while(root && root->val != val)\n            root=root->val > val ? root->left : root->right;\n        return root;\n    }\n};\n```\n\n```\n// without using BST property\nclass Solution { // Recursion + classical C++\npublic: // Time/Space: O(h); O(h); h is height of BST\n    TreeNode* searchBST(TreeNode* root, int val) {\n        if(!root) return nullptr;\n        if(root->val == val) return root;\n        TreeNode* left = searchBST(root->left, val);\n        if(left) return left;\n        TreeNode* right = searchBST(root->right, val);\n        if(right) return right;\n        return nullptr;\n    }\n};\n\n```\n\n\n```\n// without using BST property\nclass Solution { // Recursion + Modern C++\npublic: // Time/Space: O(N); O(N)\n    TreeNode* searchBST(TreeNode* root, int val) {        \n        if(root){\n            if(root->val == val) return root;\n            for(auto e: {root->left, root->right}){\n                auto ret = searchBST(e, val);\n                if(ret) return ret;\n            }        \n        }\n        return nullptr;\n    }\n};\n```
[]