leetcode伪代码-mergo-two-binary-tree:合并二叉树

时间:2021-06-30 19:58:59
【文件属性】:
文件名称:leetcode伪代码-mergo-two-binary-tree:合并二叉树
文件大小:4KB
文件格式:ZIP
更新时间:2021-06-30 19:58:59
系统开源 leetcode伪代码merge-two-binary-tree 题目解读: 题目来源: 原文: 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 . 解读: 给定两个二元树Tree1, Tree2 把Tree1跟Tree2 做merge merge 规则如下: 1 假设对应的节点两个原本二元树都有值则
【文件预览】:
mergo-two-binary-tree-master
----mergeTrees_test.go(2KB)
----mergeTrees.go(2KB)
----README.md(6KB)
----.gitignore(269B)

网友评论