Just finished it recently Microsoft 2026 SDE New Grad OA, one sentence summary: Microsoft OA in 2026 is still a 2-question system, but the difficulty and engineering details requirements have been significantly improved. The platform is mainly HackerRank (75-90 minutes). The question types are mainly Medium, with occasional Medium-Hard. It pays more and more attention to optimization thinking, boundary processing and code stability.
I have compiled some of the most frequent real questions in 2026, with core ideas and pitfall avoidance suggestions to help you pass the test quickly.

Microsoft OA basics
Platform: HackerRank/Codility
Number of questions: 2
Time: 75–90 minutes (part Codility 110 minutes)
Difficulty: Mainly Medium, occasionally Medium-Hard
Microsoft OA high-frequency real questions-Compiled by Programhelp
Question 1: Maximum production quantity of alloy
Question description
A foundry produces alloys from n different metals. For each metal:
Composition[i]Represents the quantity of the metal required to produce 1 unit of the alloyStock[i]Indicates the quantity of the metal currently in inventoryCost[i]Indicates the purchase cost per unit of the metal
Given a limited budget, calculate the maximum number of units of alloy that can be produced using existing inventory and purchasing replenishments within budget.
Example
Enter:
N=2
Composition = [1, 2]
Stock = [0, 1]
Cost = [1, 1]
Budget = 3
Calculation process:
- Produce 1 unit of alloy:
- Requirements: [1, 2]
- Inventory: [0, 1]
- Need to purchase: [1, 1]
- Purchase cost: 1×1 + 1×1 = 2 (within budget)
- Produce 2 units of alloy:
- Requirements: [2, 4]
- Inventory: [0, 1]
- Need to purchase: [2, 3]
- Procurement cost: 2×1 + 3×1 = 5 (over budget)
Therefore a maximum of 1 unit can be produced and the answer is 1.
Function description
Completion function FindMaximumAlloyUnits, the parameters are as follows:
Int composition[n]: 1 The composition of each metal in the unit alloyInt stock[n]: Current inventory of each metalInt cost[n]: Unit purchase cost of each metalInt budget:Total budget
Returns: the maximum number of alloy units that can be produced
Question 2: Maximum team size
Question description
Given n employees,StartTime[i] Indicates the working hours of the i-th employee,EndTime[i] Indicates the off-duty time of employee i.
Employee i and employee j can interact if and only if their working hours overlap.
The condition for the establishment of a team is that at least one employee in the team can interact with all other employees in the team.
Find the maximum team size that meets the conditions.
Example 1
Enter:
N=5
StartTime = [1, 6, 4, 3, 1]
EndTime = [2, 7, 5, 8, 2]
Analyze:
In team [1,2,3], employee 3 can interact with two other employees, so team size 3 is feasible, larger teams cannot be formed, and the answer is 3.
Example 2
Enter:
N=4
StartTime = [2, 5, 6, 8]
EndTime = [5, 6, 10, 9]
Analyze:
Employee 1 in team [0,1,2] can interact with two other people, employee 2 in team [1,2,3] can interact with two other people, the maximum size is 3, and the answer is 3.
Function description
Completion function GetMaximumTeamSize, the parameters are as follows:
Int startTime[n]: Array of employee working hoursInt endTime[n]: Array of employee off-duty time
Returns: Maximum possible team size
Constraints: 1 ≤ n ≤ 2×10⁵, 1 ≤ startTime [i] ≤ endTime [i] ≤ 10⁹
Topic 3: Dominating XOR
Question description
Given an array arr containing n positive integers, count the number of unordered pairs (i,j) (0 ≤ i < j < n) that satisfy the following conditions:
Arr[i] XOR arr[j] > arr[i] AND arr[j]
XOR represents bitwise XOR operation, and AND represents bitwise AND operation.
Example
Input: n = 4, arr = [4, 3, 5, 2]
All unordered pairs are calculated as follows:
Sheet
| Index pair | XOR results | AND results | XOR > AND |
|---|---|---|---|
| (0,1) | 7 | 0 | True |
| (0,2) | 1 | 4 | False |
| (0,3) | 6 | 0 | True |
| (1,2) | 6 | 1 | True |
| (1,3) | 1 | 2 | False |
| (2,3) | 7 | 0 | True |
There are 4 pairs that satisfy the condition, so 4 is returned.
Function description
Completion function DominatingXorPairs, the parameter is the array arr, and returns the number of unordered pairs that meet the conditions.
Constraints: 1 ≤ n ≤ 10⁵, 0 ≤ arr[i] ≤ n
Question 4: Maximum possible MEX
Question description
Given an array arr containing n non-negative integers, you can perform any number of operations on any element in the array: decrement the value of the element by 1 (not negative).
The MEX of an array is defined as: the smallest non-negative integer that does not appear in the array.
Find the maximum possible MEX that the array can achieve after the above operations.
Example
Input: n = 3, arr = [3, 2, 3]
Best practices:
- Decrease arr[0] to 0
- Reduce arr[1] to 1
- Reduce arr [2] to 2
The array after the operation is [0,1,2] and the MEX is 3, which is the maximum possible value, so 3 is returned.
Function description
Completion function GetMaximumMEX, the parameter is the array arr, and returns the maximum possible MEX.
Constraints: 1 ≤ n ≤ 10⁵, 0 ≤ arr[i] ≤ n
After Microsoft OA is passed, it usually enters the VO link (Coding + System Design + Behavioral), and the overall process is relatively standardized.
Microsoft OA 2026 exam preparation exchange & follow-up suggestions
If you are preparing for Microsoft SDE/Intern/New Grad 2026 OA, please send a private message:
- Want to see the detailed Python/Java complete code of a certain question?
- Need more variations or Debug question templates?
- Want to know about Microsoft follow-up interview (Leadership Principles, System Design) experience?
- Want to know how Programhelp has helped millions of students pass the exam? Traceless OA assists Plan?
I wish everyone can successfully pass the 2026 Microsoft OA and get your favorite offer as soon as possible! Maintain stable output and sprint~