Data Structures and Algorithms Multiple Choice Questions - Set 25

241.       An ADT is defined to be a mathematical model of a user-defined type along with the collection of all ................ operations on that model.
(A) Cardinality
(B) Assignment
(C) Primitive
(D) Structured
Answer: C
242.       An algorithm is made up of two independent time complexities f (n) and g (n). Then the complexities of the algorithm is in the order of
(A) f(n) x g(n)
(B) Max ( f(n),g(n))
(C) Min (f(n),g(n))
(D) f(n) + g(n)
Answer: B
243.       The goal of hashing is to produce a search that takes .............
(A) O(1) time
(B) O(n2) time
(C) O(log n) time
(D) O(n log n) time
Answer: A
244.       The best average behaviour is shown by:
(A) Quick Sort
(B) Merge Sort
(C) Insertion Sort
(D) Heap Sort
Answer: A
245.       What is the postfix form of the following prefix *+ab–cd
(A) ab+cd–*
(B) abc+*–
(C) ab+*cd–
(D) ab+*cd–
Answer: A
246.       Time complexities of three algorithms are given. Which should execute the slowest for large values of N?
(A) O(N1/2)
(B) O(N)
(C) O(log N)
(D) None of these
Answer: B
247.       What data structure is used for depth first traversal of a graph?
(A) Queue
(B) Stack
(C) List
(D) None of these
Answer: B
248.       A queue is a,
(A) FIFO (First In First Out) list.
(B) LIFO (Last In First Out) list.
(C) Ordered array.
(D) Linear tree.
Answer: A
249.       Time required to merge two sorted lists of size m and n, is ............
(A) Ο(m | n)
(B) Ο(m + n)
(C) Ο(m log n)
(D) Ο(n log m)
Answer: B
250.    Which data structure is needed to convert infix notation to postfix notation?
(A) Branch
(B) Queue
(C) Tree
(D) Stack
Answer: D

Post a comment