Data Structure MCQ Quiz

Take Data Structure Quiz To test your Knowledge 

Below are few Data Structure MCQ test that checks your basic knowledge of Data Structure. This Data Structure Test contains around 20 questions of multiple choice with 4 options. You have to select the right answer to a question. You can see the correct answer by clicking view answer link.

Also, Read Best Data Structure interview questions.

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

  • Push
  • Evaluation
  • Pop
  • Create
View Answer

2. What is a bit array?

  • Data structure that compactly stores bits
  • An array in which most of the elements have the same value
  • Data structure for representing arrays of records
  • None of the mentioned
View Answer

3. Data structure that compactly stores bits -

  • Bloom filter
  • For the allocation of memory pages
  • Used by the Linux kernel
  • All of the mentioned
View Answer

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

  • BitArray
  • BitStream
  • BitSet
  • BitVector
View Answer

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

  • AND
  • XOR
  • OR
  • NOR

6. What is a dynamic array?

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

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

  • Capacity
  • Logical size
  • Random size
  • Physical size
View Answer

8. How will you implement dynamic arrays in Java?

  • Set
  • Map
  • HashMap
  • List

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

  • O(logn)
  • O(nlogn)
  • O(1)
  • O(n)
View Answer

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

  • Very little direct language support
  • Expensive to shrink or grow
  • Poor locality of reference for non-sequential access
  • All of the mentioned
View Answer

11. What is a sorted array?

  • Arrays sorted in numerical order
  • Arrays sorted in alphabetical order
  • Elements of the array are placed at equally spaced addresses in the memory
  • All of the mentioned
View Answer

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

  • Commercial computing
  • Priority Scheduling
  • Discrete Mathematics
  • All of the mentioned
View Answer

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

  • Sparse array is memory efficient
  • Sparse array can hold more elements than a normal array
  • Sparse array is dynamic
  • A naive array is more efficient
View Answer

14. What is sparsity of a matrix?

  • The fraction of non-zero elements over the total number of elements
  • The fraction of zero elements over the total number of elements
  • The fraction of total number of elements over the non-zero elements
  • The fraction of total number of elements over the zero elements
View Answer

15. Which of the following is false?

  • Suffix array is used in string matching problems
  • Suffix array is always sorted
  • Suffix array contains all the suffixes of the given string
  • Suffix array is always unsorted
View Answer

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

  • True
  • False
View Answer

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

  • Only I
  • Only I and III
  • Only II and III
  • All I, II and III
View Answer

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

  • Commutative
  • Distributive
  • Associative
  • None of the mentioned
View Answer

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

  • Identity matrix
  • Inverse of A
  • Transpose of A
  • Square of A
View Answer

20. Who coined the term Sparse Matrix?

  • James Sylvester
  • Chris Messina
  • Harry Markowitz
  • Arthur Cayley
View Answer

Write For Us.

Contribute the Community.