Oris
Today
Universe
Explore
Studio
Authors
Account
Урок 1 из 7
Why is reading arr[i] an O(1) operation?
The address is computed directly as base + i * elementSize, with no scanning.
The CPU searches from the front until it reaches index i.
Arrays keep a hash table mapping indices to values.
The array sorts itself so index i is always first.
Проверить
Today
Universe
Explore
Profile