📚 dsaflash.cards
Problems
Log in
Sign up
Home
/
Data Structures
/
Arrays and Strings
Arrays and Strings
Question 1 of 5
Why is array access by index O(1)?
A
Arrays use a hash function to map indices to memory locations
B
The array is sorted, so binary search finds the element instantly
C
The CPU caches all array elements on first access
D
Elements are stored contiguously, so the address is computed directly as base + index * element_size
← Back to categories