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
|
||||||||||
153.
|
Which of the following data structure does require
recursion method?
|
||||||||||
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.
|
||||||||||
155.
|
Which of the following data structures is a best
example for multitasking systems?
|
||||||||||
156.
|
A complete graph with ‘N’ nodes will have
|
||||||||||
157.
|
In a graph, which of the following algorithms does
determine the reachability of all node pairs?
|
||||||||||
158.
|
What is the average time complexity of the heap sort?
|
||||||||||
159.
|
What is the value of the following postfix expression?
2, 5, 9, –, /, 2, 2, 5, +, *, +
|
||||||||||
160.
|
What would be the total number of moves in Tower of
Hanoi when n = 7?
|
Answers
151.
|
Answer : (d)
Reason: Because, in the node link is self
referential pointer with which we can reach the next node with the statement
cursor = cursor à link, and the
remaining operations are not valid.
|
152.
|
Answer : (b)
Reason: Because, in linear search sequentially all
the locations are searched to locate an array, that is not with the other
given methods.
|
153.
|
Answer : (e)
Reason: Because, stack always holds the return
values in the recursive calls and also the intermediate results. The
remaining data structures are not suitable for the recursive calls.
|
154.
|
Answer : (a)
Reason: Because, for the post order traversal, first
traverse the left sub tree in post order then traverse the right sub tree in
post order and then visit the root.
|
155.
|
Answer : (c)
Reason: Because, for multiple jobs they are stored
in a queue and are processed by the processor depending upon their priority.
The remaining data structures are not suitable for scheduling the jobs in
multitasking operating systems.
|
156.
|
Answer : (d)
Reason: Because, every node is connected with the
remaining all the nodes, and hence the total number of edges is N(N-1)/2.
|
157.
|
Answer : (b)
Reason: Because, Warshall’s algorithm finds the shortest
path between any two given pair of nodes. The remaining algorithms are not
used for this purpose.
|
158.
|
Answer : (e)
Reason: According to the mathematical evaluation and
priori approach.
|
159.
|
Answer : (a)
Reason: That is, the given infix expression is 2/(5-9)+2*(2+5).
|
160.
|
Answer : (b)
Reason: That is 27-1 ( 2n-1).
|
Really nice blog, very infromative. You can refer more topics related to Data Structure like Sorting alorithm, Searching Algorithm and stack linked list from here for future articles
ReplyDeleteThanks !