Vasu Patel logoVasu Patel
← Python DSA — Interview Prep
All chapters in this track
  1. 010. How FAANG Interviews Work
  2. 021. Big-O Complexity
  3. 032. Arrays & Strings
  4. 043. Hashing
  5. 054. Stacks & Queues
  6. 065. Linked Lists
  7. 076. Binary Search
  8. 087. Trees
  9. 098. Heaps
  10. 109. Graphs
  11. 1110. Recursion & Backtracking
  12. 1211. Dynamic Programming
  13. 1312. Sorting & Advanced Search
  14. 1413. Tries
  15. 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:

AxisWhat they look for
Problem solvingCan you break it down? Brute force first, then optimise
CommunicationDo you think aloud? Explain decisions before coding
CodingClean, readable code; handles edge cases
VerificationDo 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 / phraseThink 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