CPSC 327 | Data Structures and Algorithms | Spring 2024 |
Draw the tree resulting from each insertion/removal step. If swaps are needed, swap the element with its successor. When splitting a node, promote the leftmost middle element.
Insert the elements 5, 16, 22, 45, 2, 10, 18, 30, 50, 12, 47 into an initially-empty 2-4 tree.
Remove the elements 75, 50, 100, 65, 40, 5, 60, 80 from the 2-4 tree shown.