Leetcode 0270. Closest Binary Search Tree Value
Posted on Fri 22 November 2024 in Leetcode Premium • Tagged with bst, binary-search
Question Link : https://leetcode.com/problems/closest-binary-search-tree-value/
Difficulty: Easy
Premium: True
Question
Given the root of a binary search tree and a target value, return the value in the BST that is closest to the target. If there are multiple answers, print the smallest. Example 1:
Input: root = [4,2 …
Continue reading