Menu

Question Discussion & Solution

MCQ
Q.
In a min heap

forum Community Discussion

speaker_notes_off

No discussions yet. Be the first to start!

You must be logged in to participate in the discussion.

login Login to Discuss

auto_awesome Similar Questions

MCQ
1.
Choose the correct properties of weak-heap.
forum Discussion
MCQ
2.
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.

FIB_UNION(H1,H2)
 {
  H =MAKE_HEAP()
  min[H]= min[H1]
  concatenate the root list of H2 with the root list of H
  if (min[H1] = NIL) or (min[H2]!= NIL and min[H2] < min[H1])
  then min[H] = min[H2]
  n[H]=  n[H1] + n[H2]
  free the objects H1 and H2
  return H
 }
forum Discussion
MCQ
3.
The leaf node for a heap of height h will be at which position.
forum Discussion
MCQ
4.
Why is heap implemented using array representations than tree(linked list) representations though both tree representations and heaps have same complexities?

for binary heap

-insert: O(log n)

-delete min: O(log n)

for a tree

-insert: O(log n)

-delete: O(log n)

Then why go with array representation when both are having same values ?
forum Discussion
MCQ
5.
Given an array of element 5,7,9,1,3,10,8,4. Tick all the correct sequences of elements after inserting all the elements in a min-heap.
forum Discussion

category More Data Structure Topics

article

Data Structure Basics

format_list_bulleted 128 MCQs
article

Abstract data types

format_list_bulleted 37 MCQs
article

Arrays

format_list_bulleted 134 MCQs
article

Lists

format_list_bulleted 166 MCQs
article

Stacks

format_list_bulleted 165 MCQs
article

Queues

format_list_bulleted 61 MCQs
article

Trees

format_list_bulleted 133 MCQs
article

Binary Trees

format_list_bulleted 120 MCQs
article

B Trees

format_list_bulleted 8 MCQs
article

Heaps

format_list_bulleted 36 MCQs
article

Hash based structures

format_list_bulleted 7 MCQs
article

Graphs

format_list_bulleted 157 MCQs
article

Mixed

format_list_bulleted 10 MCQs