java
If you like it pls upvote\n\n\npublic TreeNode searchBST(TreeNode root, int val) {\n    while (root != null && root.val != val) {\n        root = root.val > val
If you like it pls upvote\n```\n\npublic TreeNode searchBST(TreeNode root, int val) {\n    while (root != null && root.val != val) {\n        root = root.val > val ? root.left : root.right;\n    }\n    return root;\n}\n\n```
['Java']