Data Structures and Algorithms Multiple Choice Questions - Set 4

31.       The pre-order traversal of a binary-search tree is DBACFE. What is the post-order traversal?
(A) ABFCDE
(B) ADBFEC
(C) ABFEDC
(D) ACBEFD
Answer: D
32.       What could be the worst case height of an AVL tree?
(A) 0.97 log n
(B) 2.13 log n
(C) 1.44 log n
(D) n2 log n
Answer: C
33.       Which amongst the following cannot be a balance factor of any node of an AVL tree?
(A) 1
(B) 0
(C) 2
(D) -1
Answer: C
34.       How many distinct binary search trees can be formed which contains the integers 1, 2, 3?
(A) 6
(B) 5
(C) 4
(D) 3
Answer: B
35.       The sort which inserts each elements A(K) into proper position in the previously sorted sub array A(1), ..., A(K–1)
(A) Insertion sort
(B) Radix sort
(C) Merge sort
(D) Bubble sort
Answer: A
36.       Direct or random access of elements is not possible in ...............
(A) Linked list
(B) Array
(C) String
(D) None of these
Answer: A
37.       push() and pop() functions are found in ...............
(A) queues
(B) lists
(C) stacks
(D) trees
Answer: C
38.       Shell sort uses ................
(A) insertion sort
(B) merge sort
(C) selection sort
(D) quick sort
Answer: A
39.       Which of the following algorithm cannot be designed without recursion?
(A) Tower of Hanoi
(B) Fibonacci Series
(C) Tree Traversal
(D) None of the above
Answer: D
Explanation
Every problem which can be solved using recursion can also be solved using iterations.
40.    Level of any node of a tree is
(A) Height of its left subtree minus height of its right subtree
(B) Height of its right subtree minus height of its left subtree
(C) Its distance from the root
(D) None of these
Answer: C


Post a Comment

0 Comments