CPSC 220 Fall 2005
HW 13: 2-3 Trees
Read L&C 16.2 and do the following:
- L&C Exercise 16.1
- L&C Exercise 16.2
- Show the 2-3 tree you get from inserting the values 1-15 in order into a 2-3 tree.
- A 2-3 tree of height h can hold a variable number of elements.
- What is the minimum number of elements that can be stored in a
2-3 tree of height two (that is, with three levels)? Explain your answer.
- Give a set of values
and an insertion order that will produce a tree as in (a).
- What is the maximum number of elements that can be stored in a
2-3 tree of height two (that is, with three levels)? Explain your answer.
- Give a set of values
and an insertion order that will produce a tree as in (c).