McKinsey coding interview
questions, leaked.
4 problems reported across recent McKinsey interviews. Top patterns: depth first search, breadth first search, array. The list below is what most reported candidates actually saw, plus the honest play if you can't grind all of it.
McKinsey's coding assessments are short but hard. Four problems, one of them rated hard, all medium-to-hard difficulty. You're looking at graph traversal, union-find, and bit manipulation under time pressure. The problems lean heavily on depth-first search and breadth-first search, with array work woven in. If you blank on a graph connectivity problem mid-assessment, StealthCoder runs invisibly and surfaces a working solution while the proctor sees only your screen. This is your hedge for whatever pattern you didn't drill.
Top problems at McKinsey
| # | Problem | Diff | Frequency | Pass % | Patterns |
|---|---|---|---|---|---|
| 01 | Maximal Score After Applying K Operations | MEDIUM | 100.0 | 64% | Array · Greedy · Heap (Priority Queue) |
| 02 | Shortest Bridge | MEDIUM | 100.0 | 59% | Array · Depth-First Search · Breadth-First Search |
| 03 | Number of Operations to Make Network Connected | MEDIUM | 97.7 | 65% | Depth-First Search · Breadth-First Search · Union Find |
| 04 | Minimum One Bit Operations to Make Integers Zero | HARD | 80.2 | 73% | Dynamic Programming · Bit Manipulation · Memoization |
Frequencies derived from public community-tagged interview reports. Click a row to view on LeetCode.
You have a week, maybe less. You can't out-grind the list above. StealthCoder runs invisibly during the actual McKinsey OA. The proctor cannot see it. Screen share cannot detect it. Built by a senior engineer who knows the OA is theater. This is the script.
Get StealthCoder- depth first search2 · 50%
- breadth first search2 · 50%
- array2 · 50%
- union find1 · 25%
- graph1 · 25%
- dynamic programming1 · 25%
- bit manipulation1 · 25%
- memoization1 · 25%
- greedy1 · 25%
- heap priority queue1 · 25%
The dataset skews toward traversal algorithms. DFS and BFS each appear twice across the top problems, and they're almost always paired with other topics like union-find or matrix manipulation. Array and greedy show up together in the heap problem, and the hard problem is pure bit manipulation with memoization. There's no easy tier, so assume you'll spend time thinking, not just coding fast. Drill DFS and BFS traversals on graphs and matrices first. Union-find is the surprise topic that few candidates nail under pressure, so practice that next. The bit manipulation problem is a wall for most people, which is exactly when StealthCoder becomes your safety net on the live OA.
Companies with similar patterns
If you prepped for McKinsey, these companies recycle ~60% of the same topics.
You've seen the list.
Now make sure you pass McKinsey.
Memorizing every problem above in a week is a fantasy. StealthCoder is the hedge: an AI overlay that's invisible during screen share. It reads the problem on screen and surfaces a working solution in under 2 seconds. Built by a senior engineer who knows the OA is theater. This is the script. Works on HackerRank, CodeSignal, CoderPad, and Karat.
McKinsey interview FAQ
Should I study union-find before DFS/BFS for McKinsey?+
No. DFS and BFS dominate the top problems here, appearing in at least three of the four. Union-find is on one problem and often feels harder to debug live. Drill traversal first, then union-find as your second priority. You'll hit the traversal problems first in the assessment.
Is there an easy warm-up problem in McKinsey's assessments?+
No. All reported problems are medium or hard. Expect the entire assessment to demand focus from the first problem. There's no gimme problem to settle your nerves. Budget your time knowing every problem requires real thinking.
How much bit manipulation should I prepare for?+
One hard problem uses it, paired with dynamic programming and memoization. It's not the majority of the assessment, but it's the hardest one. Study bit basics and memoization patterns, but don't let it consume your prep. Spend more time on graph problems, where you'll have more chances to score.
Do I need to know greedy and heap together?+
The top problem pairs them on an array operation task. If you know heap operations and can spot when greedy is the right approach, you'll handle it. They're less frequent than graph topics, but this problem shows McKinsey likes algorithm hybrids.
What's the fastest way to prep for this in a week?+
Day 1-2: DFS and BFS on graphs and matrices. Day 3-4: Union-find and connected components. Day 5: Greedy and heap patterns. Day 6: Bit manipulation basics. Day 7: Timed run-throughs. You can't master all four problems, but you can be dangerous on traversal and have backup knowledge for the rest.