Data Structures and Algorithms Multiple Choice Questions - Set 27

261.       The largest element of an array index is called its .................
(A) lower bound.
(B) range.
(C) upper bound.
(D) All of these.
Answer: C
262.       What is the result of the following operation:
Top (Push (S, X))
(A) X
(B) null
(C) S
(D) None of these.
Answer: A
263.       How many nodes in a tree have no ancestors?
(A) 0
(B) 1
(C) 2
(D) n
Answer: B
264.       In order traversal of binary search tree will produce ................
(A) unsorted list
(B) reverse of input
(C) sorted list
(D) none of the above
Answer: C
265.       In binary heap, whenever the root is removed then the rightmost element of last level is replaced by the root. Why?
(A) It is the easiest possible way.
(B) To make sure that it is still complete binary tree.
(C) Because left and right subtree might be missing.
(D) None of these
Answer: B
266.       In order to get the contents of a Binary search tree in ascending order, one has to traverse it in ............
(A) pre-order
(B) in-order
(C) post order
(D) not possible
Answer: B
267.       Which of the following sorting algorithm is stable?
(A) Insertion sort
(B) Bubble sort
(C) Quick sort
(D) Heap sort
Answer: D
268.       The prefix form of an infix expression p + q − r * t is:
(A) + pq − *rt
(B) − +pqr * t
(C) − +pq * rt
(D) − + * pqrt
Answer: C
269.       Which data structure is used for implementing recursion?
(A) Queue
(B) Stack
(C) Arrays
(D) List
Answer: B
270.    In binary search, average number of comparison required for searching an element in a list if n numbers is:
(A) log2 n
(B) n / 2
(C) n
(D) n – 1
Answer: A

Post a Comment


  1. Knowledge of data structures and algorithms is essential to build problem-solving skills as well as interview preparation. Thank you for sharing this question set. Great blog.