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

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. Examples of sorting algorithms are

  • (A) bubble sort
  • (B) selection sort
  • (C) insertion sort
  • (D) (a),(b),and ©

A

Admin • 833.24K Points
Coach

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)

A

Admin • 833.24K Points
Coach

Q. _____passes are required to sort n data using bubble sort.

  • (A) n
  • (B) n-1
  • (C) n+2
  • (D) n-2

A

Admin • 833.24K Points
Coach

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)

A

Admin • 833.24K Points
Coach

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

A

Admin • 833.24K Points
Coach

Q. Sorting is useful for_________

  • (A) report genration
  • (B) minimizing the storage needed
  • (C) making searching easier and efficient
  • (D) responding to queries easily

A

Admin • 833.24K Points
Coach

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

A

Admin • 833.24K Points
Coach

Q. What would be the asymptotic time complexity to find an element in the linked list?

  • (A) o(1)
  • (B) o(n)
  • (C) o(n2)
  • (D) none

A

Admin • 833.24K Points
Coach

Q. What would be the asymptotic time complexity to insert an element at the second position in the linked list?

  • (A) o(1)
  • (B) o(n)
  • (C) o(n2)
  • (D) none

A

Admin • 833.24K Points
Coach

Q. The concatenation of two list can performed in O(1) time. Which of the following variation of linked list can be used?

  • (A) singly linked list
  • (B) doubly linked list
  • (C) circular doubly linked list
  • (D) array implementation of list

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