Search
⌘K

Leetcode 700. Search in a Binary Search Tree

Given the root of a binary search tree and a target value, return the subtree rooted at the node whose value equals the target (or null if no such node exists). Use the BST ordering to locate the node efficiently in O(height) time.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.