← Kamana / Notes
Data structures4 min

Why arrays aren’t “just lists.”

They looked like the same thing to me. The difference is in how the computer actually stores them in memory.

01

What I thought

An array and a list were two words for the same idea — a bunch of things in a row. I used them interchangeably in my head.

02

What actually happens

An array is a block of memory laid out end to end. Because everything is the same size and next to each other, the computer can jump straight to item number five with a little arithmetic.

That’s why reading by position is so fast — and why inserting in the middle can be slow, since everything after it may have to shift.

address(item i) = start + i × size
03

What confused me

Why inserting into the middle was described as “expensive”. Once I pictured the memory physically, it made sense — there’s no free space between neighbours.

04

What finally made sense

The data structure isn’t just an idea; it’s a decision about memory. The shape you choose changes what is cheap and what is costly.

05

What I’m looking at next

Linked lists — and why they trade fast lookups for flexible inserts.


Written while figuring it out. Possibly wrong in places — that’s part of learning.

Next note — Computer scienceWhat happens after you type a URL?
Kamana Singh — India / 2026