[Leetcode] Closest Binary Search Tree Value 最近二叉搜索树值 - SegmentFault
Closest Binary Search Tree Value I
Given a non-empty binary search tree and a target value, find the value in the BST that is closest to the target.
Note: Given target value is a floating point. You are guaranteed to have only one unique value in the BST that is closest to the target.
Read full article from [Leetcode] Closest Binary Search Tree Value 最近二叉搜索树值 - SegmentFault
No comments:
Post a Comment