First off, I hope I placed this in the appropriate section. If so...
I've been programming for a while, but this may be a simple question to some (or many).
My Question: If a data structure already exist directly in RAM, then why do we need to spend the processing power to iterate in order to find the right data? (Side Note: pointers still exist in managed languages. They're just handled for you)
All that would actually be in RAM is:
index 0, index1, index 2
Index 0: --> GET VALUE '10'; FALSE; Next Address!
Index 1: --> GET VALUE '15'; FALSE; Next Address!
Index 2: --> GET VALUE '5'; TRUE; RETURN Value!
It doesn't work like this. RAM is like one huge array of bytes e.g. char MyWholeRAM[4 294 967 296] for 4 GB.
Every byte (char) has a unique address numbered from 0x00000000 - 0xffffffff
I'll spare you details about paging and kernel space/user space.
A pointer is just an address of one location stored at another location. The CPU can only load a few values at once in its registers so iterating through RAM means loading data in registers, do a calculation or comparison, and store the value.
Some times it needs to know that another value is at a particular place in RAM and that's when a pointer tells it where it is.
A linked list would be stored as a pointer to the next node or NULL if there are no more nodes, and the actual data. The other node would again contain a pointer (really just a 4 byte value like another or 8 bytes in case of x64)