Chapter 12 Outcomes
Trees
Knowledge Outcomes
Define each of the key terms listed in the chart below.
| binary tree | node | left & right subtrees |
| root | ordered binary tree | binary search tree |
| balanced tree | search space | leaf node |
| heap | child node | parent node |
| inorder traversal | preorder traversal | depth of a binary search tree |
| height of a node |
Describe the structure of a binary tree. Include relevant terms such as node, left and right subtree, and root (12.1).
State the definition of an ordered binary tree (or a binary search tree) (12.1).
Explain how a binary tree is searched (12.1).
Describe how the RecursiveDisplay procedure accomplishes its task (12.2).
State the relationship of the parent and child nodes in a heap (12.3).
Describe the arithmetic relationship between children and parent nodes in a heap that is implemented as an array (12.3).
Explain how the removeLargest procedure removes the next largest element from the heap and then restores the heap property (12.3).
Describe how final storage of the sorted numbers is combined with the heap array to produce a sorted array (12.3).
Discuss the efficiency of the heap sort algorithm in big O notation (12.1 - 12.3).
Skills Outcomes
Trace the Enter procedure in the "treescl.tu" class and explain how this algorithm inserts new items into their correctly ordered position (use diagrams where necessary) (12.2).
Using an array, rearrange a list of unordered numbers (or words) into its correct order by tracing through the insertHeap procedure (12.3).