Readings No. 5
Linked Lists
- Linked lists are strug together via nodes. It kind of reminds me of blockchain diagrams.
- The reading part 1 made a good point about data structures: arrays, variables, hashes, objects. I’m starting to think of these structures as containers for data. Buckets.
- linked lists are also a data structure, a linear one. Arrays are also a linear data structure. In linear structures, order matters!
- Linked lists use less memory than arrays. Because you don’t have to make space and hold space for each and every index.
- They can grow dynamically, hence, dll’s.
- In linked lists, nodes are the atoms that make up the molecules. Nodes have two parts, the data, and the reference to the next node.
- a node only knows 2 things: what’s in it, and who it’s neighbor is.