Hw3 Updated
Hw3 Updated
Hw3 Updated
Due: Wednesday, January 29 at the BEGINNING of lecture. Your work should be readable as well as correct. You should refer to the written homework guidelines on the course website for a reminder about what is acceptable pseudocode. Please write your section at the top of your homework.
Update: Homework 3 consists of the first three problems (the ones on AVL trees). Problem 4 is being transferred to assignment 4.
Problem 4 is NOT due this week, it will be added as problem 1 for HW 4. Problem 4: B-Tree Insertion
Show the result of inserting 38, 11, 17, 3, 42, 51, 7, 14 & 15 in that order into an initially empty B tree with M = 3 and L = 2. (Recall the text, lecture, and this problem call a B tree what many call a B+ tree.) Show the tree after each insertion, clearly labeling which tree is which. In an actual implementation, there is flexibility in how insertion overflow is handled. However, in this problem, follow these three guidelines: Always use splitting (not adoption). Split leaf nodes by keeping the smallest 2 elements in the original node and putting the 1 largest element in the new node. Split internal nodes by keeping the 2 children with the smaller values attached to the original node and attach the 2 children with the larger values to the new node.