Top 350+ Solved Data Structures (DS) MCQ Questions Answer

From 361 to 370 of 370

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

  • 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

Q. Which of the following is the distribution sort?

a. Heap sort

b. Smooth sort

c. Quick sort

d. LSD radix 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)

  • b. O(wn)

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))

  • a. (w/logR)

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

  • b. LSD radix sort is a comparison sorting algorithm

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

  • 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

  • c. LSD radix 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

  • a. Forward radix 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

  • b. accesses memory randomly

Q. Which scheme uses a randomization approach?

a. hashing by division

b. hashing by multiplication

c. universal hashing

d. open addressing

  • c. universal hashing
Subscribe Now

Get All Updates & News