Mid-level 3
- Arrays, Lists & Memory LayoutArrays are the structure everything else is built on, and their advantage is not an operation count — it is physical contiguity. A CPU reads memory in cache lines of 64 bytes and aggressively prefetches sequential addresses, so a linear…, not read
- Hash TablesA hash table turns a key into an array index by hashing it, which is why lookup is O(1) — you compute the address rather than search for it. Everything interesting follows from what happens when two keys compute the same address. The…, not read
- Trees & HeapsTrees buy you ordering at O(log n) — but only while they stay balanced, and an unbalanced binary search tree is a linked list wearing a costume. That single fact explains red-black trees, AVL trees, and B-trees, and it explains why…, not read