Linked lists use non-contiguous memory — nodes are scattered like islands in an ocean, connected only by pointers (boats). Unlike arrays (houses on a street), nodes can be anywhere memory is free.
Arrays are like a row of houses on Main Street — all neighbors, easy to walk between. Linked lists are like islands — you need a boat (pointer) to travel between them. Island 1 might be near the coast, Island 2 in the middle of the ocean, Island 3 back near the shore.
Arrays are like houses on a street (Neighbors).
Linked Lists are like Islands in an ocean.
You can't walk from Island 1 to Island 2. You need a Pointer (Boat) to get there.
We don't need a huge empty block of land. We can build an island anywhere there is a tiny spot of free space!
The Memory Landscape
When you create nodes dynamically, the operating system finds free memory slots — wherever they are. Node 1 might be at address 1000, Node 2 at 5000, Node 3 at 2000. No pattern, no requirement to be neighbors.
Why This Matters
The Pointer Bridge
The only way to get from Island A to Island B is the pointer. Lose the pointer? You're stranded. This is why pointer manipulation is critical — one wrong assignment breaks the chain.
This design allows efficient use of fragmented memory. Arrays need one big empty block, but linked lists can use tiny scattered pieces. This is why dynamic allocation works so well.
"Why can linked lists use fragmented memory efficiently?"
Because nodes don't need to be neighbors. Each node can be allocated anywhere there's free space, and pointers connect them. Arrays require one contiguous block.