题目:Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).
对于题目的分析:这个题目要求判断给定的这棵树是不是关于根节点对称。对于根节点而言,首先需要判断根节点是不是为None形式&#…
题目要求: Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are not.
You need to merge them into a new binary tree. The merge rule is that if two no…
题目:Given a binary search tree and the lowest and highest boundaries as L and R, trim the tree so that all its elements lies in [L, R] (R > L). You might need to change the root of the tree, so the result should return the new root of the tr…