Are you sure you're getting this? Could you figure out the right sequence for this list?
Arrange the following instructions into the correct order to merge two binary trees recursively:
Press the below buttons in the order in which they should occur. Click on them again to un-select.
Options:
- If there exists a node:
- Use pre-order traversal on the first tree
- Return the root of the updated first tree
- Continue this process for left subtrees
- Check to see if both the tree nodes are null (there exists no node in either tree)
- If there exists one node, update the first tree with the value of that node
- Continue this process for right subtrees
- If there exists two nodes, update the first tree with the sum of the values of both nodes