Cognizant Heap Sort Quiz

Question 1

Time: 00:00:00
Which will be the best to implement the following a car comes at a petrol station and waits. The next car to get its Gas filled should be the one which has waited the longest time and thus is given priority?

Binary Trees

Binary Trees

Heaps

Heaps

m-way Trees

m-way Trees

Binary Search Tree

Binary Search Tree

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

Please login to submit your explanation

Start

Question 2

Time: 00:00:00
For a hashing table what is the time complexity?

O(1)

O(1)

O(n2)

O(n2)

O(log n)

O(log n)

O(n)

O(n)

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

Please login to submit your explanation

Start

Question 3

Time: 00:00:00
Every element of a data structure has an address and a key associated with it.A search mechanism deals with two or more values assigned to the same address by using the key. What is this search mechanism?

Linear Search

Linear Search

Binary search

Binary search

Hash Coded Search

Hash Coded Search

None of these

None of these

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

Please login to submit your explanation

Start

Question 4

Time: 00:00:00
A max-heap is a heap where the value of each parent is greater than or equal to the values of its children. Which of the following is a max-heap?

A

A

B

B

C

C

D

D

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

Please login to submit your explanation

Start

Question 5

Time: 00:00:00
In a binary max heap containing n numbers, the smallest element can be found in time?

O(n)

O(n)

O(log n)

O(log n)

O(log log n)

O(log log n)

O(1)

O(1)

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

Please login to submit your explanation

Start

["0","40","60","80","100"]
["Need more practice! \r\n \r\n","Keep trying! \r\n \r\n","Not bad! \r\n \r\n","Good work! \r\n \r\n","Perfect! \r\n \r\n"]
Hey ! Follow us on G+