first thought
- The same as problem 1
- How to save the node list is need to consider carefully.
- The same root value may contains different sub nodes, so the return of the recursion must be a list too.
- Iterate the leftNodes and rightNodes, create different roots to set them.
solution
|
|