Contents

Quick sort is?
a) Stable and in place        
b) Not stable but in place
c) Stable and not in place
d) Some time in place and send some time stable

b

Which may be stable sort?
a) Bubble sort                      
b) Insertion sort
c) Both of above                
d) None of these

c

Counting sort has time complexity?
a) O(n)                                  
b) O(n+k)
c) O(K)                                  
d) O(nlogn)

a

Which sorting algorithm is faster?
a) O(n^2)                              
b) O(nlogn)
c) O(n+k)                              
d) O(n^3)

b

Dynamic programming algorithms need to store the results of intermediate sub problems?
a) True                                 
b) False
c) NA                                     
d) N/A

a

Dijkstra’s single source shortest path algorithm works if all edges weights are nonnegative and there are negative cost cycles?
a) True                                  
b) False
c) NA                                     
d) N/A

b

Contents Details