NeetCode #413LC-272HardTreesNC Algo100
← Back to All Problems#413 · #272 · Closest Binary Search Tree Value II(最接近的二叉搜索树值 II)
📌 Problem Statement & Constraints
Given the root of a binary search tree, a
target and an integer k, return the k values in the BST closest to the target, in any order. Constraints: the number of nodes is in [1, 10^4], 1 <= k <= n, 0 <= Node.val, target <= 10^9.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!