I am trying to start this problem dealing with rotating a tree to the left and printing it with proper indentation but I'm confused as to how this is going to work. The binary tree is show as follows:
10 / \ 5 20 / \ 2 7 / 6
and the output needs to be:
20 10 7 6 5 2
I can see that the 20 replaces the 10, the 10 replaces the 5, the 5 replaces the 2 and so on.. however in the textbook the output is exactly as I printed it- with no lines connecting the nodes. Any help is highly appreciated.