题目: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 nodes overlap, then sum node values up as the new value of the merged node. Otherwise, the NOT null node will be used as the node of new tree.
leetcode(617):Merge Two Binary Trees

题目分析:跟刚开始做链表那一部分的题目一样,刚开始还是找不到思路,不知道该怎么入手解决问题,对于树的遍历不熟练,一下卡住了,不知道怎么来得到

相关文章: