Arrays & Strings — The Complete MAANG Interview Guide (100 Problems)
Advertisement
Introduction
Arrays and Strings form the foundation of every technical interview. They appear in every MAANG/FAANG screening round and understanding their core patterns lets you crack 40% of all LeetCode problems.
- Why Arrays & Strings Are Critical
- The 7 Core Patterns
- Difficulty Distribution (100 Problems)
- Roadmap Index
Why Arrays & Strings Are Critical
- Frequency: ~35% of all FAANG coding rounds start with an array/string problem
- Pattern reuse: Prefix sum, two pointers, and sliding window appear across Trees, Graphs, and DP problems too
- Interview signal: Clean O(n) solutions demonstrate algorithmic maturity
The 7 Core Patterns
| Pattern | Problems It Solves |
|---|---|
| Prefix Sum | Range queries, subarray sums |
| Kadane's Algorithm | Maximum subarray variants |
| Two Pointers | Pair sums, palindromes, partitioning |
| Sliding Window | Fixed/variable window subarray |
| Hash Map / Set | Two sum, anagrams, duplicates |
| Dutch National Flag | 3-way partition, color sort |
| In-place Tricks | XOR, index marking, sign negation |
Difficulty Distribution (100 Problems)
- 🟢 Easy (1–25): Foundation — must solve in < 10 minutes
- 🟡 Medium (26–75): Core interview level — 20–30 minutes
- 🔴 Hard (76–100): Senior/Staff bar — 40–45 minutes
Each problem in this series includes:
- Problem statement + examples
- Intuition walkthrough
- Full solutions in C, C++, Java, JavaScript, Python
- Time & Space complexity
- Edge cases & follow-ups
Roadmap Index
| # | Problem | Difficulty | Pattern |
|---|---|---|---|
| 1 | Two Sum | 🟢 | HashMap |
| 2 | Best Time to Buy & Sell Stock | 🟢 | Min tracking |
| 3 | Contains Duplicate | 🟢 | HashSet |
| 4 | Maximum Subarray | 🟢 | Kadane |
| 5 | Move Zeroes | 🟢 | Two pointer |
| 6 | Plus One | 🟢 | Carry logic |
| 7 | Merge Sorted Array | 🟢 | 3-pointer |
| 8 | Remove Duplicates from Sorted Array | 🟢 | Two pointer |
| 9 | Single Number | 🟢 | XOR |
| 10 | Intersection of Two Arrays II | 🟢 | HashMap |
| ... | ... | ... | ... |
| 76 | Trapping Rain Water | 🔴 | Two ptr / Stack |
| 77 | Sliding Window Maximum | 🔴 | Mono deque |
| 78 | First Missing Positive | 🔴 | Index hash |
| 79 | Median of Two Sorted Arrays | 🔴 | Binary search |
| 80 | Largest Rectangle in Histogram | 🔴 | Mono stack |
Start with Problem 1 — Two Sum →
Advertisement