You are viewing a single comment's thread. Return to all comments →
Thank you for the answer, what do you mean by level traverse order?
If my tree should be like this:
1 / \ 2 3 / / 4 5 / / / /\ 6 7 8 \ / \ 9 10 11
And my list looks likes this '( [2 3] [4 -1] [5 -1] [6 -1] [7 8] [-1 9] [-1 -1] [10 11] [-1 -1] [-1 -1] [-1 -1] )
I cannot see any level traverse order. For example how do [4, -1], [6, -1] [-1 9] get grouped together on the same branch?
Seems like cookies are disabled on this browser, please enable them to open this website
Swap Nodes
You are viewing a single comment's thread. Return to all comments →
Thank you for the answer, what do you mean by level traverse order?
If my tree should be like this:
And my list looks likes this '( [2 3] [4 -1] [5 -1] [6 -1] [7 8] [-1 9] [-1 -1] [10 11] [-1 -1] [-1 -1] [-1 -1] )
I cannot see any level traverse order. For example how do [4, -1], [6, -1] [-1 9] get grouped together on the same branch?