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

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. Consider that n elements are to be sorted. What is the worst case time complexity of Bubble sort?

  • (A) o(1)
  • (B) o(log2n)
  • (C) o(n)
  • (D) o(n^2)

A

Admin • 833.24K Points
Coach

Q. The complexity of linear search algorithm is

  • (A) o(n)
  • (B) o(log n)
  • (C) o(n2)
  • (D) o(n log n)

A

Admin • 833.24K Points
Coach

Q. Which of the following data structure is linear data structure?

  • (A) trees
  • (B) graphs
  • (C) arrays
  • (D) none of above

A

Admin • 833.24K Points
Coach

Q. What is the maximun number of dimensions an array in C may have?

  • (A) two
  • (B) eight
  • (C) twenty
  • (D) theoratically no limit. the only practical limits are memory size and compilers

A

Admin • 833.24K Points
Coach

Q. An external variable

  • (A) is globally accessible by all functions
  • (B) has a declaration
  • (C) will be initialized to 0 if not initialized
  • (D) all of these

A

Admin • 833.24K Points
Coach

Q. The declaration "unsigned u" indicates u is a/an

  • (A) unsigned character
  • (B) unsigned integer
  • (C) character
  • (D) none of these

A

Admin • 833.24K Points
Coach

Q. A declaration "short int" is used for variables

  • (A) which have a short duration in a program
  • (B) which have short names
  • (C) which may require less storage than normal integers
  • (D) all of these

A

Admin • 833.24K Points
Coach

Q. The complexity of the average case of an algorithm is

  • (A) Much more complicated to analyze than that of worst case
  • (B) Much more simpler to analyze than that of worst case
  • (C) Sometimes more complicated and some other times simpler than that of worst case
  • (D) None of the above

A

Admin • 833.24K Points
Coach

Q. Two main measures for the efficiency of an algorithm are

  • (A) Time and space
  • (B) Processor and memory
  • (C) Complexity and capacity
  • (D) Data and space

A

Admin • 833.24K Points
Coach

Q. All the above* Which of the following data structures are indexed structures

  • (A) linear arrays
  • (B) linked lists
  • (C) both of above
  • (D) none of above