All companies
Microsoft logo

Microsoft

7 questions · Coding · System design · Behavioral

Find two numbers in an array that sum to a target and return their indices.

Coding

ApproachOne pass with a hash map of value → index; for each x, check whether target − x was already seen.

They look forWhether you move from the brute-force O(n²) to a clean O(n) hash-map solution and reason about edge cases.

Reverse a singly linked list in place.

Coding

ApproachIterate with three pointers (prev, curr, next), rewiring links; discuss the recursive variant and its stack cost.

They look forPointer manipulation, in-place mutation, and clarity under a deceptively simple task.

Given course prerequisites, decide whether all courses can be finished.

Coding

ApproachBuild a directed graph and run topological sort (Kahn/BFS or DFS cycle detection).

They look forRecognizing a cycle-detection problem behind a word problem.

Design a rate limiter for a public API.

System design

ApproachCompare token bucket vs. sliding window, where state lives (per-node vs. Redis), and behavior under bursts.

They look forAlgorithm choice, distributed state, and failure/consistency trade-offs.

Design a search autocomplete / typeahead service.

System design

ApproachTrie or prefix index, top-k ranking, caching, and updating suggestions from live traffic.

They look forLatency budget, data-structure choice, and freshness vs. cost.

Tell me about a time you disagreed with a teammate or manager.

Behavioral

ApproachUse STAR: the situation, your reasoning, how you disagreed respectfully and reached a decision, and the result.

They look forCommunication, judgment, and whether you can disagree-and-commit without drama.

Tell me about a time you failed and what you changed afterward.

Behavioral

ApproachPick a real failure, own it without blaming others, and show the concrete lesson you applied later.

They look forSelf-awareness, accountability, and growth.

Rehearse these out loud

Practice your answers privately, with coaching notes you can revise against. Nobody else sees them.

Practice free
Microsoft Interview Questions | Novatypalcv