leetcode-17-BST

530. Minimum Absolute Difference in BST Given a binary search tree with non-negative values, find the minimum absolute difference between values of any two nodes. 解题思路: 先序遍历,存下来,然后排序,找临近两个的最小差值。 效率不高。
相关文章
相关标签/搜索
本站公众号
   欢迎关注本站公众号,获取更多信息