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. 解題思路: 先序遍歷,存下來,然後排序,找臨近兩個的最小差值。 效率不高。
相關文章
相關標籤/搜索
本站公眾號
   歡迎關注本站公眾號,獲取更多信息