← Questions
Merge two named trees
0
I was asked this
No reports yet. Sign in to say where you were asked it.
Each tree node is a dictionary with a name, an integer value and an ordered list of children. Given two such trees t1 and t2, build a new merged tree that follows t1's nodes and their order and takes each node's value from the matching node in t2 when there is one. Agree on how nodes are matched and what happens to nodes found only in t2.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding
