Top 350+ Solved Data Structures (DS) MCQ Questions Answer
Q. Which of the following is true?
a. Shell sort’s passes completely sort the elements before going on to the next-smallest gap while Comb sort’s passes do not completely sort the elements
b. Shell sort’s passes do not completely sort the elements before going on to the next-smallest gap like in Comb sort
c. Comb sort’s passes completely sort the elements before going on to the next-smallest gap like in Shell sort
d. Shell sort’s passes do not completely sort the elements before going on to the next-smallest gap while Comb sort’s passes completely sort the elements
Q. Which of the following is the distribution sort?
a. Heap sort
b. Smooth sort
c. Quick sort
d. LSD radix sort
Q. What is the worst case time complexity of LSD radix sort?
a. O(nlogn)
b. O(wn)
c. O(n)
d. O(n + w)
Q. LSD radix sort requires passes to sort N elements.
a. (w/logR)
b. N(w/logR)
c. (w/log(RN))
d. (wN/log(N))
Q. Which of the following is false?
a. LSD radix sort is an integer sorting algorithm
b. LSD radix sort is a comparison sorting algorithm
c. LSD radix sort is a distribution sort
d. LSD radix sort uses bucket sort
Q. Which of the following sorting algorithm is stable?
a. Heap sort
b. Selection sort
c. In-place MSD radix sort
d. LSD radix sort
Q. Which of the following should be used to sort a huge database on a fixed-length key field?
a. Insertion sort
b. Merge sort
c. LSD radix sort
d. Quick sort
Q. Which of the following is a combination of LSD and MSD radix sorts?
a. Forward radix sort
b. 3-way radix quick sort
c. Trie base radix sort
d. Flash sort
Q. Which of the following is true for the LSD radix sort?
a. works best for variable length strings
b. accesses memory randomly
c. inner loop has less instructions
d. sorts the keys in left-to-right order
Q. Which scheme uses a randomization approach?
a. hashing by division
b. hashing by multiplication
c. universal hashing
d. open addressing