64: Merge two binary trees
Given two binary trees, return a merged tree
Merge rules:
- return
sumif both nodes are exist - if a right node is
nullreturn left node - if a left node is
nullreturn right node
Example 1
Input: one = 1 two = 2
/ \ \
5 3 4
Output: 3
/ \
5 7
Example 1
Input: one = 1 two = 2
/ \
5 4
Output: 3
/ \
5 4
Helpful article