# Data Structures and Algorithm Analysis Set 16

## Data Structures and Algorithm Analysis

### Questions 151 to 160

151.
Suppose cursor refers to a node in a linked list then what statement changes cursor so that it refers to the next node?
152.
The method which traverses the array sequentially to locate the given item in an array is called
 (a) Ordered search (b) Linear search (c) Binary search (d) Hash search (e) Heap search.
153.
Which of the following data structure does require recursion method?
 (a) Queue (b) List (c) Tree (d) Graph (e) Stack.
154.
Select the correct order of steps for post order traversal from the following:
I.     Visit root node.
II.     Traverse the right sub-tree.
III.    Traverse the left sub-tree.
 (a) III, II, I (b) I, II, III (c) I, III, II (d) II, I, III (e) II, III, I.
155.
Which of the following data structures is a best example for multitasking systems?
 (a) Stack (b) Linked List (c) Queue (d) Tree (e) Graph.
156.
A complete graph with ‘N’ nodes will have
 (a) (N – 1)/2 edges (b) N(N – 1) edges (c) N(N + 1) edges (d) N(N – 1)/2 edges (e) N – 1 edges.
157.
In a graph, which of the following algorithms does determine the reachability of all node pairs?
 (a) Floyd’s algorithm (b) Warshall’s algorithm (c) Kruskal’s algorithm (d) Prim’s algorithm (e) Multistage graph algorithm.
158.
What is the average time complexity of the heap sort?
 (a) O(n2) (b) O(n) (c) O(n/2) (d) O(log n) (e) O(n log n).
159.
What is the value of the following postfix expression?
2, 5, 9, –, /, 2, 2, 5, +, *, +
 (a) 13.5 (b) 18.5 (c) 25.5 (d) 15.0 (e) 27.5.
160.
What would be the total number of moves in Tower of Hanoi when n = 7?
 (a) 128 (b) 127 (c) 126 (d) 256 (e) 255