Constant vs Linear: jump straight there, or scan every box

Both work on the same array. Access by index jumps straight to one slot — always one step. Linear search checks slots one by one — in the worst case, all n of them.

Array size n =
…or click any box to access it directly.
Access by index — O(1)
1
one step, any n
Linear search — O(n)
0
grows with n