Question: Please answer these multiple choice questions. 37. - 43. Answer the following questions based on this tree: 37. Write the complete binary tree as an
Please answer these multiple choice questions.


37. - 43. Answer the following questions based on this tree: 37. Write the complete binary tree as an array. (a) 1614121078965114 (c) 1614108976512114 (b) 1614121071148965 (d) 8910657141141216 38. If the element 18 is added to the heap, what elements will it be swapped with to fix the heap? (a) 11,12,16 (c) 11,12 (b) 5,7,14,16 (d) 8,10,14 39. If the heap is popped, which element will be removed and returned? (a) 16 (c) 5 (b) 8 (d) 4 40. If the heap is popped, which swaps will happen to fix the heap? (a) 165,5124 (c) 165,514109 (b) 1614109 (d) 161211 41. How long does it take to add an element to a heap? (a) O(logn) (c) O(1) (e) O(n) (b) O(n2) (d) O(nlogn) 42. How long does it take to access the maximum element in a heap? (a) O(logn) (c) O(1) (e) O(n) (b) O(n2) (d) O(nlogn) 43. How long does it take to pop a heap? (a) O(logn) (c) O(1) (e) O(n) (b) O(n2) (d) O(nlogn)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
