Leetcode 272. Closest Binary Search Tree Value II
Given a BST, a real-valued target and an integer k, return the k node values in the tree closest to the target. The challenge is to exploit BST ordering to produce those k nearest values efficiently (better than a full traversal), typically by generating sorted predecessors and successors and merging them.
Asked at:
LinkedIn
Amazon
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Early September, 2026
Senior
Late August, 2026
Senior
Mid January, 2026
Mid-level
Hello Interview Premium
Your account is free and you can post anonymously if you choose.