Which of the following data structures are indexed structures?
-
linear arrays
-
linked lists
-
both of above
-
none of above
A
Correct answer
Explanation
Linear arrays are indexed structures because they allow direct access to any element using its index in constant time O(1). The index is used to calculate the memory address directly. Linked lists are sequential structures that require traversal from the head to access a specific element, making them non-indexed.