Contents

What is the total time to heapify?
a) O(log n)                           
b) O(n log n)
c) O(n^2 log n)     
d) O(log^2n)

a

Slow sorting algorithms run in?
a) O(n^2)                             
b) O(n)
c) O(log n)                            
d) O(n log n)

a

One of the clever aspects of heaps is that they can be stored in arrays without using any.
a) pointers                           
b) constants
c) variables                          
d) functions

a

In which order we can sort?
a) increasing order only     
b) decreasing order only
c) increasing order or decreasing order
d) both at the same time

c

In the analysis of Selection algorithm, we make a number of passes, in fact it could be as many as?
a)T(n)                                    
b) T(n/2)
c) log n                                
d) n/2+n/4

c

For the heap sort we store the tree nodes in?
a) level-order traversal   
b) in-order traversal
c) pre-order traversal 
d) post-order traversal

a

Contents Details