Unity coding interview
questions, leaked.
4 problems reported across recent Unity interviews. Top patterns: array, math, number theory. The list below is what most reported candidates actually saw, plus the honest play if you can't grind all of it.
Unity's coding interview hammers array and math problems. You're looking at four medium-difficulty questions, all of which require solid pattern recognition on the first pass. The good news: there's no easy filler, which means you won't face curveballs on setup. The bad news: all four are real work. Every problem expects you to spot the optimization path immediately. If you blank mid-assessment, StealthCoder runs invisibly during screen share and surfaces a working solution while the proctor sees nothing.
Top problems at Unity
| # | Problem | Diff | Frequency | Pass % | Patterns |
|---|---|---|---|---|---|
| 01 | Number of Subarrays With LCM Equal to K | MEDIUM | 100.0 | 40% | Array · Math · Number Theory |
| 02 | Insert Delete GetRandom O(1) | MEDIUM | 89.8 | 55% | Array · Hash Table · Math |
| 03 | Remove Colored Pieces if Both Neighbors are the Same Color | MEDIUM | 89.8 | 63% | Math · String · Greedy |
| 04 | Product of Array Except Self | MEDIUM | 89.8 | 68% | Array · Prefix Sum |
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 Unity OA. The proctor cannot see it. Screen share cannot detect it. Built by an Amazon engineer who used it to pass JPMorgan's OA and system design loop.
Get StealthCoder- array3 · 75%
- math3 · 75%
- number theory1 · 25%
- hash table1 · 25%
- design1 · 25%
- randomized1 · 25%
- string1 · 25%
- greedy1 · 25%
- game theory1 · 25%
- prefix sum1 · 25%
Arrays and math dominate the interview pool. Three of four problems center on arrays, and three involve mathematical insight. You'll see prefix sums, subarrays, and number theory constraints. The remaining problems blur into design and game theory, but they're tactical weight, not focus. Start by drilling product arrays and subarray LCM patterns, both medium-tier but high-confidence wins. String and greedy appear once, so treat them as bonuses. The real hedge: if you freeze on a number-theory edge case or design constraint during the live OA, StealthCoder solves it in seconds and gets you back on track without a proctor seeing a thing.
Companies with similar patterns
If you prepped for Unity, these companies recycle ~60% of the same topics.
You've seen the list.
Now make sure you pass Unity.
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 used it to pass JPMorgan's OA and system design loop. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Unity interview FAQ
Should I focus on arrays or math first for a Unity interview?+
Start with arrays. Three of the four problems are array-based, and they overlap with the math topics anyway. Prefix sums and subarrays are your foundational wins. Math and number theory come attached to array problems, so you'll cover both threads at once.
How much of my prep should cover hash tables and design?+
Hash tables and design each appear in one problem. They're secondary. Drill arrays and math first until you're confident, then spend spare time on the design and randomization problem. Unity's interview prioritizes array optimization over system design.
Is there a game-theory problem I need to study for?+
Yes, one problem blends game theory with greedy logic and strings. It's a medium problem, so it won't require advanced game-theory textbook knowledge. Focus on greedy intuition and understanding when a game state is winning or losing. That one problem is isolated.
What's the hardest part of Unity's array and math problems?+
Spotting the optimization. All four are medium difficulty, and none test basic iteration. You'll need to recognize prefix sums, LCM constraints, or mathematical properties at a glance. Practice reading the problem statement and immediately seeing which pattern it fits.
How many days should I spend prepping for a Unity OA?+
You have four specific problems in the pool. Two to three days of deliberate practice on array and math patterns, with mock runs on similar problems, gets you solid. The tail risk is the design and game-theory outliers, so spend day three on those. That covers 80 percent of the interview shape.