Reported December 2024
Microsoftdynamic programming

Sum with Tiles

Reported by candidates from Microsoft's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.

Get StealthCoderRuns invisibly during the live Microsoft OA. Under 2s to a working solution.
Founder's read

Microsoft's December 2024 OA included Sum with Tiles, a deceptive problem that looks like basic arithmetic but hinges on recognizing a geometric or combinatorial pattern. You're probably expecting a straightforward summation, but the trick is in how the tiles actually combine or constrain each other. This is the kind of problem where a wrong approach eats all your time. StealthCoder runs invisibly during your assessment and can pattern-match this in seconds if you blank on the insight.

Pattern and pitfall

Sum with Tiles almost certainly involves either tiling a space under constraints (dynamic programming), computing sums over tile placements, or recognizing that the tiles follow a recurrence relation. The common trap is brute-forcing every valid configuration. Instead, you need to spot whether this is a DP problem where each tile state builds on previous states, or a math problem where the sum telescopes or follows a formula. Test small cases (tiles of size 1, 2, 3) to find the pattern before coding. The insight usually isn't the code; it's the recurrence or closed form. StealthCoder acts as a safety net if you stall on the pattern during the live OA.

StealthCoder is the hedge for the one pattern you didn't drill. It runs invisibly during the screen share.

If this hits your live OA

You can drill Sum with Tiles cold, or you can hedge it. StealthCoder runs invisibly during screen share and surfaces a working solution in under 2 seconds. The proctor sees the IDE. They don't see what's behind it. If you're reading this with an OA window open, you're who this was built for.

Get StealthCoder

Related leaked OAs

⏵ The honest play

You've seen the question. Make sure you actually pass Microsoft's OA.

Microsoft reuses patterns across OAs. If you're reading this with an OA window open, you're who this was built for. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Sum with Tiles FAQ

Is this a dynamic programming problem?+

Likely yes. Tiling problems almost always reduce to DP where you compute the number of ways to fill a space using tiles of given sizes. Check if the sum is over all valid tilings or a single optimal tiling. Work out the base cases by hand first.

How do I find the pattern in 48 hours?+

Write out the sum for tiny inputs (n=1, 2, 3, 4, 5). Look for differences, ratios, or recurrence. If it's Fibonacci-like, you've got the pattern. If it telescopes, great. Don't start coding until you see it.

Will brute force pass?+

Probably not. If n can be large (even moderately large like 30-40), brute force over all tilings times the sum computation will TLE. The problem expects you to compute the sum implicitly, not enumerate.

What if the tiles have different sizes or costs?+

The DP state likely includes which tiles you've used and the remaining space. Sum transitions based on which tile you place next. This shifts from 'number of ways' to 'sum of outcomes', which is still DP but requires careful state design.

Is this a Microsoft-hard problem?+

It's medium at worst. The difficulty is in spotting the recurrence, not in implementation. Once you see it, the code is clean. Microsoft often tests pattern recognition over grinding. If you blank, that's where having a safety net helps.

Problem reported by candidates from a real Online Assessment. Sourced from a publicly-available candidate-aggregated repository. Not affiliated with Microsoft.

OA at Microsoft?
Invisible during screen share
Get it