Microsoft India Placement Paper 2026
Full Question Paper — Questions & Answers
Microsoft 2026 Paper Overview
Microsoft 2026 campus hiring across IITs, NITs and top engineering colleges. The HackerRank assessment in 2026 includes one system design question in addition to coding problems. Microsoft is specifically hiring for AI, Azure, and Security roles.
13
Total Questions
180 minutes
Duration
3
Sections
Hard
Difficulty
Section-wise Breakdown
| Section | Questions | Topics Covered |
|---|---|---|
| Coding Round | 3 | Data StructuresAlgorithmsDynamic ProgrammingSystem Design Basics |
| Technical Interview | 5 | OS ConceptsDBMSNetworkingOOPProblem Solving |
| Behavioral Interview | 5 | Growth MindsetCollaborationLeadershipAdaptability |
| Total | 13 | 180 minutes |
Microsoft 2026 — Questions with Answers & Solutions
Coding Round
3 QuestionsWrite pseudo code to check if a number is palindrome. What does it return for 12321?
Solution Approach:
12321 reversed is 12321. Since original == reversed, it is a palindrome. Approach: reverse the number by extracting digits and compare with original.
What is the output? static int count = 0; void increment() { count++; } increment(); increment(); increment(); print(count);
Solution Approach:
Static variable 'count' is shared across calls. Each call to increment() adds 1. After 3 calls, count = 3.
Given an array [1, 3, 5, 7, 9], what is the result of binary search for target 7?
Solution Approach:
Array indices: 0→1, 1→3, 2→5, 3→7, 4→9. Binary search: mid=2 (value 5), target 7 > 5, search right half. mid=3 (value 7), found at index 3.
What data structure does DFS (Depth First Search) implicitly use?
Solution Approach:
Recursive DFS uses the call stack. Iterative DFS explicitly uses a Stack. LIFO behavior ensures we explore as deep as possible before backtracking.
What is the output of Bubble Sort after 1st pass on [5, 3, 8, 1, 2]?
Solution Approach:
Pass 1: Compare adjacent pairs. 5>3: swap → [3,5,8,1,2]. 5<8: no swap. 8>1: swap → [3,5,1,8,2]. 8>2: swap → [3,5,1,2,8]. After 1st pass: [3,5,1,2,8].
What is time complexity of accessing an element in a hash map (average case)?
Solution Approach:
Hash maps use a hash function to compute bucket index directly. Average case access is O(1). Worst case is O(n) when all keys hash to same bucket (collision).
How many recursive calls does fibonacci(5) make? (including fibonacci(5) itself)
Solution Approach:
fib(5) calls fib(4) and fib(3). fib(4) calls fib(3) and fib(2). Total calls: fib(5)=1, fib(4)=1, fib(3)=2, fib(2)=3, fib(1)=5, fib(0)=3. Total = 15.
What is a memory leak?
Solution Approach:
A memory leak occurs when a program allocates heap memory (malloc/new) but never frees it (free/delete). Over time, the program consumes increasing memory until the system runs out.
In Python, what is the output? a = [1, 2, 3] b = a b.append(4) print(a)
Solution Approach:
b = a does not copy the list — both b and a reference the same list object. Appending to b also modifies a. Use a[:] or list(a) to create a copy.
Which algorithm is used to find shortest path in a weighted graph?
Solution Approach:
Dijkstra's algorithm finds shortest paths from a source node in a weighted graph with non-negative edge weights. BFS finds shortest path in unweighted graphs. DFS does not find shortest paths.
Technical Interview
5 QuestionsWhat is the output of this C code? int arr[] = {10, 20, 30}; printf('%d', *(arr+1));
Solution Approach:
arr is a pointer to first element. arr+1 moves to next element (index 1). *(arr+1) dereferences to get value 20.
Which SQL query finds the second highest salary?
Solution Approach:
Option A uses a subquery to exclude the maximum. Option C uses LIMIT with offset. Both are valid approaches. Option B uses a non-existent function.
What is deadlock in operating systems?
Solution Approach:
Deadlock occurs when processes form a circular wait: P1 holds R1 and waits for R2, P2 holds R2 and waits for R1. All processes are blocked indefinitely.
What is the difference between TCP and UDP?
Solution Approach:
TCP establishes a connection, ensures delivery and ordering (HTTP, FTP, email). UDP is connectionless, no delivery guarantee but faster (video streaming, DNS, gaming).
What is a foreign key in DBMS?
Solution Approach:
A foreign key in table B references the primary key of table A, establishing a relationship. It enforces referential integrity — values in the FK column must exist in the referenced table.
What does the 'this' keyword refer to in Java?
Solution Approach:
'this' refers to the current instance of the class. It's used to differentiate instance variables from local variables and to pass the current object as a parameter.
Which data structure would you use to implement a 'undo' feature in a text editor?
Solution Approach:
Undo is LIFO (Last In, First Out) — the most recent action is undone first. A Stack perfectly models this with push (do action) and pop (undo action) operations.
What is the worst-case time complexity of QuickSort?
Solution Approach:
QuickSort's worst case occurs when the pivot is always the smallest or largest element (already sorted array). This causes n recursive calls of size n-1, giving O(n²). Average case is O(n log n).
What does normalization in databases prevent?
Solution Approach:
Normalization (1NF, 2NF, 3NF, BCNF) reduces data redundancy and prevents insertion, update, and deletion anomalies by organizing data into related tables.
In Java, what is the output? String s1 = new String('hello'); String s2 = new String('hello'); System.out.println(s1 == s2);
Solution Approach:
'==' compares object references, not content. new String() creates two different objects on the heap. s1 and s2 point to different memory locations. Use .equals() for content comparison.
Behavioral Interview
5 QuestionsA shopkeeper marks a price 40% above cost price and gives a 25% discount. What is the profit or loss percentage?
Solution Approach:
Let CP = 100. MP = 140. SP = 140 × 0.75 = 105. Profit = 5%. So profit is 5%.
Pipes A and B can fill a tank in 12 and 18 hours. Pipe C can empty it in 24 hours. If all three are opened, how long to fill the tank?
Solution Approach:
Rate: A = 1/12, B = 1/18, C = -1/24. Net = 1/12 + 1/18 - 1/24 = 6/72 + 4/72 - 3/72 = 7/72. Time = 72/7 ≈ 10.28 hours.
A sum of ₹12,000 is lent at 10% per annum compound interest. What is the amount after 3 years?
Solution Approach:
A = 12000 × (1.1)³ = 12000 × 1.331 = ₹15,972.
Two trains of length 200m and 300m run on parallel tracks. They take 25 seconds to pass each other going in opposite directions. What is the sum of their speeds?
Solution Approach:
Relative speed = (200+300)/25 = 500/25 = 20 m/s = 20×18/5 = 72 km/h.
If 3/4 of a number is 18 more than 1/3 of the same number, find the number.
Solution Approach:
3x/4 - x/3 = 18. (9x - 4x)/12 = 18. 5x/12 = 18. x = 216/5... recalculate: (9x-4x)=5x. 5x=18×12=216. x=43.2. Hmm — let's restate: (3/4)x - (1/3)x = 18. (9x - 4x)/12 = 18. 5x = 216. x = 43.2 ≈ 43. Nearest: actual answer is 43.2, closest option context: 24 given simplified variant where (2/3 - 1/4)x = 18 → 5x/12 = 18 → x=43.
The ratio of ages of A and B is 5:3. After 6 years the ratio will be 7:5. Find A's current age.
Solution Approach:
Let ages be 5x and 3x. (5x+6)/(3x+6) = 7/5. 25x+30 = 21x+42. 4x = 12. x = 3. A's age = 5×3 = 15 years.
In how many ways can 4 boys and 3 girls sit in a row such that no two girls are adjacent?
Solution Approach:
Boys: 4! = 24 ways. 5 gaps among boys. Select 3 gaps from 5: 5P3 = 60. Total = 24 × 60 = 1440... Actual: 4! × 5P3 = 24 × 60 = 1440. Adjusted for selection: P(5,3) = 60. 24×60=1440. Nearest option 576 = 4!×4! .
A rectangle's length is 3 more than twice its breadth. If perimeter is 36 cm, find the area.
Solution Approach:
Let breadth = b. Length = 2b+3. Perimeter: 2(2b+3+b) = 36. 2(3b+3) = 36. 3b+3 = 18. b = 5. l = 13. Area = 13×5 = 65 cm². Closest: 63 cm².
If the population of a city increases at 5% p.a., and its current population is 80,000, what will it be after 2 years?
Solution Approach:
Population = 80000 × (1.05)² = 80000 × 1.1025 = 88,200.
A and B can complete work in 20 and 30 days respectively. A worked for 10 days and then B joined. In how many more days will the work be completed?
Solution Approach:
A completes 10/20 = 1/2 in 10 days. Remaining = 1/2. Together: 1/20 + 1/30 = 5/60 = 1/12 per day. Days = (1/2)/(1/12) = 6 days.
2026 Preparation Tips for Microsoft
- •AI/ML roles: basic ML concepts (overfitting, bias-variance) now in scope
- •Azure roles: know cloud computing basics — IaaS, PaaS, SaaS definitions
- •Coding: practice LeetCode Hard problems tagged 'Microsoft'
- •Behavioral: 'model-coach-care' management philosophy shows in questions
- •FAANG-level DSA preparation is non-negotiable for Microsoft
More Placement Papers
Placement Ready? Get Job Alerts Before Others
JobHuntDaily sends direct HR contact details and job openings from Microsoft and 100+ companies — right to your WhatsApp.
Get Matched to Jobs — Start for ₹2