Simple Python Iterative Solution ||O(H)/O(1)||🐍
\n# Complexity\n- Time complexity:\nO(H), where H is the height of tree.\n\n- Space complexity:\nO(1)\n# Code\n\nclass Solution:\n    def searchBST(self, root: 
\n# Complexity\n- Time complexity:\nO(H), where H is the height of tree.\n\n- Space complexity:\nO(1)\n# Code\n```\nclass Solution:\n    def searchBST(self, root: Optional[TreeNode], val: int) -> Optional[TreeNode]:\n        node=root\n        while(node):\n            if node.val==val:\n                return node\n            if node.val<val:\n                node=node.right\n            else:\n                node=node.left\n        return None\n\n```\nUpvote if you like it!
['Binary Search Tree', 'Python', 'Python3']