Arrays In Data Structures - Study Mode

[#71] What is the time complexity of searching for an element in an unsorted array?
Correct Answer

(C) O(n)

[#72] Which of the following is a disadvantage of arrays?
Correct Answer

(B) Fixed size

[#73] How do you declare a 2D array in Python?
Correct Answer

(C) array = [[0 for i in range(m)] for j in range(n)]

[#74] What is the advantage of using arrays over linked lists?
Correct Answer

(B) Better cache locality

[#75] What is the time complexity of deleting an element from an array?
Correct Answer

(B) O(n)