Data Structure MCQ

Data Structure MCQ

  • Admin
  • 03rd Feb, 2023

Take Data Structure MCQ Test to Test Your Knowledge

Data Structure is the most popular technique to store & manage data nowadays. It is a set of algorithms, that can be used with programming languages to structure the data in memory so that it can be accessed easily. mainly there are 2 types of Data Structure.

  1. Primitive Data Sturcutre
  2. Non Primitve Data Structure

Practice here the top Data Structure MCQ Questions, that check your basic knowledge of Data Structure. This Data Structure MCQ Test contains the best 25+ Multiple Choice Questions. These MCQs are very popular & asked many times at Data Structure Interviews/Exams. Apart from this, you can also download the Data Structure MCQ Questions and Answers PDF completely free.

Also, Read Best Data Structure Interview Questions.

Data Structure MCQ

1) Process of inserting an element in stack is called __

  • A. Push
  • B.Evaluation
  • C.Pop
  • D.Create

2) What is a bit array?

  • A. Data structure that compactly stores bits
  • B.An array in which most of the elements have the same value
  • C.Data structure for representing arrays of records
  • D.None of the mentioned

3) Data structure that compactly stores bits -

  • A. Bloom filter
  • B.For the allocation of memory pages
  • C.Used by the Linux kernel
  • D.All of the mentioned

4) Which class in Java can be used to represent bit array?

  • A. BitArray
  • B.BitStream
  • C.BitSet
  • D.BitVector

5) Which of the following bitwise operations will you use to set a particular bit to 1?

  • A. AND
  • B.XOR
  • C.OR
  • D.NOR
Download Free : Data Structure MCQ PDF

6) What is a dynamic array?

  • A. A variable size data structure
  • B.An array which is created at runtime
  • C.The memory to the array is allocated at runtime
  • D.An array which is reallocated everytime whenever new elements have to be added

7) The number of items used by the dynamic array contents is its -

  • A. Capacity
  • B.Logical size
  • C.Random size
  • D.Physical size

8) How will you implement dynamic arrays in Java?

  • A. Set
  • B.Map
  • C.HashMap
  • D.List

9) What is the time complexity for inserting/deleting at the beginning of the array?

  • A. O(logn)
  • B.O(nlogn)
  • C.O(1)
  • D.O(n)

10) What are some of the disadvantages of parallel arrays?

  • A. Very little direct language support
  • B.Expensive to shrink or grow
  • C.Poor locality of reference for non-sequential access
  • D.All of the mentioned

11) What is a sorted array?

  • A. Arrays sorted in numerical order
  • B.Arrays sorted in alphabetical order
  • C.Elements of the array are placed at equally spaced addresses in the memory
  • D.All of the mentioned

12) What are some of the applications of sorted arrays?

  • A. Commercial computing
  • B.Priority Scheduling
  • C.Discrete Mathematics
  • D.All of the mentioned

13) What is the difference between a normal(naive) array and a sparse array?

  • A. Sparse array is memory efficient
  • B.Sparse array can hold more elements than a normal array
  • C.Sparse array is dynamic
  • D.A naive array is more efficient

14) What is sparsity of a matrix?

  • A. The fraction of non-zero elements over the total number of elements
  • B.The fraction of zero elements over the total number of elements
  • C.The fraction of total number of elements over the non-zero elements
  • D.The fraction of total number of elements over the zero elements

15) Which of the following is false?

  • A. Suffix array is used in string matching problems
  • B.Suffix array is always sorted
  • C.Suffix array contains all the suffixes of the given string
  • D.Suffix array is always unsorted

16) Suffix array can be created in O(nlogn) time.

  • A. True
  • B.False

17) Which of the following is/are advantages suffix array one suffix tree? I. Lesser space requirement II. Improved cache locality III. Easy construction in linear time

  • A. Only I
  • B.Only I and III
  • C.Only II and III
  • D.All I, II and III

18) Which of the following property does not hold for matrix multiplication?

  • A. Commutative
  • B.Distributive
  • C.Associative
  • D.None of the mentioned

19) Matrix A when multiplied with Matrix C gives the Identity matrix I, what is C ?

  • A. Identity matrix
  • B.Inverse of A
  • C.Transpose of A
  • D.Square of A

20) Who coined the term Sparse Matrix?

  • A. James Sylvester
  • B.Chris Messina
  • C.Harry Markowitz
  • D.Arthur Cayley

21) Which of the following data structure is mainly used for implementing the recursive algorithm?

  • A. Stack
  • B.Queue
  • C.Linked list
  • D.Binary tree

22) The main advantage of the array data structure is ..................

  • A. Elements of an array cannot be sorted
  • B.Easier to access the elements in an array
  • C.Elements of mixed data types can be stored
  • D.All of the above

23) Which of the following data structure is the best for implementing a priority queue?

  • A. Heap
  • B.Array
  • C.Stack
  • D.Linked list

24) What are the characteristics of a Data Structure?

  • A. Correctness
  • B.Time Complexity
  • C.Space Complexity
  • D.All of the above

25) Data Structure is a systematic way to organize data in order to use it efficiently.

  • A. True
  • B.False

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.

Related MCQ/Quiz

Unix MCQ
Django MCQ
Perl MCQ