

MCQOPTIONS
Saved Bookmarks
This section includes 3 Mcqs, each offering curated multiple-choice questions to sharpen your Data Structure knowledge and support exam preparation. Choose a topic below to get started.
1. |
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,10 |
Answer» B. 1,4,3,9,8,5,7,10 | |
2. |
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) position |
Answer» D. ceil(i/2) position | |
3. |
What is the best case complexity in building a heap? |
A. | O(nlogn) |
B. | O(n<sup>2</sup>) |
C. | O(n*longn *logn) |
D. | O(n) |
Answer» E. | |