Words in plain English
Interview words that sound harder than they are. Each one with a picture you can keep in your head.
| Pointer | Just a number saying "which position I'm looking at", like a finger on a line of text. "Two pointers" means two fingers, for example one at the start and one at the end, walking toward each other. In a linked list, a pointer is "who is next in line", like each person holding the shoulder of the person in front. |
| O(1) | Same speed no matter how big. Looking up a room number on the hotel board: 50 rooms or 50,000, one look. |
| O(n) | Look at everything once. Reading every name on a list of 1,000 takes 1,000 looks. |
| O(log n) | Throw away half each step, like the "higher or lower" number guessing game. 1,000 items take about 10 steps, 1 million about 20, 1 billion about 30. |
| O(n log n) | Good sorting. 1 million items, about 20 million steps: fast enough. |
| O(n²) | Compare everything with everything. 1,000 people all shaking hands is about 1 million handshakes. 1 million people: far too slow. |
| Hash map | A lookup board: give a name, get the value in one step. In JavaScript: new Map(). |
| Set | A guest list: only answers "is this name on it?". In JavaScript: new Set(). |
| Stack | A pile of plates: you add and take from the top only. |
| Queue | A bank line: join at the back, served from the front. |
| Recursion | A function that asks a smaller copy of itself. "How deep is this family tree?" equals 1 plus "how deep is my deepest child's tree?". |
| Sliding window | A frame you slide along a list: grow it on the right, shrink it on the left, never go back. |
| In place | Rearrange inside the same list, without making a copy. |
| Memo / dynamic programming | Write each answer in a notebook the first time, so you never work it out twice. |
| Latency | How long one request takes. Throughput: how many requests per second. |
| Cache | A whiteboard of recent answers kept close, so you don't ask the slow place again. |
| Replica | A copy of the data on another machine, so one machine dying loses nothing. |
| Shard | Splitting data across machines, like A to M in one cabinet and N to Z in another. |
| Idempotent | Doing it twice has the same result as doing it once. Pressing a lift button again doesn't call two lifts. |
| Queue (in system design) | A to-do list between services: one side drops jobs in, workers take them out when free. |
| Log (in system design) | Not a debug log: an append-only list of events in order, like a bank statement. Kafka is one. |
| Race condition | Two people grab the last seat at the same moment, and both think they got it. |
How to read any page in this book
- Read "In plain words" first: the story is the whole idea.
- Then look at the examples and match each one to the story.
- Only then read "How it works", and watch the animation step by step.
- Close the page and tell the story out loud in your own words. If you can, you know it.