Simple || BST || Beats 100%✅
\n\nclass Solution {\n    public TreeNode searchBST(TreeNode root, int val) {\n        if(root!=null) {\n            if(root.val == val) {\n                retu
\n```\nclass Solution {\n    public TreeNode searchBST(TreeNode root, int val) {\n        if(root!=null) {\n            if(root.val == val) {\n                return root;\n            }else if(root.val > val) {\n                return searchBST(root.left,val);\n            }else{\n                return searchBST(root.right,val);\n            }\n        }\n        return null;\n    }\n}\n```\n![upv.jpeg](https://assets.leetcode.com/users/images/b62c59fe-cb8f-4a4d-a659-8fe6f5175f26_1691412501.8096478.jpeg)\n
['Java']