ZS Associates coding interview
questions, leaked.
9 problems reported across recent ZS Associates interviews. Top patterns: array, database, string. The list below is what most reported candidates actually saw, plus the honest play if you can't grind all of it.
ZS Associates interviews are array-heavy. Nine problems reported, and five of them test array fundamentals. You're looking at mostly medium difficulty with a clean split: four easy problems to build confidence, five mediums that test whether you can actually code under pressure. The company mixes in database questions too, which catches people off guard. If you blank on an array pattern mid-assessment, StealthCoder runs invisibly and surfaces a working solution in seconds. That safety net matters when you're balancing speed and correctness on their live OA.
Top problems at ZS Associates
| # | Problem | Diff | Frequency | Pass % | Patterns |
|---|---|---|---|---|---|
| 01 | Longest Harmonious Subsequence | EASY | 100.0 | 57% | Array · Hash Table · Sliding Window |
| 02 | Product of Array Except Self | MEDIUM | 88.5 | 68% | Array · Prefix Sum |
| 03 | Distribute Candies Among Children II | MEDIUM | 88.5 | 56% | Math · Combinatorics · Enumeration |
| 04 | Longest Unequal Adjacent Groups Subsequence I | EASY | 88.5 | 68% | Array · String · Dynamic Programming |
| 05 | Largest 1-Bordered Square | MEDIUM | 88.5 | 51% | Array · Dynamic Programming · Matrix |
| 06 | Crawler Log Folder | EASY | 88.5 | 72% | Array · String · Stack |
| 07 | Managers with at Least 5 Direct Reports | MEDIUM | 88.5 | 49% | Database |
| 08 | The Number of Employees Which Report to Each Employee | EASY | 88.5 | 52% | Database |
| 09 | Nth Highest Salary | MEDIUM | 88.5 | 38% | Database |
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 ZS Associates OA. The proctor cannot see it. Screen share cannot detect it. Built by an Amazon engineer who realized the OA tests how well you memorized 200 problems, not how well you code.
Get StealthCoder- array5 · 56%
- database3 · 33%
- string2 · 22%
- dynamic programming2 · 22%
- prefix sum1 · 11%
- math1 · 11%
- combinatorics1 · 11%
- enumeration1 · 11%
- greedy1 · 11%
- hash table1 · 11%
Array problems dominate here, so that's where your reps go first. Product of Array Except Self and Largest 1-Bordered Square are the teeth of the medium tier. Both require you to think in terms of prefix sums and matrix traversal. The easy problems (Longest Harmonious Subsequence, Crawler Log Folder) test counting and stack manipulation. Don't sleep on the database questions: they're SQL-based and appear frequently enough that skipping them costs you points. String and dynamic programming show up but aren't the focus. Hit arrays hard for a week, then run through database schema problems the night before. When you hit the OA, if you blank on a tricky DP pattern or a SQL JOIN, StealthCoder solves it invisibly while you stay calm and keep typing.
Companies with similar patterns
If you prepped for ZS Associates, these companies recycle ~60% of the same topics.
You've seen the list.
Now make sure you pass ZS Associates.
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 an Amazon engineer who realized the OA tests how well you memorized 200 problems, not how well you code. Works on HackerRank, CodeSignal, CoderPad, and Karat.
ZS Associates interview FAQ
How many array problems should I solve before the ZS assessment?+
Five of nine problems are array-based, so aim for 15 to 20 array drills minimum. Start with easy ones (Longest Harmonious Subsequence, Crawler Log Folder), then hit the mediums like Product of Array Except Self and Largest 1-Bordered Square. Array is your foundation here.
Should I study database before the OA?+
Yes. Three of nine problems are database queries. The Number of Employees Which Report to Each Employee and Nth Highest Salary test SQL fundamentals. If SQL isn't second nature, spend 2 to 3 hours drilling basic joins and window functions beforehand.
Is dynamic programming critical for ZS?+
It shows up twice across the problem set, so it's not the primary focus. Master arrays first. When you get to DP questions like Largest 1-Bordered Square or Longest Unequal Adjacent Groups Subsequence I, they build on array and prefix-sum concepts you've already drilled.
What's the hardest part of the ZS OA?+
No hard problems reported, but the mediums (Product of Array Except Self, matrix DP) test whether you can code efficiently under time pressure. The mix of array, database, and string problems means you can't specialize. Breadth beats depth here.
How much time should I spend on easy problems?+
Four of nine are easy, so don't skip them. They're quick confidence wins and often test foundational patterns (hash tables, stacks, string manipulation) that appear in harder problems. Spend one day on easy drills, then move to mediums.