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.

神奇的递归。

上一篇 下一篇

猜你喜欢

热点阅读