50_MCQ_Array_Data_Structure
50_MCQ_Array_Data_Structure
1. What is an array?
A) A collection of different data types
B) A collection of similar data types stored in contiguous memory
C) A collection of key-value pairs
D) None of the above
Answer: B
7. What is the worst-case time complexity for searching an element in an unsorted array?
A) O(1)
B) O(n)
C) O(log n)
D) O(n log n)
Answer: B
13. How can you efficiently find the missing number in an array containing numbers from 1 to n?
A) Using Hashing
B) Sorting and scanning for missing numbers
C) Using XOR operation
D) Both B and C
Answer: D
14. Which data structure is most efficient for implementing a circular queue using an array?
A) Stack
B) Circular Linked List
C) Circular Buffer
D) Binary Heap
Answer: C