In preparation for intermediate data structures, the professor gave us last year’s test, one of which is related to the re-arrangement of the sample tree into a full binary search tree. I tried several different versions of writing a tree, but this complete example of a binary tree from Wolfram Mathematica did not help at all, since it also matches the definition of full. The tutorial defines a complete binary tree, since the tree through level n-1 is fine with some additional leaf nodes at level n, all aligned to the left.
Nodes A E I L N O P R S T U, n = 11 nodes. Here is the best answer I came up with:
R
/ \
L T
/ \ / \
I N S U
/ \ / \
A E O P
But this matches the tree example in WM, but not in the book example. So what is the correct answer?
Jason