題組內容

5.(20%) Insert the following sequence of keys in order to an initially empty binary search tree: 7,16, 25,45,5, 10, 18,30,50,_ 12, 1. Suppose that each node of the tree contains a key greater than or equal to the left subtree, and smaller than or equal to the right subtree. Answer the following questions:

b. What is the output key sequence when doing a postorder traversal of the binary search tree? (Hint: The height of a tree is the number of nodes on the longest path from the root to a leaf.)