Given the following tree, answer the following questions. Is it a binary tree? W
ID: 3691572 • Letter: G
Question
Given the following tree, answer the following questions. Is it a binary tree? Why? What are the depth and the height of the node containing 2? Write the postorder traversal: Write the preorder traversal: Write all internal nodes: Given: the hash function: h(x) = | 3x + 2| mod M a bucket array of capacity N a set of objects with keys: 12, 44,13, 88, 23, 94,11, 39, 20, 16, 5 (to input from left to right) Write the hash table where M=N=11 and collisions are handled using separate chaining. Write the hash table where M=N=11 and collisions are handled using linear probing. Would a size N for the bucket array exist, such that no collisions would happen with the hash function hash function h(x) = |2x + 5| mod 11 and the keys above?Explanation / Answer
Please find the answers below:
3.a. Yes. Because all the nodes have at max 2 nodes.
3.b. depth of node 2 is 1
height of node 2 is 3
3.c. Post order : 4 A B 5 2 6 7 8 9 3 1
3.d. Pre order : 1 2 4 5 A B 3 6 7 8 9
3.e. Internal node are 2, 3 and 5
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.