Data Structure and Algorithms (DSA) MCQs with answers Page - 65

Here, you will find a collection of MCQ questions on Data Structure and Algorithms (DSA). Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Admin • 833.24K Points
Coach

Q. Shell sort is also known as

  • (A) diminishing decrement sort
  • (B) diminishing increment sort
  • (C) partition exchange sort
  • (D) diminishing insertion sort

A

Admin • 833.24K Points
Coach

Q. Statement 1: Shell sort is a stable sorting algorithm. Statement 2: Shell sort is an in-place sorting algorithm.

  • (A) Both statements are true
  • (B) Statement 2 is true but statement 1 is false
  • (C) Statement 2 is false but statement 1 is true
  • (D) none

A

Admin • 833.24K Points
Coach

Q. Shell sort is applied on the elements 27 59 49 37 15 90 81 39 and the chosen decreasing sequence of increments is (5,3,1). The result after the first iteration will be

  • (A) 27 59 49 37 15 90 81 39
  • (B) 27 59 37 49 15 90 81 39
  • (C) 27 59 39 37 15 90 81 49
  • (D) 15 59 49 37 27 90 81 39

A

Admin • 833.24K Points
Coach

Q. Shell sort is an improvement on

  • (A) insertion sort
  • (B) selection sort
  • (C) binary tree sort
  • (D) quick sort

A

Admin • 833.24K Points
Coach

Q. An array that is first 7-sorted, then 5-sorted becomes

  • (A) 7-ordered
  • (B) 5-ordered
  • (C) both 2-ordered and 5-ordered
  • (D) both 7-ordered and 5-ordered

A

Admin • 833.24K Points
Coach

Q. If Hibbard increments (h1= 1, h2= 3, h3= 7, …, hk = 2k–1) are used in a Shell sortimplementation, then the best case time complexity will be

  • (A) O(nlogn)
  • (B) O(n)
  • (C) O(n2)
  • (D) O(logn)

A

Admin • 833.24K Points
Coach

Q. Records R1, R2, R3,.. RN with keys K1, K2, K3,.. KN are said to be h-ordered, if

  • (A) Ki <= Ki+h for 1<= i*h <= N
  • (B) Kh <= Ki+h for 1<= i <= N
  • (C) Ki <= Kh for 1<= i <= h
  • (D) Ki <= Ki+h for 1<= i <= N-h

A

Admin • 833.24K Points
Coach

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

Admin • 833.24K Points
Coach

Q. Which of the following is the distribution sort?

  • (A) Heap sort
  • (B) Smooth sort
  • (C) Quick sort
  • (D) LSD radix sort

A

Admin • 833.24K Points
Coach

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)

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ