摘要:
In a binary tree, a lonely node is a node that is the only child of its parent node. The root of the tree is not lonely because it does not have a par 阅读全文
摘要:
A binary tree is univalued if every node in the tree has the same value. Return true if and only if the given tree is univalued. Example 1: Input: [1, 阅读全文
摘要:
Given the root node of a binary search tree and two integers low and high, return the sum of values of all nodes with a value in the inclusive range [ 阅读全文
摘要:
Given the root of a binary search tree, rearrange the tree in in-order so that the leftmost node in the tree is now the root of the tree, and every no 阅读全文
摘要:
Consider all the leaves of a binary tree, from left to right order, the values of those leaves form a leaf value sequence. For example, in the given t 阅读全文
摘要:
You are given the root of a binary search tree (BST) and an integer val. Find the node in the BST that the node's value equals val and return the subt 阅读全文