Data Structures and Algorithm Analysis Set 14

Data Structures and Algorithm Analysis

Questions 131 to 140



131.
The in-order traversal of some binary tree produced the sequence HFIEJGZ, and the post-order traversal of the same tree produced the sequence HIFJZGE. What will be the total number of nodes in the left sub tree of the given tree?
(a)
1
(b)
2
(c)
3
(d)
4
(e)
5.
132.
Which of the following shows the difference between a queue and a stack?
(a)
Queues require linked lists, but stacks do not
(b)
Stacks require linked lists, but queues do not
(c)
Queue is used for complex programs and stack for simple programs
(d)
Stacks use two ends of the structure, queues use only one
(e)
Queues use two ends of the structure; stacks use only one.
133.
Which of the following is generated by Folding method?
(a)
A hash function
(b)
Index function for a triangular matrix
(c)
Linking the tail node to the head node in linked list
(d)
Linear probing
(e)
Chaining.
134.
From the following choose the one which belongs to the algorithm paradigm other than to which others from the following belongs to.
(a)
Minimum & Maximum problem
(b)
Knapsack problem
(c)
Selection problem
(d)
Merge sort
(e)
Quick sort.
135.
Which of the following data structures is used by breadth first search as an auxiliary structure to hold nodes for future processing?
(a)
Queue
(b)
Linked list
(c)
Graph
(d)
B-Tree
(e)
Stack.
136.
Pick the correct statement(s) from the following set of statements.
I.     In the Kruskal’s algorithm, for the construction of minimal spanning tree for a graph, the selected edges always form a forest.
II.     In Prim’s algorithm, for the construction of minimal spanning tree for a graph, the selected edges always form an orchard.
III.    DFS, BFS algorithms always make use of a queue, and stack respectively.
(a)
Only (I) above
(b)
Only (II) above
(c)
Only (III) above
(d)
Both (I) and (III) above
(e)
Both (II) and (III) above.
137.
Which of the following methods of collision processing has some of their addresses may remain unchecked?
(a)
Linked collision processing
(b)
Quadratic collision processing
(c)
Linear collision processing
(d)
Random collision processing
(e)
Clustering collision processing.
138.
Consider a tree ‘t’ has two subtrees t1 and t2. Identify the tree where the subtree t1 has minimum height and the subtree t2 has maximum height.
(a)
Fibonacci      
(b)
B+   
(c)
Sparse   
(d)
Complete binary   
(e)
B.
139.
Which of the following is used to select the first entry which has the free block equal to or more than required one in memory allocation?
(a)
Best fit method
(b)
Average fit method
(c)
Worst fit method
(d)
Big fit method
(e)
First fit method.
140.
What is the total number of nodes at every level (L) of a complete binary tree?
(a)
2L
(b)
2L–1
(c)
2L–1
(d)
2L­­–1
(e)
2L.




Answers




131.
Answer : (c)
Reason:  The in-order traversal of some binary tree produced the sequence HFIEJGZ, and the post-order traversal of the same tree produced the sequence HIFJZGE.  Then the total number of nodes in the left sub tree of the given tree is 3.
132.
Answer : (e)
Reason:  Queues use two ends of the structure; stacks use only one show the difference between them.
133.
Answer : (a)
Reason:  a hashing function is generated by Folding method.
134.
Answer : (b)
Reason:  Knapsack problem is  the one which belongs to the algorithm paradigm other than to which others from the following belongs to
135.
Answer : (a)
Reason:  Queue is the data structure used by breadth first search as an auxiliary structure to hold nodes for future processing.
136.
Answer : (a)
Reason:  In the Kruskal’s algorithm, for the construction of minimal spanning tree for a graph, the selected edges always form a forest.
137.
Answer : (b)
Reason:  Quadratic collision processing has some of their addresses may remain unchecked.
138.
Answer : (a)
Reason:  Consider a tree‘t’ has two sub trees t1 and t2. Fibonacci is the tree where the sub tree t1 has minimum height and the sub tree t2 has maximum height.
139.
Answer : (e)
Reason:  First fit method is used to select the first entry which has the free block equal to or more than required one in memory allocation.
140.
Answer : (e)
Reason:  The total number of nodes at every level ( L ) of a complete binary tree is 2L.





No comments :

What you think about these Questions and Answers ? Let me know in comments.

Post a Comment