Skip to content

Latest commit

 

History

History
7 lines (4 loc) · 334 Bytes

File metadata and controls

7 lines (4 loc) · 334 Bytes

Asked by Salesforce

Question

Write a program to merge two binary trees. Each node in the new tree should hold a value equal to the sum of the values of the corresponding nodes of the input trees.

If only one input tree has a node in a given position, the corresponding node in the new tree should match that input node.