Skip to content

Latest commit

 

History

History

18-10-2022 Salesforce

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

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.