Java Solution, 0 ms, Beats 100%
Java Code\n\n/**\n * Definition for a binary tree node.\n * public class TreeNode {\n *     int val;\n *     TreeNode left;\n *     TreeNode right;\n *     Tree
# Java Code\n```\n/**\n * Definition for a binary tree node.\n * public class TreeNode {\n *     int val;\n *     TreeNode left;\n *     TreeNode right;\n *     TreeNode() {}\n *     TreeNode(int val) { this.val = val; }\n *     TreeNode(int val, TreeNode left, TreeNode right) {\n *         this.val = val;\n *         this.left = left;\n *         this.right = right;\n *     }\n * }\n */\nclass Solution {\n    public TreeNode searchBST(TreeNode root, int val) {\n        while (root != null) {\n            if (val < root.val) root = root.left;\n            else if (val > root.val) root = root.right;\n            else return root;\n        }\n        return root;\n    }\n}\n```
['Tree', 'Binary Search Tree', 'Binary Tree', 'Java']