# Data Structure and Algorithm Analysis Set 21

## Data Structure and Algorithm Analysis

### Questions 201 to 210

201.
The time taken by NP-class sorting algorithm is
 (a) O(1) (b) O(log n) (c) O(n2) (d) O(n log n) (e) O(n).
202.
For the functions f, g : N –> R  for all n,   f(n) = n and g(n) = n log n then
 (a) f(n) Ï( g(n)), but g(n) ( f(n)) (b) f(n) ( g(n)), but g(n) Ï( f(n)) (c) g(n) ( f(n)), but f(n) Ï( g(n)) (d) f(n) ( g(n)), and g(n) ( f(n)) (e) f(n) ( g(n)), but f(n) Ï( g(n)).
203.
What is the type of the algorithm used in solving the 8 Queens problem?
 (a) Greedy (b) Dynamic (c) Branch and Bound (d) Divide and Conquer (e) Backtracking.
204.
Let G be a graph with ‘n’ nodes and let ‘m’ be the chromatic number of the graph. Then the time taken by the backtracking algorithm to color it is
 (a) O(nmn) (b) O(n+m) (c) O(mnm) (d) O(nm) (e) O(nm).
205.
What is the major data structure used in the Network data model?
 (a) Stack (b) Array (c) Graph (d) Tree (e) Queue.
206.
Minimum number of queue(s) needed to implement the priority queue is(are)
 (a) Four (b) Three (c) Two (d) One (e) Depends upon the application.
207.
Sorting is not possible by using which of the following methods?
 (a) Insertion (b) Selection (c) Exchange (d) Deletion (e) Partitioning.
208.
The number of null branches for a binary tree with 20 nodes is
 (a) 21 (b) 20 (c) 22 (d) 19 (e) 18
209.
The time complexity of binary search in best, worst cases for the array of size N is
 (a) N, N2 (b) ­­­N, N (c) 1, logN (d) 1, NlogN (e) logN, N2.
210.
A desired key in a table is searched, starting itself from hash address, sequentially for the following.
 (a) Quadratic probing (b) Linear probing (c) Random probing (d) Chaining (e) Reverse probing.