Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Is it possible to have multiple leaf nodes with the same values?
How many possible positions are there for each tree?
The root value of the final tree does not occur as a value in any of the leaves of the original tree.