Top 350+ Solved Data Structure and Algorithms (DSA) MCQ Questions Answer
Q. If two different keys yield the same hash address, it is called _______ .
a. binary search
b. sequential search
c. collision
d. rotation
Q. The ______ sort algorithm is called diminishing increment sort.
a. merge
b. radix
c. shell
d. selection
Q. A ______ merge sort uses a constant number of input merge files and the same number of output merge files.
a. k-way
b. balanced
c. polyphase
d. radix
Q. ________ method of collision resolution involves maintaining two tables in memory.
a. linear probing
b. chaining
c. quadratic probing
d. double hashing
Q. _______ is a merge sort that sorts a data stream using repeated merges.
a. balanced
b. polyphase
c. radix
d. k-way
Q. One of the statement is false
a. tree is an abstract data type
b. array is a linear data structure
c. typedef is derived data type
d. float is built in data type
Q. Examples of sorting algorithms are
a. bubble sort
b. selection sort
c. insertion sort
d. (a),(b),and ©
Q. Give timing complexities of three sorting algorithms bubble sort,selection sort,insertion sort respectively.
a. 0(log n), 0(log n), o(log n)
b. o(n2), o(n2), o(n2)
c. o(n2), o(n log n), o(n log n)
d. o(n log n), o(n2), o(n log n)
Q. Best and the worst case timing complexities of insertion sort are_________.
a. o(n2), o(n2)
b. o(n log n), o(n2)
c. o(n), o(n2)
d. o(n), o(n3)
Q. Which sorting algorithm can exploit the partially sorted data in a list?
a. bubble sort
b. selection sort
c. insertion sort
d. all of them
Q. Sorting is useful for_________
a. report genration
b. minimizing the storage needed
c. making searching easier and efficient
d. responding to queries easily
Q. The getch() library function returns___
a. a character when any key is pressed
b. a character when enter is pressed
c. displays a character on the screen when any key is pressed
d. none of these
Q. The function islower(char)checks whether a character is in lower case or not.Therefore it should return______
a. 0 or 1
b. -1, 0 or 1
c. a character
d. nothing
Q. A variable P is called pointer if__
a. p contains the address of an element in data
b. p points to the address of first element in data
c. p can store only memory address
d. p contain the data and the address of data