260 likes | 448 Views
Figure 12.1 A binary search tree of a) maximum height; b) minimum height. Figure 12.2 A 2-3 tree of height 3. Figure 12.3 Nodes in a 2-3 tree a) a 2-node; b) a 3-node. Figure 12.4 A 2-3 tree . Figure 12.5 a) A balanced binary search tree; b) a 2-3 tree with the same elements. Figure 12.6
E N D
Figure 12.1 A binary search tree of a) maximum height; b) minimum height
Figure 12.2 A 2-3 tree of height 3
Figure 12.3 Nodes in a 2-3 tree a) a 2-node; b) a 3-node
Figure 12.4 A 2-3 tree
Figure 12.5 a) A balanced binary search tree; b) a 2-3 tree with the same elements
Figure 12.6 a) The binary search tree of Figure 12.5a after a sequence of insertions; b) the 2-3 tree of Figure 12.5b after the same insertions
Figure 12.7 After inserting 39
Figure 12.8 a), b) The steps for inserting 38; c) the resulting tree
Figure 12.9 After inserting 37
Figure 12.10 a), b), c) The steps for inserting 36; d) the resulting tree
Figure 12.11 The tree after the insertion of 35, 34, and 33
Figure 12.12 Splitting a leaf in a 2-3 tree
Figure 12.13 Splitting an internal node in a 2-3 tree
Figure 12.14 Splitting the root of a 2-3 tree
Figure 12.15a a), b), c), d) The steps for deleting 70
Figure 12.15b-d a), b), c), d) The steps for deleting 70
Figure 12.15e e) the resulting tree
Figure 12.16 a), b), c) The steps for deleting 100; d) the resulting tree
Figure 12.17a The steps for deleting 80
Figure 12.17b and 12.17c The steps for deleting 80
Figure 12.17d and 12.17e The steps for deleting 80
Figure 12.18 Results of deleting 70, 100, and 80 from a) the binary search tree of Figure 12.5a and b) the 2-3 tree of Figure 12.5b
Figure 12.19a and 12.19b a) Redistributing values; b) merging a leaf
Figure 12.19c and 12.19d c) redistributing values and children; d) merging internal nodes
Figure 12.19e e) deleting the root