Baidu coding interview
questions, leaked.
10 problems reported across recent Baidu interviews. Top patterns: dynamic programming, array, string. The list below is what most reported candidates actually saw, plus the honest play if you can't grind all of it.
Baidu's coding assessment is heavily dynamic-programming focused. Eight out of ten reported problems involve DP, and the difficulty split is brutal: zero easy problems, five medium, five hard. You're looking at problems like Arithmetic Slices II, Zuma Game, and Split Array Largest Sum on the live assessment. These aren't pattern-match problems you can drill in a week. If you freeze on a DP problem mid-interview, StealthCoder runs invisibly and surfaces a working solution while the proctor sees only your screen. The rest is on you.
Top problems at Baidu
| # | Problem | Diff | Frequency | Pass % | Patterns |
|---|---|---|---|---|---|
| 01 | Arithmetic Slices II - Subsequence | HARD | 100.0 | 55% | Array · Dynamic Programming |
| 02 | Out of Boundary Paths | MEDIUM | 97.8 | 48% | Dynamic Programming |
| 03 | Zuma Game | HARD | 97.8 | 31% | String · Dynamic Programming · Stack |
| 04 | Length of Longest Fibonacci Subsequence | MEDIUM | 97.8 | 58% | Array · Hash Table · Dynamic Programming |
| 05 | Longest Substring with At Least K Repeating Characters | MEDIUM | 97.8 | 45% | Hash Table · String · Divide and Conquer |
| 06 | Design In-Memory File System | HARD | 97.8 | 48% | Hash Table · String · Design |
| 07 | Integer Replacement | MEDIUM | 97.8 | 37% | Dynamic Programming · Greedy · Bit Manipulation |
| 08 | Split Array Largest Sum | HARD | 97.8 | 58% | Array · Binary Search · Dynamic Programming |
| 09 | Binary Tree Maximum Path Sum | HARD | 97.8 | 41% | Dynamic Programming · Tree · Depth-First Search |
| 10 | Arithmetic Slices | MEDIUM | 97.8 | 65% | Array · Dynamic Programming · Sliding Window |
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 Baidu 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- dynamic programming8 · 80%
- array4 · 40%
- string3 · 30%
- hash table3 · 30%
- memoization2 · 20%
- sliding window2 · 20%
- greedy2 · 20%
- stack1 · 10%
- breadth first search1 · 10%
- divide and conquer1 · 10%
Dynamic programming dominates Baidu's interview loop, appearing in 8 of 10 problems. The second tier includes arrays (4), strings (3), and hash tables (3), but they almost always appear as supporting topics inside DP solutions. Memoization, sliding window, and greedy each show up twice, which means you need those transitions solid. Hard problems like Design In-Memory File System and Zuma Game layer multiple patterns together. Start with Arithmetic Slices and Out of Boundary Paths to build momentum on medium DP, then tackle the hard problems that combine DP with arrays, strings, or tree traversal. When you hit a wall on the live OA, StealthCoder is your safety net.
Companies with similar patterns
If you prepped for Baidu, these companies recycle ~60% of the same topics.
You've seen the list.
Now make sure you pass Baidu.
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.
Baidu interview FAQ
How much DP should I drill before a Baidu assessment?+
Eight of ten reported problems involve DP. You can't avoid it. Start with the medium problems (Arithmetic Slices, Out of Boundary Paths, Integer Replacement) and spend most of your prep time on DP recurrence patterns. Hard DP problems like Split Array Largest Sum combine binary search and greedy; those come second.
What's the quickest way to identify which DP problems Baidu asks?+
Look at Arithmetic Slices II, Zuma Game, and Split Array Largest Sum. These three capture the range: subsequence DP, memoized search, and DP with optimization. If you can sketch solutions to those, you've seen most of what Baidu throws at you.
Should I study arrays and strings separately, or are they always in DP?+
In Baidu's reported problems, arrays and strings almost never appear alone. They're embedded in DP or design problems. Drill them as DP subproblems first. Focus on length-based DP and substring/subarray patterns, not standalone array manipulation.
Is memoization as important as bottom-up DP for Baidu?+
Memoization appears in two reported problems (Zuma Game, Integer Replacement), but it's a secondary tag. Master bottom-up DP logic first. Memoization is the fallback when top-down is cleaner, not the primary strategy.
What if I blank on a hard DP problem during the live assessment?+
That's exactly why you need a hedge. StealthCoder reads the problem in real time and provides a working solution invisibly while you're screen-sharing. You paste it, adjust if needed, and keep moving. You studied the core patterns; StealthCoder covers what you didn't predict.