530. Minimum Absolute Difference in BST
题目大意
Given the root of a Binary Search Tree (BST), return the minimum absolute difference between the values of any two different nodes in the tree.
中文释义
给定一个二叉搜索树(BST)的根节点,返回树中任意两个不同节点的值之间的最小绝对差。
示例
示例 1:
输入: root
= [4,2,6,1,3]
输出: 1
示例 2:
输入: root
= [1,0,48,null,null,12,49]
输出: 1
限制条件
- 树中节点的数量范围是
[2, 10^4]
。 0 <= Node.val <= 10^5