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.

EvaluatesWhether 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.

EvaluatesPointer 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).

EvaluatesRecognizing 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.

EvaluatesAlgorithm 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.

EvaluatesLatency 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.

EvaluatesCommunication, 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.

EvaluatesSelf-awareness, accountability, and growth.

Practice these with a free AI mock

Get graded on your real answers, with feedback after every round.

Practice free
Microsoft Interview Questions | Novatypalcv