MCQOPTIONS
Saved Bookmarks
| 1. |
Given the code ,choose the correct option that is consistent with the code build(A,i) left-> 2*i right->2*i +1 temp- > i if(left<= heap_length[A] ans A[left] >A[temp]) temp -> left if (right = heap_length[A] and A[right] > A[temp]) temp->right if temp!= i swap(A[i],A[temp]) build(A,temp) Here A is the heap |
| A. | It is the build function of max heap |
| B. | It is the build function of min heap |
| C. | It is general build function of any heap |
| D. | None of the mentioned |
| Answer» B. It is the build function of min heap | |