这篇 Microsoft interview is not a "question summary" in the traditional sense, but a real observation record compiled by ProgramHelp after assisting many students in completing the Microsoft Online Assessment in recent times.
Interestingly, this round of Microsoft OA did not significantly increase the difficulty of the algorithm, but the pass rate was not high.
The question is not "whether you can do the questions", but whether you understand what Microsoft really wants to judge through OA.
Microsoft OA process review
Judging from the multiple batches of Microsoft Online Assessments that ProgramHelp has recently assisted, the overall shape of Microsoft OA is relatively stable, but the requirements for details have always been underestimated.
Microsoft OA is not a test to see whose algorithm is more difficult, but a very typical round of "basic ability + stability screening".
Basic form of OA
In most software positions (SDE / New Grad / Intern), Microsoft OA usually has the following characteristics:
- Completed online, local IDE is not allowed
- Total duration generally ranges from 75–90 minutes
- The questions are mainly 2-3 programming questions
- Some batches will include a small number of logical or mathematical thinking questions.
The overall rhythm is tight, but it does not pursue extreme speed, but requires delivering runnable solutions within a limited time.
Question type distribution
Based on feedback from this and past students, the main distribution of question types is:
- String processing accounts for the majority
- Common test points: coherent characters, palindrome, lexicographic order.
- The essence is to scan, segment, and compare strings. The difficulty is medium, but there are many details.
- Array & Graph basic questions
- Prefer conventional algorithms, such as array manipulation, BFS/DFS.
- There won't be too weird questions, it mainly depends on whether the basic skills are solid or not.
- Classic patterns high frequency test
- Two Sum Series
- Sliding Window
- Greedy choice (interval/substring type)
- Dynamic programming is occasionally tested, but generally not in depth.

Microsoft OA real question sharing
I. Programming Problems (2 Questions)
Programming Problem 1: Longest Valid Parentheses
Problem Description
Given a string containing only '(' and ')', find the length of the longest valid (well-formed) parentheses substring. A valid parentheses substring must have properly paired and nested parentheses. For example, "()() " and "(())" are valid parentheses substrings, "())" and "(())" and "(())" are valid parentheses substrings. For example, "()()" and "(())" are valid parentheses substrings, while "())" and "(())" are invalid. " are invalid.
Examples
- Example 1: Input: s = "(()", Output: 2. Explanation: The longest valid parentheses substring is "() ", with a length of 2.
- Example 2: Input: s = ")()()())", Output: 4. Explanation: The longest valid parentheses substring is "()()() ", with a length of 4.
- Example 3: Input: s = "", Output: 0.
Requirements
- Time complexity must not exceed O(n) (where n is the length of the string).
- Space complexity must not exceed O(n).
Programming Problem 2: Task Scheduler
Problem Description
Given a character array representing tasks that a CPU needs to execute. Each letter represents a different type of task. Tasks can be executed in any order, and each task takes 1 unit of time to complete. Tasks can be executed in any order, and each task takes 1 unit of time to complete. At any unit of time, the CPU can either execute a task or be in an idle state.
There must be a cooldown period of integer length N That is, there must be at least two tasks of the same type. N consecutive units of time where the CPU is either executing a different task or in an idle state.
Calculate the minimum time required to complete all tasks.
Examples
- Example 1: Input: tasks = ["A", "A", "A", "B ", "B", "B"], n = 2, Output: 8. Explanation: One possible execution order is A -> B -> ( Idle) -> A -> B -> (Idle) -> A -> B, with a total time of 8 units.
- Example 2: Input: tasks = ["A", "A", "A", "B ", "B", "B"], n = 0, Output: 6. Explanation: There is no cooldown period, so all tasks can be executed in sequence directly, with a total time of 6 units.
- Example 3: Input: tasks = ["A", "A", "A", "A", "A ", "A", "A", "B", "C", "D", "E", "F", "G"], n = 16. "D", "E", "F", "G"], n = 2, Output: 16. Explanation: One possible execution order is A -> B -> C -> A -> D -> E -> A -> F -> G -> A -> (Idle) -> (Idle) -> A -> (Idle) -> (Idle) -> A, with a total time of 16 units.
Requirements
- Time complexity must not exceed O(m) (where m is the length of the task list).
- Space complexity must not exceed O(26) (since tasks only consist of 26 uppercase English letters).
II. Logical/Mathematical Mini-Questions (5 Questions)
Mini-Question 1: Logical Reasoning
A Microsoft team has three engineers: Jia, Yi, and Bing, each responsible for one of three areas: Frontend, Backend, and Algorithms. The following information is known. information is known.
- Jia is not responsible for Frontend.
- Yi is not responsible for Backend.
- The engineer in charge of Algorithms and the engineer in charge of Frontend are colleagues and have different genders (assuming the three have different genders, and Jia is male). The engineer in charge of Algorithms and the engineer in charge of Frontend are colleagues and have different genders (assuming the three have different genders, and Jia is male).
Which area is Bing responsible for?
A. Frontend B. Backend C. Algorithms D. Cannot be determined
Mini-Question 2: Mathematical Calculation
There is a positive integer array with all distinct elements. When each element in the array is multiplied by 2, the number of elements in the intersection of the new array and the original array is half the length of the original array, and the length of the original array is even. of the new array and the original array is half the length of the original array, and the length of the original array is even. It is known that the smallest element in the original array is 1 and the largest is 10. It is known that the smallest element in the original array is 1 and the largest is 10. What could be the length of the original array?
A. 2 B. 4 C. 6 D. 8
Mini-Question 3: Probability Problem
A bag contains 5 red balls and 3 white balls. One ball is randomly drawn from the bag each time, and the ball is not put back after drawing. Two balls are drawn consecutively. One ball is randomly drawn from the bag each time, and the ball is not put back after drawing. two balls are drawn consecutively. What is the probability that the first ball drawn is red and the second is white?
A. 15/56 B. 15/28 C. 5/14 D. 3/14
Mini-Question 4: Logical Thinking
In a software development project, four modules (A, B, C, D) need to be completed, with dependency relationships between the modules as follows.
- Module B can only start after Module A is completed.
- Module D can only start after both Modules B and C are completed.
- Module C can start at any time (no pre-dependencies).
If the development time for each module is 2 days, and only one module can be developed at a time, what is the minimum time required to complete all modules?
A. 6 B. 8 C. 10 D. 12
Mini-Question 5: Mathematical Analysis
It is known that the three sides of a right-angled triangle are all integers, and the length of one of the right-angled sides is 12. What is the maximum possible perimeter of this right-angled triangle?
A. 84 B. 90 C. 96 D. 102
Not being alone: taking you through with easeMicrosoft OA
Microsoft's OA looks like a routine, but there are actually quite a few details and traps. Many students are stuck in the boundary conditions or time allocation, which will affect the overall performance if they are not careful. In fact, as long as the direction is correct, OA can be completely "take" a level.
If you don't want to carry the load alone, Programhelp can give a real-time OA remote untethered assist:
Real-time voice reminder, encountering stuck points directly pointing out ideas;
On-line ghostwriting support, code details are articulated without trace throughout;
Mock practice in advance, simulating the pace of the real exam.
With assists, not only can you save time, but you can also capitalize on highly repetitive OA like Microsoft.