[Leetcode]Closest Binary Search Tree Value

来源:互联网 发布:自助点餐软件 编辑:程序博客网 时间:2024/05/16 12:57
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.
0 0
原创粉丝点击