Company-style OA practice sets with full problem statements, sample test cases, and solutions.
Have you recently taken Microsoft's Online Assessment or coding test? Share the questions, test cases, or assessment patterns you encountered. Earn SWE180 Coins for every verified submission and use them to unlock other company OA sets and premium tools for free!
Alexa is given N piles where each pile has a certain number of boxes.
In one step, she can choose a pile with the maximum height and reduce it to the height of the next strictly smaller pile.
Find the minimum number of steps required to make all piles of equal height.
Example 1
Input
3 5 2 1
Output
3
Explanation
Step 1: Reduce pile 5 to 2. Piles become [2, 2, 1].
Step 2: Reduce one pile 2 to 1. Piles become [2, 1, 1].
Step 3: Reduce the other pile 2 to 1. Piles become [1, 1, 1].
Total steps = 3.
You are given an array of strings arr. A string s is formed by the concatenation of a subsequence of arr that has unique characters.
Return the maximum possible length of s.
Example 1
Input
3 cha r acters
Output
6
Explanation
Possible concatenations with unique characters are "cha" and "r" -> "char" (length 4).
"acters" has length 6 (all unique).
Maximum length is 6.
Gain complete transparency into the Microsoft online assessment process. Prepare effectively with real, verified coding challenges, test patterns, and platform details.
Wondering what top companies are actually asking in their initial screening rounds? We provide exact Data Structures, Algorithms, and logical reasoning questions reported by candidates who recently took the Microsoft online tests. Stop guessing and start practicing the right problems.
Understand exactly how many questions to expect, the typical time limits, and the platforms used (e.g., HackerRank, Codility, CodeSignal). Knowing the format in advance is the first step to clearing the Microsoft OA.