Microsoft: Software Engineer (New Grad)
Microsoft's India fresher routes are described as Explore (internship), SDE New Grad and a research fellowship. Third-party guides describe an online coding test followed by a virtual loop of about four rounds, with coding, a low-level or high-level design discussion and a manager or director conversation. Sources conflict on round counts and pay (figures from about 28 LPA to far higher appear), and none is official, so confirm with your recruiter.
25 questions · 4 rounds · updated Nov 2026
How the interview works
- Online coding test: DSA problems; timed.
- Coding rounds: Two or more rounds of data structures and algorithms with edge-case discussion.
- Design round: Low-level design for freshers, sometimes high-level basics.
- Hiring manager round: Behavioural, growth mindset and project depth.
Sample questions
- 01
Design the classes for a parking lot system (low-level design).
MediumLow-level design
Model answer
What the interviewer checks
Clean object modelling, SOLID, extensibility and handling concurrency for spot allocation.
How to answer
Requirements: several floors; spot types (bike, compact, large, EV); vehicles park in a fitting spot; tickets at entry; payment at exit by duration and type; display free spots. Classes: • ParkingLot (singleton or injected): floors, entry and exit gates, `findSpot(vehicle)`. • Floor: a list of ParkingSpot, plus free counts per type. • ParkingSpot: id, type, isFree, `assign(vehicle)`, `release()`. • Vehicle (abstract) → Bike, Car, Truck, each with a required SpotType. • Ticket: id, vehicle, spot, entryTime. • SpotAllocationStrategy (interface) → NearestFirst, EVPriority: the strategy pattern, so the rule can change without editing ParkingLot. • PricingStrategy (interface) → HourlyPricing, WeekendPricing. • Payment → Cash, UPI, Card. Flow: the entry gate calls `lot.findSpot(vehicle)` → `spot.assign()` → issues a Ticket. The exit gate calculates the fee with PricingStrategy → takes payment → `spot.release()`. Concurrency: two gates may grab the same spot, so make assign atomic (synchronized, or a compare-and-set on isFree), or hand out spots from a per-type thread-safe queue. Extensions to mention: reservations, a display board updated through an observer, and monthly passes.
- 02
Find the length of the longest substring without repeating characters. Example: "abcabcbb" → 3 ("abc"), "pwwkew" → 3
MediumSliding window
Approach and solution
Approach
Sliding window with the last index of each character. When a character repeats inside the window, move the left edge to one past its previous index. Never move left backwards, hence the max().
def longest_unique(s: str) -> int: last, left, best = {}, 0, 0 for right, c in enumerate(s): if c in last and last[c] >= left: left = last[c] + 1 last[c] = right best = max(best, right - left + 1) return best assert longest_unique("abcabcbb") == 3 assert longest_unique("pwwkew") == 3 assert longest_unique("abba") == 2Complexity: O(n) time, O(k) space for the alphabet.
Likely follow-ups
- Return the substring itself: keep the left index of the best window as well as its length.
- 03
Merge overlapping intervals. Example: [[1,3],[2,6],[8,10],[15,18]] → [[1,6],[8,10],[15,18]]
MediumSorting
Approach and solution
Approach
Sort by start. Walk through; if the current interval starts at or before the end of the last merged one, extend that end; otherwise start a new interval.
def merge(intervals): out = [] for s, e in sorted(intervals): if out and s <= out[-1][1]: out[-1][1] = max(out[-1][1], e) else: out.append([s, e]) return out assert merge([[1, 3], [2, 6], [8, 10], [15, 18]]) == [[1, 6], [8, 10], [15, 18]] assert merge([[1, 4], [4, 5]]) == [[1, 5]]Complexity: O(n log n) for the sort, O(n) for the output.
22 more questions, members only
- Online coding test4
- Coding rounds10
- Design round4
- Behavioural and hiring manager7
Members also get how to answer each question and a preparation plan for this company.
See plans from ₹399Every question and answer is written by Hirecept and the code is run before it is published. How a company runs its process comes from candidate reports and public pages, and companies change it, so treat that part as a guide, not a promise.