Question
3. What is the minimum number of nodes in an AVL tree of height 7? Articulate your answer 4. Suppose we allow storing duplicated keys
3. What is the minimum number of nodes in an AVL tree of height 7? Articulate your answer
4. Suppose we allow storing duplicated keys in a Balanced Binary Search Tree. That is, two elements can have the same key. Describe how to perform the operation findAllElements(k), which returns all the items with keys equal to k in a balanced search tree, and show that it runs in O(logn + s), where n is the number of nodes in the tree and s is the number of nodes with key equal to k.
5. Suppose we have 20 singleton sets, numbered 0 through 19, and we call the operation union(find(i),fin(i+5)), for i = 0,1,2,.....,14. Draw a picture of the tree-based representation of the sets that results, assuming we dont implement the union-by-size and path compression techniques
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started