Data Structures and Algorithms Multiple Choice Questions - Set 17

161.       If a node having two children is deleted from a binary tree, it is replaced by its ...........
(A) In-order predecessor
(B) In-order successor
(C) Pre-order predecessor
(D) None of these
Answer: B
162.       In a min heap:
(A) minimum values are stored.
(B) child nodes have less value than parent nodes.
(C) parent nodes have less value than child nodes.
(D) maximum value is contained by the root node.
Answer: C
163.       The searching technique that takes O(1) time to find a data is
(A) Linear Search
(B) Binary Search
(C) Hashing
(D) Tree Search
Answer: C
164.       Select the incorrect statement. Binary search trees (regardless of the order in which the values are inserted into the tree):
(A) Always have multiple links per node.
(B) Can be sorted efficiently.
(C) Always have the same shape for a particular set of data.
(D) Are nonlinear data structures.
Answer: C
165.       A mathematical-model with a collection of operations defined on that model is called:
(A) Data Structure
(B) Abstract Data Type
(C) Primitive Data Type
(D) Algorithm
Answer: B

166.       The number of interchanges required to sort 5, 1, 6, 2, 4 in ascending order using Bubble Sort is
(A) 6
(B) 5
(C) 7
(D) 8
Answer: B
167.       The postfix form of the expression (A+ B)*(C*D− E)*F / G is:
(A) AB+ CD*E − FG /**
(B) AB + CD* E − F **G /
(C) AB + CD* E − *F *G /
(D) AB + CDE * − * F *G /
Answer: A
168.       The complexity of multiplying two matrices of order m*n and n*p is ................
(A) mnp
(B) mp
(C) mn
(D) np
Answer: A
169.       Merging 4 sorted files containing 50, 10, 25 and 15 records will take ............ time
(A) O(100)
(B) O(200)
(C) O(175)
(D) O(125)
Answer: A
170.    For an undirected graph with n vertices and e edges, the sum of the degree of each vertex is equal to:
(A) 2n
(B) (2n-1)/2
(C) 2e
(D) e2/2
Answer: C

Post a Comment