All chapters in this track
- 010. How FAANG Interviews Work
- 021. Big-O Complexity
- 032. Arrays & Strings
- 043. Hashing
- 054. Stacks & Queues
- 065. Linked Lists
- 076. Binary Search
- 087. Trees
- 098. Heaps
- 109. Graphs
- 1110. Recursion & Backtracking
- 1211. Dynamic Programming
- 1312. Sorting & Advanced Search
- 1413. Tries
- 1514. Interview Patterns Cheat Sheet
Chapter 1 of 15
0. How FAANG Interviews Work
The Format
A typical FAANG coding interview is 45–60 minutes, structured roughly as:
5 min — Introductions, clarifying the problem
15 min — Discussing approach / brute force → optimised
20 min — Coding the solution
10 min — Testing, edge cases, complexity analysis
5 min — Your questions for the interviewer
You'll usually solve 1–2 problems on a shared editor (no IDE, no autocomplete).
What Interviewers Actually Evaluate
FAANG interviewers score on four axes — not just correctness:
| Axis | What they look for |
|---|---|
| Problem solving | Can you break it down? Brute force first, then optimise |
| Communication | Do you think aloud? Explain decisions before coding |
| Coding | Clean, readable code; handles edge cases |
| Verification | Do you test with examples? Trace through your code? |
A correct solution with zero communication scores lower than a nearly-correct solution with excellent reasoning.
The Think-Aloud Framework
Use this structure for every problem:
1. UNDERSTAND
- Restate the problem in your own words
- Ask clarifying questions (input types? null? empty? duplicates? sorted?)
- Work through 1–2 examples by hand
2. BRUTE FORCE
- State the naive solution first ("I could do this in O(n²) by...")
- Analyse its complexity
3. OPTIMISE
- Identify the bottleneck ("The nested loop is the issue...")
- Think about what data structure would help
- State the pattern ("This looks like a sliding window / two pointer / DP problem")
4. CODE
- Write clean code, naming variables clearly
- Explain each non-obvious line as you write it
5. TEST
- Walk through your code with the given example
- Test edge cases: empty input, single element, all same values, negatives
- State time and space complexity
Signal Words → Patterns
Memorise this table. Hearing a signal word should immediately suggest a pattern.
| Signal word / phrase | Think about |
|---|---|
| "sorted array", "pair that sums to" | Two pointers |
| "subarray", "substring", "contiguous", "window" | Sliding window |
| "k closest", "top k", "kth largest" | Heap |
| "prefix", "range sum", "count subarrays" | Prefix sum / hash map |
| "tree", "hierarchy", "parent-child" | DFS / BFS |
| "shortest path", "minimum steps", "level by level" | BFS |
| "all paths", "all combinations", "generate all" | Backtracking (DFS) |
| "minimum/maximum cost to reach", "number of ways" | Dynamic programming |
| "sorted", "find position", "rotated array" | Binary search |
| "unique", "count occurrences", "group by" | Hash map / set |
| "connected components", "union", "merge groups" | Union-Find |
| "prefix matching", "autocomplete" | Trie |