Loading practice questions
What is the time complexity of accessing an element by index in an array?
Correct Answer: C — O(1)
Explanation:
Arrays support direct index-based access. The memory address is calculated as base_address + index × element_size, making it O(1).