Microsoft Software Engineer Interview Experience — A 90-Minute OA and Only Time for Brute Force

Microsoft·Software Engineer·Aug 2026
Online Assessmenthard

The latest OA: 90 minutes, two questions, with AI hints for the second question. I only managed to write a brute-force solution for the second one. It probably needed DP, but I ran out of time.
2571
You are given an integer array requiredSum of length n. Build an array result of length n that satisfies all of these conditions:
1.        result is non-decreasing: result[i] ≤ result[i + 1] for every valid i.
2.        The sum of the digits of result[i] equals requiredSum[i].
3.        1 ≤ result[i] ≤ 5000.
Return the number of distinct arrays result that can be built, modulo 10^9 + 7.
Example
•        Input: requiredSum = [1]
•        Output: 4
•        Explanation: The valid values are 1, 10, 100, and 1000, each with digit sum 1.
Constraints
•        1 ≤ n ≤ 5000
•        1 ≤ requiredSum[i] ≤ 31

Published

Curated and edited by PracHub

Practice the questions from this interview

Discussion

Sign in to join the discussion. The author is notified of every comment.

Loading comments…

Interview at a glance

Company
Microsoft
Role
Software Engineer
Rounds
Online Assessment
Difficulty
hard
Interview date
Aug 2026
Questions from this interview
1 question

Real Microsoft interview experiences

First-hand reports from Microsoft candidates — the rounds, the questions they were asked, and how it went.

All 63 Microsoft interview experiences