Back to Questions

Find Closest Value in BST

140.1K viewsAsked at Meta
Easy

Question Explain

Given the root of a Binary Search Tree and a target value, find the node's value that is closest to the target. Optimize by using the BST property to avoid unnecessary branches.

Start Trying This Question Simulation

Practice answering orally or with text to get instant AI feedback.

Practice with This Question