MCQs_on_Array_Data_Structure
MCQs_on_Array_Data_Structure
1. 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
6. 6. 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
10. 10. What is the time complexity of Kadanes algorithm used to find the maximum subarray sum?
A) O(n)
B) O(n log n)
C) O(n^2)
D) O(n^3)
Answer: A