GK Question

technology medium fill_blank

The time complexity of accessing an element in an array by index is ________.

Answer: O(1)

Array access by index is O(1) constant time because memory address is calculated directly: base_address + index * element_size. No traversal needed. Contrasts with linked lists (O(n) for access). This efficiency makes arrays ideal for random access patterns, but insertion/deletion in middle is O(n) due to element shifting.

Topic Programming Logic
Exam Relevance SSC JE, Banking IT, Railway