# Quiz – 1

Question 1 Time: 00:00:00
` In a max-heap, element with the greatest key is always in the which node?` Leaf node

Leaf node

First node of left sub tree

First node of left sub tree

root node

root node

First node of right sub tree

First node of right sub tree

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 2 Time: 00:00:00
`Heap exhibits the property of a binary tree?` True

True

False

False

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 3 Time: 00:00:00
`What is the complexity of adding an element to the heap.` O(log n)

O(log n)

O(h)

O(h)

O(log n) & O(h)

O(log n) & O(h)

None of the mentioned

None of the mentioned

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 4 Time: 00:00:00
`The worst case complexity of deleting any arbitrary node value element from heap is` O(logn)

O(logn)

O(n)

O(n)

O(nlogn)

O(nlogn)

O(n2)

O(n2)

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 5 Time: 00:00:00
` Heap can be used as ________________` Priority queue

Priority queue

Stack

Stack

A decreasing order array

A decreasing order array

None of the mentioned

None of the mentioned

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 6 Time: 00:00:00
```  If we implement heap as min-heap , deleting root node (value 1)from the heap. What would be the value of root node after second iteration if leaf node (value 100) is chosen to replace the root at start.``` 2

2

100

100

17

17

3

3

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 7 Time: 00:00:00
```  If we implement heap as maximum heap , adding a new node of value 15 to the left most node of right subtree . What value will be at leaf nodes of the right subtree of the heap.``` 15 and 1

15 and 1

25 and 1

25 and 1

3 and 1

3 and 1

2 and 3

2 and 3

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 8 Time: 00:00:00
`An array consist of n elements. We want to create a heap using the elements. The time complexity of building a heap will be in order of` O(n*n*logn)

O(n*n*logn)

O(n*logn)

O(n*logn)

O(n*n)

O(n*n)

O(n *logn *logn)

O(n *logn *logn)

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 9 Time: 00:00:00
` On which algorithm is heap sort based on?` Fibonacci heap

Fibonacci heap

Binary tree

Binary tree

Priority queue

Priority queue

FIFO

FIFO

Once you attempt the question then PrepInsta explanation will be displayed.

Start

Question 10 Time: 00:00:00
` In what position does the array for heap sort contains data?` 0

0

1

1

-1

-1

anywhere in the array

anywhere in the array

Once you attempt the question then PrepInsta explanation will be displayed.

Start

["0","40","60","80","100"]
["Need more practice!","Keep trying!","Not bad!","Good work!","Perfect!"]

Completed

0/0

Accuracy

0%