[LeetCode 270] Closest Binary Search Tree Value

Given a non-empty binary search tree and a target value, find the value in the BST that is closest to the target.

Note:

    1. Given target value is a floating point.
    1. You are guaranteed to have only one unique value in the BST that is closest to the target.

Diffculty
Easy

Similar Problems

Analysis

results matching ""

    No results matching ""