[C++] One-Line Recursive / Two-Line Iterative
Recursive:\ncpp\nTreeNode* searchBST(TreeNode* root, int val) {\n\treturn (!root || root->val == val) ? root : root->val < val ? searchBST(root->right, val) : s
## Recursive:\n```cpp\nTreeNode* searchBST(TreeNode* root, int val) {\n\treturn (!root || root->val == val) ? root : root->val < val ? searchBST(root->right, val) : searchBST(root->left, val); \n}\n```\n---\n## Iterative:\n```cpp\nTreeNode* searchBST(TreeNode* root, int val) {\n\twhile(root && root->val != val) root = root->val < val ? root->right : root->left;\n\treturn root;\n}\n```
['C', 'C++']