270. Closest Binary Search Tree
2016-12-02 本文已影响0人
我是你的果果呀
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.
神奇的递归。
![](https://img.haomeiwen.com/i3805437/12cf645c8a0a955d.png)