Microsoft hub
Microsoft Online Assessment
Overview
Microsoft online assessment (OA) is the first hard filter for most fresher, campus, and off-campus SDE-style drives. This page covers the Microsoft OA format, what happens after you clear it, sample Microsoft OA questions with approaches, an 8-week prep plan, and mistakes that sink otherwise-strong candidates.
Patterns below are from student reports for 2025-2026. Platforms and section names can change by drive. Always confirm the college placement email for your window.
Microsoft hiring flow after the OA
| Stage | What candidates report | What you must show |
|---|---|---|
| 1. Online assessment | Often Codility / HackerRank style: 2 coding problems in about 60-90 minutes | Correctness + reasonable complexity under time |
| 2. Technical interviews | DSA + coding quality; some loops include design or debugging discussions | Explain approach, edge cases, complexity |
| 3. Later rounds | As-appropriate / A style rounds on many campus and full-time loops; HR for logistics | Depth beyond the OA pattern |
| 4. HR / offer | Role, location, CTC discussion | Consistency with resume |
Microsoft Online Assessment format
Test structure
| Component | From student reports details |
|---|---|
| Platform | Codility, HackerRank, or Microsoft-hosted depending on drive |
| Duration | Often 60-90 minutes for coding OA |
| Question mix | Usually 2 algorithmic problems; some invites add MCQs or debugging |
| Languages | C#, C++, Java, Python (confirm invite) |
| Scoring | Correctness across tests; performance tests fail slow solutions |
| Advance rate | Competitive; partial scores may still shortlist in some drives, but aim for full green |
What makes Microsoft OA feel distinct
- Codility-style performance tests punish quadratic solutions even if samples pass
- Clean, readable code is valued; Microsoft interviews often dig into your OA approach
- Mix of classic DSA and occasional string/array simulation
- Campus and off-campus formats can differ; trust the invite
Question types you should expect
Core DSA
- Arrays, prefix sums, two pointers
- Strings and parsing simulations
- Trees / BST basics
- Graphs when the prompt is clearly graph-shaped
- Greedy + sorting patterns
Secondary / role-dependent
- Debugging incorrect code snippets in some OA variants
- Basic CS MCQs in older/campus paper styles (less common on pure Codility invites)
What usually does not appear in the OA
- Deep Azure architecture design (later / role-dependent)
- Long essay writing like Wipro NTH
- Leadership Principles bank identical to Amazon
Sample Microsoft Online Assessment questions
Question 1: binary gap / bit patterns
Q: Find the longest sequence of zeros surrounded by ones in binary representation.
Classic Codility lesson. Iterate bits, track current zero run when inside a valid gap.
Watch leading zeros: only count gaps between ones.
Question 2: cyclic rotation
Q: Rotate array A by K positions.
Use modular indexing or reverse-based rotation. Handle K larger than n with K % n.
Empty array and K=0 are easy to miss.
Question 3: max counters
Q: Simulate increase(X) and max-counter operations efficiently.
Naive O(n*m) fails performance tests. Track a lazy baseline max and apply at the end / on demand.
This is a frequent Codility performance trap.
Question 4: distinct values after sorting
Q: Count distinct numbers in an array.
Sort then scan, or use a hash set. Prefer the approach that fits memory and language comfortably.
Question 5: tree height
Q: Compute height of a binary tree given parent array or node links.
DFS/BFS depth. If given parent pointers, build adjacency first.
Clarify whether leaf height is 0 or -1 per problem statement.
Question 6: string without three identical consecutive letters
Q: Given a string of a/b/c, return any string of length n with no three identical letters in a row (or transform under constraints).
Greedy construction / counting. Variants appear in Microsoft OA banks as simulation + greedy.
How to prepare for Microsoft OA (8-week plan)
| Weeks | Focus | Exit criteria |
|---|---|---|
| 1-2 | Arrays, hashing, two pointers, sliding window | 40+ easy/medium solved cleanly |
| 3-4 | Trees, graphs (BFS/DFS), heaps | Can code BFS/DFS without notes |
| 5-6 | DP + greedy patterns (practice Codility timed lessons) | 25+ medium DP/greedy with recursion to bottom-up |
| 7 | Timed full mocks matching Often 60-90 minutes for coding OA | Finish both problems green on correctness and speed tests with passing tests |
| 8 | Weak-topic repair + complexity review | Re-solve every miss within 48 hours |
Daily loop
- One timed medium problem (45-60 min hard cap)
- Write complexity and 3 edge cases before coding
- If stuck past 20 minutes, peek pattern name only, then re-solve tomorrow cold
- Log misses by topic on a simple sheet
Company pages on this site
- Microsoft coding questions
- Microsoft aptitude / mock quiz
- Microsoft interview experience
- Microsoft preparation guide
- Practice PDF: Microsoft Placement Papers PDF (2026)
Common mistakes on Microsoft OA
- Passing sample tests only and ignoring Codility performance cases
- Mutation bugs from editing arrays in place without care
- Over-engineering a 20-line problem into a framework
- Weak C# / Java fluency if that is your declared language
- No post-OA revision of the exact problems you submitted
Day-of checklist
- Stable internet, charged laptop, quiet room
- Confirm language template compiles on the platform before starting hard problems
- Skim all problems for 3-4 minutes, order by familiarity
- Submit a correct brute force early if constraints allow, then optimize
- Leave 8-10 minutes for edge-case tests you invent yourself

