Indexing is a single arithmetic step, not a search. Because an array is a contiguous block of equal-size elements, the computer locates any element with one formula.
address = base_address + index * element_size
Give it the index and it computes the exact memory location directly. It never scans or walks through earlier elements first. Element 0 and element 999 take the same amount of work to reach.
This constant-time access holds no matter how large the array grows, which is why arrays back so many other structures. The one requirement is that every element be the same size, so the multiplication always gives the element's exact address.
Rewriting in plainer words…
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why do array indexes start at zero?Tie it to the formula. The index is an offset from the base address, so the first element sits at offset 0.
How can an array hold items of different sizes, like strings, and still index in O(1)?Store fixed-size references in the slots. The formula finds the reference, then one more step follows it to the data.
Why can't a linked list give you O(1) access by index?Nodes are scattered and each one knows only the next, so reaching position i means following i links from the head.
Indexing an array is one arithmetic step, not a search, so it costs the same no matter which element you ask for.
An array is one contiguous block where every element has the same size, so each element sits at a predictable offset from the start.
To find element i, the computer takes the base address and adds i times the element size, and that gives the exact memory location.
It never walks past earlier elements, so element 0 and element 999 take the same work, however large the array grows. That's why so many other structures are built on arrays.
The one requirement is equal-size elements. If sizes varied, the multiplication would no longer land on the right address.
Weak answers to avoid
Says arrays are just fast, with no mechanismThat restates the claim. Give the formula, base address plus index times element size, and say the computer works it out in one step.
Forgets the equal-size requirementContiguous memory alone isn't enough. Without same-size elements the multiplication misses, so say it and show you know why the formula works.
Mixes up access by index with search by valueClaiming find or contains is also O(1) is wrong. Looking for a value still scans the array. Only a known position is constant time.
Only says RAM is random accessThat's half of it. RAM lets you jump to any address, but the array's layout is what lets you compute that address from the index.
Interview lens
Likely follow-ups, what you can say, and the weak answers to avoid.