InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 51. |
What is the time complexity for decreasing priority of key in a maximum ternary heap of n elements?(a) O (log n/ log 3)(b) O (3log n/ log 3)(c) O (n)(d) O (1)This key question is from Ternary heap in section Heap of Data Structures & Algorithms IThis question was posed to me in examination. |
|
Answer» Correct choice is (B) O (3log n/ log 3) |
|
| 52. |
What is the time complexity for increasing priority of key in a minimum ternary heap of n elements?(a) O (log n/ log 3)(b) O (3log n/ log 3)(c) O (n)(d) O (1)This interesting question is from Ternary heap topic in section Heap of Data Structures & Algorithms II had been asked this question by my school principal while I was bunking the class. |
|
Answer» The correct answer is (b) O (3LOG n/ log 3) |
|
| 53. |
What is the time complexity for deleting root key in a ternary heap of n elements?(a) O (log n/ log 3)(b) O (3log n/ log 3)(c) O (n)(d) O (1)I need to ask this question from Ternary heap topic in portion Heap of Data Structures & Algorithms IThis question was posed to me in a job interview. |
|
Answer» The correct OPTION is (b) O (3log N/ log 3) |
|
| 54. |
What is the time complexity for increasing priority of key in a maximum ternary heap of n elements?(a) O (log n/ log 3)(b) O (n!)(c) O (n)(d) O (1)This key question is from Ternary heap topic in chapter Heap of Data Structures & Algorithms II got this question during an interview. |
|
Answer» The correct choice is (a) O (log N/ log 3) |
|
| 55. |
What is the time complexity for decreasing priority of key in a minimum ternary heap of n elements?(a) O (log n/ log 3)(b) O (n!)(c) O (n)(d) O (1)Enquiry is from Ternary heap topic in section Heap of Data Structures & Algorithms II have been asked this question during an online interview. |
|
Answer» The correct option is (a) O (log N/ log 3) |
|
| 56. |
Is decrease priority operation performed more quickly in a ternary heap with respect to the binary heap.(a) True(b) FalseThis question is from Ternary heap in chapter Heap of Data Structures & Algorithms IThe question was posed to me in semester exam. |
|
Answer» Correct option is (a) True |
|
| 57. |
What is the time complexity for inserting a new item in a ternary heap of n elements?(a) O (log n/ log 3)(b) O (n!)(c) O (n)(d) O (1)The query is from Ternary heap in portion Heap of Data Structures & Algorithms II got this question in final exam. |
|
Answer» The CORRECT answer is (a) O (log n/ log 3) |
|
| 58. |
Who invented d-ary heap?(a) Carl Rick(b) Alan Turing(c) Donald Johnson(d) EuclidQuestion is from Ternary Heap topic in chapter Heap of Data Structures & Algorithms II had been asked this question in a job interview. |
|
Answer» The CORRECT answer is (c) DONALD Johnson |
|
| 59. |
What is a ternary heap?(a) An array with three elements(b) Linked list with three elements(c) Tree with three children(d) Heap with all nodes having three childrenThe doubt is from Ternary Heap in portion Heap of Data Structures & Algorithms IThe question was asked in an interview for job. |
|
Answer» Right OPTION is (d) HEAP with all nodes having THREE children |
|
| 60. |
Is the priority queue abstract data type.(a) True(b) FalseThis interesting question is from Ternary Heap in chapter Heap of Data Structures & Algorithms II had been asked this question in class test. |
|
Answer» Correct OPTION is (a) True |
|
| 61. |
Which type of data structure is a ternary heap?(a) Array(b) Hash(c) Priority Queue(d) Priority StackThe above asked question is from Ternary Heap in chapter Heap of Data Structures & Algorithms II had been asked this question during an interview for a job. |
|
Answer» The correct option is (c) Priority Queue |
|
| 62. |
What is the process of building a ternary heap called?(a) Heapify(b) Hashing(c) Linking(d) MergingMy question is based upon Ternary Heap topic in chapter Heap of Data Structures & Algorithms IThe question was asked in a job interview. |
|
Answer» Right choice is (a) Heapify |
|
| 63. |
Should leaves in ternary heap be distributed from left to right.(a) True(b) FalseThis interesting question is from Ternary Heap topic in portion Heap of Data Structures & Algorithms IThe question was asked during an interview. |
|
Answer» The correct option is (a) True |
|
| 64. |
Which property should ternary heap hold for execution?(a) Associative(b) Commutative(c) Tree(d) HeapQuery is from Ternary Heap topic in portion Heap of Data Structures & Algorithms II had been asked this question in an online interview. |
|
Answer» Correct answer is (d) Heap |
|
| 65. |
What is the height of a given minimum ternary heap?(a) 1(b) 10(c) 2(d) 24The question is from Ternary Heap in portion Heap of Data Structures & Algorithms II have been asked this question in a national level competition. |
|
Answer» Right option is (a) 1 |
|
| 66. |
What are the siblings of smallest element of the given maximum ternary heap?(a) 31(b) 12(c) 18(d) 22This intriguing question originated from Ternary Heap topic in portion Heap of Data Structures & Algorithms II had been asked this question in an online quiz. |
|
Answer» The correct answer is (c) 18 |
|
| 67. |
What is the child of smallest element of the given minimum ternary heap?(a) 1(b) 10(c) 22(d) 24My query is from Ternary Heap in section Heap of Data Structures & Algorithms II had been asked this question in an online interview. |
|
Answer» The CORRECT choice is (B) 10 |
|
| 68. |
What is the highest element of the given maximum ternary heap?(a) 31(b) 10(c) 18(d) 20The doubt is from Ternary Heap in chapter Heap of Data Structures & Algorithms II got this question in unit test. |
|
Answer» Right option is (a) 31 |
|
| 69. |
What is the smallest element of the given minimum ternary heap?(a) 1(b) 10(c) 18(d) 20The doubt is from Ternary Heap topic in section Heap of Data Structures & Algorithms IThis question was addressed to me during an interview for a job. |
|
Answer» RIGHT option is (a) 1 For explanation: Ternary heap is a type of data structure in the field of computer SCIENCE. It is a part of the Heap data structure family. Minimum ternary heap has the smallest element as its ROOT NODE. The parent node is all EITHER equal or less than children node in a minimum ternary heap. |
|
| 70. |
On which data structure is a d-ary heap based?(a) stack(b) queue(c) linked list(d) priority queueI'd like to ask this question from Heap in portion Heap of Data Structures & Algorithms IThe question was posed to me in a national level competition. |
|
Answer» CORRECT choice is (d) priority queue The best EXPLANATION: d-ary heap is a priority queue based data structure that is a GENERALIZATION of BINARY heaps. |
|
| 71. |
How many secondary operations are performed in a d-heap?(a) 1(b) 2(c) 3(d) 4The above asked question is from Heap topic in portion Heap of Data Structures & Algorithms IThe question was asked in unit test. |
|
Answer» CORRECT ANSWER is (d) 4 For explanation: The other OPERATIONS that can be performed in a d-heap are increasekey, decreasekey, buildheap and delete. |
|
| 72. |
Multiplication and division to find children and parents cannot be implemented in a d-heap.(a) true(b) falseThe question is from Heap in section Heap of Data Structures & Algorithms IThe question was asked during an interview. |
|
Answer» The correct answer is (b) false |
|
| 73. |
The following figure is an example for(a) d-heap(b) binary heap(c) leftist heap(d) skew heapI need to ask this question from Heap topic in section Heap of Data Structures & Algorithms IThis question was addressed to me in a national level competition. |
|
Answer» Right answer is (a) d-HEAP |
|
| 74. |
What is the run time efficiency of delete-min operation?(a) O(log N)(b) O(logd N)(c) O(d logd N)(d) O(d)Origin of the question is Heap in section Heap of Data Structures & Algorithms II have been asked this question in an online interview. |
|
Answer» The correct answer is (C) O(d logd N) |
|
| 75. |
How many basic operations can be performed in a d-heap?(a) 1(b) 2(c) 3(d) 4Query is from Heap in section Heap of Data Structures & Algorithms IThis question was posed to me in quiz. |
|
Answer» The CORRECT option is (b) 2 |
|
| 76. |
How many comparisons will occur while performing a delete-min operation?(a) d(b) d-1(c) d+1(d) 1Question is taken from Heap in chapter Heap of Data Structures & Algorithms IThe question was posed to me in quiz. |
|
Answer» Right choice is (b) d-1 |
|
| 77. |
What is the run time efficiency of an insertion algorithm in d-heap?(a) O(N)(b) O(log N)(c) O(logd N)(d) O(N^d)The query is from Heap topic in portion Heap of Data Structures & Algorithms IThis question was posed to me by my college director while I was bunking the class. |
|
Answer» Right option is (c) O(logd N) |
|
| 78. |
Which operation is not efficiently performed in a d-heap?(a) insert(b) delete(c) find(d) mergeThe origin of the question is Heap in chapter Heap of Data Structures & Algorithms II had been asked this question by my school principal while I was bunking the class. |
|
Answer» RIGHT option is (d) merge The best I can explain: UNLIKE FIND operation, which cannot be PERFORMED in a d-heap, the task of merging two d-heaps is very DIFFICULT. |
|
| 79. |
Which operation cannot be directly performed in a d-heap?(a) insert(b) delete(c) find(d) createMy question is based upon Heap topic in portion Heap of Data Structures & Algorithms II had been asked this question in an interview for internship. |
|
Answer» The CORRECT ANSWER is (C) find |
|
| 80. |
d-heap is shallower than a binary heap.(a) true(b) falseOrigin of the question is Heap topic in division Heap of Data Structures & Algorithms II had been asked this question in an internship interview. |
|
Answer» The CORRECT choice is (a) true |
|
| 81. |
d-heap is similar to that of a?(a) binary heap(b) fibonacci heap(c) leftist heap(d) treapQuestion is taken from Heap topic in section Heap of Data Structures & Algorithms II have been asked this question in my homework. |
|
Answer» Correct answer is (a) BINARY HEAP |
|
| 82. |
Choose the option with function having same complexity for a fibonacci heap.(a) Insertion, Union(b) Insertion, Deletion(c) extract_min, insertion(d) Union, deleteMy question is from Binomial and Fibonacci Heap in portion Heap of Data Structures & Algorithms II had been asked this question by my school teacher while I was bunking the class. |
|
Answer» The CORRECT option is (a) INSERTION, Union |
|
| 83. |
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) lognMy question is based upon Binomial and Fibonacci Heap topic in chapter Heap of Data Structures & Algorithms II had been asked this question by my school principal while I was bunking the class. |
|
Answer» The correct option is (a) n |
|
| 84. |
The Statement “Fibonacci heap has better amortized running time in compare to a binomial heap”.(a) True(b) FalseMy doubt stems from Binomial and Fibonacci Heap in chapter Heap of Data Structures & Algorithms II got this question in final exam. |
|
Answer» Correct choice is (a) True |
|
| 85. |
Which of these operations have same complexities?(a) Insertion, find_min(b) Find_min, union(c) Union, Insertion(d) Deletion, Find _maxQuery is from Binomial and Fibonacci Heap in section Heap of Data Structures & Algorithms IThis question was posed to me in an online quiz. |
|
Answer» Correct OPTION is (c) Union, Insertion |
|
| 86. |
Time taken in decreasing the node value in a binomial heap is(a) O(n)(b) O(1)(c) O(logn)(d) O(nlogn)I'm obligated to ask this question of Binomial and Fibonacci Heap in portion Heap of Data Structures & Algorithms IThe question was posed to me in exam. |
|
Answer» Correct option is (c) O(LOGN) |
|
| 87. |
What is order of resultant heap after merging two tree of order k?(a) 2*k(b) k+1(c) k*k(d) k+logkAsked question is from Binomial and Fibonacci Heap in section Heap of Data Structures & Algorithms IThis question was addressed to me in an online quiz. |
|
Answer» Right option is (B) k+1 |
|
| 88. |
In a binomial heap the root value is greater than left child and less than right child.(a) True(b) FalseAsked question is from Binomial and Fibonacci Heap topic in section Heap of Data Structures & Algorithms II had been asked this question in a job interview. |
|
Answer» CORRECT choice is (b) False The explanation is: Binomial TREE USED in MAKING binomial heap FOLLOWS min heap property. |
|
| 89. |
The number of trees in a binomial heap with n nodes is(a) logn(b) n(c) nlogn(d) n/2My question is from Binomial and Fibonacci Heap in portion Heap of Data Structures & Algorithms IThis question was posed to me in quiz. |
|
Answer» The CORRECT CHOICE is (a) logn |
|
| 90. |
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>4My enquiry is from Binomial and Fibonacci Heap in portion Heap of Data Structures & Algorithms II had been asked this question by my school teacher while I was bunking the class. |
|
Answer» The correct answer is (a) it allows union OPERATIONS very EFFICIENTLY |
|
| 91. |
Theleaf node for a heap of height h will be at which position.(a) h(b) h-1(c) h or h-1(d) h-2This key question is from Weak Heap in portion Heap of Data Structures & Algorithms II had been asked this question during an interview. |
|
Answer» Right OPTION is (c) H or h-1 |
|
| 92. |
Does there exist a heap with seven distinct elements so that the Inorder traversal gives the element in sorted order.(a) Yes(b) NoQuestion is taken from Weak Heap in chapter Heap of Data Structures & Algorithms II got this question by my college director while I was bunking the class. |
|
Answer» Right answer is (b) No |
|
| 93. |
The total comparisons in finding both smallest and largest elements are(a) 2*n +2(b) n + ((n+1)/2) -2(c) n+logn(d) n^2Question is from Weak Heap topic in chapter Heap of Data Structures & Algorithms IThe question was posed to me in an interview. |
|
Answer» The CORRECT option is (b) N + ((n+1)/2) -2 |
|
| 94. |
What is the worst case time in searching minimum value in weak -heap?(a) O(log n)(b) O(n)(c) O(n logn)(d) O(1)This intriguing question comes from Weak Heap topic in portion Heap of Data Structures & Algorithms IThe question was posed to me in examination. |
|
Answer» The correct CHOICE is (d) O(1) |
|
| 95. |
What is the other name of weak heap?(a) Min-heap(b) Max-heap(c) Relaxed -heap(d) Leonardo heapMy doubt stems from Weak Heap topic in division Heap of Data Structures & Algorithms II have been asked this question in examination. |
|
Answer» Right answer is (c) RELAXED -HEAP |
|
| 96. |
Left child of parent node has value lesser than the parent node.(a) True(b) FalseOrigin of the question is Weak Heap in portion Heap of Data Structures & Algorithms IThis question was posed to me in quiz. |
|
Answer» The correct choice is (B) False |
|
| 97. |
Choose the correct properties of weak-heap.(a) Every node has value greater than the value of child node(b) Every right child of node has greater value than parent node(c) Every left child of node has greater value than parent node(d) Every left and right child of node has same value as parent nodeThe question is from Weak Heap in division Heap of Data Structures & Algorithms II had been asked this question during an interview for a job. |
|
Answer» Right option is (B) Every right CHILD of node has greater value than parent node |
|
| 98. |
Given an array of element 5, 7, 9, 1, 3, 10, 8, 4. Which of the following are the correct sequences of elements after inserting all the elements in a min-heap?(a) 1,3,4,5,7,8,9,10(b) 1,4,3,9,8,5,7,10(c) 1,3,4,5,8,7,9,10(d) 1,3,7,4,8,5,9,10My doubt stems from Binary Heap in section Heap of Data Structures & Algorithms IThe question was asked during an online exam. |
|
Answer» The CORRECT choice is (a) 1,3,4,5,7,8,9,10 |
|
| 99. |
What is the location of a parent node for any arbitary node i?(a) (i/2) position(b) (i+1)/ position(c) floor(i/2) position(d) ceil(i/2) positionThe above asked question is from Binary Heap topic in chapter Heap of Data Structures & Algorithms IThis question was posed to me by my school teacher while I was bunking the class. |
|
Answer» Right choice is (c) floor(i/2) position |
|
| 100. |
What is the best case complexity in building a heap?(a) O(nlogn)(b) O(n^2)(c) O(n*longn *logn)(d) O(n)Origin of the question is Binary Heap in portion Heap of Data Structures & Algorithms IThe question was asked by my school teacher while I was bunking the class. |
|
Answer» The correct OPTION is (d) O(n) |
|