Traversal is the key

Since we started we'll need to eventually return a merged root, let's go with an pre-order traversal. Pseudocode as follows:

JAVASCRIPT
OUTPUT
Results will appear here.