2. Given the following 2-3 tree. 33 3 10 struct { 11 15 Show the tree after each operation (a) Delete 10 (b) 12 18 23 44
Posted: Fri Jul 01, 2022 5:51 am
2. Given the following 2-3 tree. 33 3 10 struct { 11 15 Show the tree after each operation (a) Delete 10 (b) 12 18 23 44 Delete 50 Delete 23 (Using its inorder predecessor) Delete 1 45 55 50 Delete 18 (Should be at the root, use the inorder predecessor) Assume cach node in a 2-3 Tree contains the following bTreeNode int amount of Items; //denote the amount of keys in a node int keys [2]; //list of keys in a node bTreeNode* children [3]; // children pointers for a node bTreeNode* find (bTreeNoder, int searchKey); 60 66 }; Assume you have a pointer bTreeNode root that points to the root node, write the code or pseudo code that finds the node in the tree with a matching key, below is the function prototype (Assume when the function is initially called, the root pointer is passed in, returns NULL if key searchkey is not found)