摘要: Write a function that given a BST, it will return the distance (number of edges) between 2 nodes. For example, given this tree 5 / \ 3 6 / \ \ 2 4 7 / 阅读全文
posted @ 2020-08-06 13:15 Schwifty 阅读(178) 评论(0) 推荐(0)
摘要: Given a Binary Search Tree (BST) with the root node root, return the minimum difference between the values of any two different nodes in the tree. Exa 阅读全文
posted @ 2020-08-06 13:09 Schwifty 阅读(91) 评论(0) 推荐(0)
摘要: Given a binary search tree with non-negative values, find the minimum absolute difference between values of any two nodes. Example: Input: 1 \ 3 / 2 O 阅读全文
posted @ 2020-08-06 12:53 Schwifty 阅读(115) 评论(0) 推荐(0)