MCQOPTIONS
Saved Bookmarks
This section includes 16 Mcqs, each offering curated multiple-choice questions to sharpen your Data Structures and Algorithms knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
What will be the order of new heap created after union of heap H1 and H2 when created by the following code.Initially both are of the order n. |
| A. | n+1 |
| B. | n+n/2 |
| C. | nlogn |
| D. | 2*nView Answer |
| Answer» B. n+n/2 | |
| 2. |
What is wrong with the following code of insertion in fibonacci heap.Choose the correct option |
| A. | Line -11 |
| B. | Line -3 |
| C. | Line 9 |
| D. | Line 7View Answer |
| Answer» D. Line 7View Answer | |
| 3. |
The Statement “Fibonacci heap has better amortized running time in compare to a binomial heap”. |
| A. | True |
| B. | False |
| Answer» B. False | |
| 4. |
Which of these operations have same complexities? |
| A. | Insertion, find_min |
| B. | Find_min, union |
| C. | Union, Insertion |
| D. | Deletion, Find _max |
| Answer» D. Deletion, Find _max | |
| 5. |
What does this pseudo_code return ? |
| A. | Last added element to heap |
| B. | First element added to heap |
| C. | Root of the heap |
| D. | Leftmost node of the heapView Answer |
| Answer» D. Leftmost node of the heapView Answer | |
| 6. |
Given the pseudo code, state whether the function for merging of two heap is correct or not? |
| A. | True |
| B. | FalseView Answer |
| Answer» B. FalseView Answer | |
| 7. |
LAST_ADDED_ELEMENT_TO_HEAP?$ |
| A. | First element added to heap |
| B. | Root of the heap |
| C. | Leftmost node of the heap |
| Answer» B. Root of the heap | |
| 8. |
The Statement “Fibonacci heap has better amortized running time in compare to a binomial heap”.$# |
| A. | True |
| B. | False |
| Answer» B. False | |
| 9. |
Which of these operations have same complexities?$ |
| A. | Insertion, find_min |
| B. | Find_min, union |
| C. | Union, Insertion |
| D. | Deletion, Find _max |
| Answer» B. Find_min, union | |
| 10. |
Choose the option with function having same complexity for a fibonacci heap. |
| A. | Insertion, Union |
| B. | Insertion, Deletion |
| C. | extract_min, insertion |
| D. | Union, delete |
| Answer» B. Insertion, Deletion | |
| 11. |
Given a heap of n nodes.The maximum number of tree for building the heap is. |
| A. | n |
| B. | n-1 |
| C. | n/2 |
| D. | logn |
| Answer» D. logn | |
| 12. |
Time taken in decreasing the node value in a binomial heap is |
| A. | O(n) |
| B. | O(1) |
| C. | O(logn) |
| D. | O(nlogn) |
| Answer» D. O(nlogn) | |
| 13. |
What is order of resultant heap after merging two tree of order k? |
| A. | 2*k |
| B. | k+1 |
| C. | k*k |
| D. | k+logk |
| Answer» D. k+logk | |
| 14. |
In a binomial heap the root value is greater than left child and less than right child. |
| A. | True |
| B. | False |
| Answer» C. | |
| 15. |
The number of trees in a binomial heap with n nodes is |
| A. | logn |
| B. | n |
| C. | nlogn |
| D. | n/2 |
| Answer» B. n | |
| 16. |
The main distinguishable characterstic of a binomial heap from a binary heap is that |
| A. | it allows union operations very efficiently |
| B. | it does not allow union operations that could easily be implemented in binary heap |
| C. | the heap structure is not similar to complete binary tree |
| D. | the location of child node is not fixed i.e child nodes could be at level (h-2) or (h-3), where h is height of heap and h>4 |
| Answer» B. it does not allow union operations that could easily be implemented in binary heap | |