Company sheets › Microsoft
Microsoft interview preparation
Global software company; interviews focus on DSA, problem solving and clear communication. SDE and intern roles via campus, referrals and online assessments.
Microsoft hiring process
- Online assessment — Usually two to three coding problems of Easy–Medium–Hard difficulty.
- Technical interviews (2–4) — DSA (arrays, strings, trees, linked lists, DP), sometimes a small design or OOP question.
- Final / AA round — A mix of a coding problem, past projects and behavioural questions.
The process changes from year to year — check the official notice for the exact pattern.
Interview topics
- DSA interview questions
- OOP interview questions
- Operating Systems interview questions
- System Design interview questions
Tips
- Write production-quality code: meaningful names, edge cases, no global hacks.
- Linked list and tree manipulation questions are very common — practise them with real node pointers.
Microsoft DSA problems (238)
- Power with Modulo — Medium
- Count Primes up to N — Medium
- nCr Modulo a Large Prime — Medium
- Remove Duplicates from Sorted Array — Easy
- Move Zeros to End — Easy
- Missing Number — Easy
- Best Time to Buy and Sell Stock — Easy
- Pascal's Triangle Row — Easy
- Merge Two Sorted Arrays — Easy
- Rotate Array Right by K — Easy
- Two Sum — Medium
- Maximum Subarray Sum — Medium
- Majority Element — Medium
- Sort 0s, 1s and 2s — Medium
- Rearrange Array by Sign — Medium
- Longest Consecutive Sequence — Medium
- Subarray Sum Equals K — Medium
- Merge Intervals — Medium
- Maximum Product Subarray — Medium
- 3Sum Count — Medium
- Spiral Matrix — Medium
- Rotate Matrix 90 Degrees — Medium
- Set Matrix Zeroes — Medium
- Product of Array Except Self — Medium
- Next Permutation — Medium
- Find the Duplicate Number — Medium
- Majority Element II — Medium
- Repeating and Missing Number — Medium
- Best Time to Buy and Sell Stock II — Medium
- Maximum Circular Subarray Sum — Medium
- Count Subarrays with XOR K — Medium
- Count Inversions — Hard
- Trapping Rain Water — Hard
- Reverse Pairs — Hard
- Valid Anagram — Easy
- Longest Common Prefix — Easy
- Roman to Integer — Easy
- Reverse Words in a String — Medium
- Integer to Roman — Medium
- Longest Palindromic Substring — Medium
- Count and Say — Medium
- String to Integer (atoi) — Medium
- Find All Pattern Occurrences — Medium
- Shortest Palindrome by Adding in Front — Hard
- Contains Duplicate — Easy
- Pair Sum in a Sorted Array — Easy
- Count Pairs with Difference K — Medium
- Container With Most Water — Medium
- Zero Sum Subarray — Medium
- Group Anagrams Count — Medium
- 3Sum Closest — Medium
- Longest Subarray with Equal 0s and 1s — Medium
- Subarray Sums Divisible by K — Medium
- Longest Subarray with Sum K — Medium
- Distinct Elements in Every Window — Medium
- Longest Substring Without Repeating Characters — Medium
- Max Consecutive Ones III — Medium
- Fruit Into Baskets — Medium
- Longest Repeating Character Replacement — Medium
- Permutation in String — Medium
- Maximum Points from Cards — Medium
- Count Nice Subarrays — Medium
- Sliding Window Maximum — Hard
- Minimum Window Substring — Hard
- Subarrays with K Different Integers — Hard
- First and Last Occurrence — Easy
- Square Root (Floor) — Easy
- Kth Missing Positive Number — Easy
- Search Insert Position — Easy
- Floor and Ceil in a Sorted Array — Easy
- Row with Maximum 1s — Easy
- Binary Search — Medium
- Search in Rotated Sorted Array — Medium
- Peak of Mountain Array — Medium
- Minimum in Rotated Sorted Array — Medium
- Single Element in a Sorted Array — Medium
- Capacity to Ship Packages — Medium
- Minimum Days to Make Bouquets — Medium
- Search a 2D Matrix — Medium
- Book Allocation — Hard
- Median of Two Sorted Arrays — Hard
- Kth Element of Two Sorted Arrays — Hard
- Subset Sums — Medium
- Generate Parentheses — Medium
- Permutations of a String — Medium
- Combination Sum Count — Medium
- Rat in a Maze — Medium
- Binary Strings Without Consecutive 1s — Medium
- Letter Combinations of a Phone Number — Medium
- Subsets with Duplicates — Medium
- Combination Sum II — Medium
- Palindrome Partitioning — Medium
- Word Search — Medium
- M-Coloring Problem — Medium
- N-Queens Count — Hard
- Sudoku Solver — Hard
- Reverse a Linked List — Easy
- Middle of a Linked List — Easy
- Palindrome Linked List — Easy
- Merge Two Sorted Lists — Easy
- Remove Duplicates from Sorted List — Easy
- Delete All Occurrences of a Key — Easy
- Detect a Cycle in a Linked List — Easy
- Remove Nth Node From End — Medium
- Add Two Numbers as Lists — Medium
- Rotate List — Medium
- Starting Point of a Loop — Medium
- Odd Even Linked List — Medium
- Intersection of Two Linked Lists — Medium
- Sort a Linked List — Medium
- Add One to a Linked List — Medium
- Reverse Nodes in K-Group — Hard
- Implement Queue using Stacks — Easy
- Previous Smaller Element — Easy
- Valid Parentheses — Medium
- Next Greater Element — Medium
- Min Stack — Medium
- Evaluate Postfix Expression — Medium
- Stock Span — Medium
- Daily Temperatures — Medium
- Next Greater Element II — Medium
- Remove K Digits — Medium
- Infix to Postfix — Medium
- Sum of Subarray Minimums — Medium
- The Celebrity Problem — Medium
- Largest Rectangle in Histogram — Hard
- LRU Cache — Hard
- Kth Largest Element in an Array — Easy
- Last Stone Weight — Easy
- Minimum Cost to Connect Ropes — Easy
- Top K Frequent Elements — Medium
- Sort a K-Sorted Array — Medium
- Merge K Sorted Arrays — Medium
- Task Scheduler — Medium
- Hand of Straights — Medium
- Median of a Running Stream — Hard
- Height of a Binary Tree — Easy
- Inorder Traversal — Easy
- Level Order Traversal — Easy
- Preorder Traversal — Easy
- Postorder Traversal — Easy
- Identical Trees — Easy
- Symmetric Tree — Easy
- Search in a BST — Easy
- Balanced Binary Tree — Medium
- Diameter of a Binary Tree — Medium
- Validate Binary Search Tree — Medium
- Lowest Common Ancestor in a BST — Medium
- Left View of a Binary Tree — Medium
- Right Side View — Medium
- Zigzag Level Order Traversal — Medium
- Top View of a Binary Tree — Medium
- Bottom View of a Binary Tree — Medium
- Boundary Traversal — Medium
- Vertical Order Traversal — Medium
- Maximum Width of a Binary Tree — Medium
- Root to Leaf Paths — Medium
- Lowest Common Ancestor in a Binary Tree — Medium
- Two Sum in a BST — Medium
- Construct Tree from Preorder and Inorder — Medium
- Nodes at Distance K — Medium
- Binary Tree Maximum Path Sum — Hard
- Time to Burn a Binary Tree — Hard
- Count Words with a Given Prefix — Easy
- Implement a Trie — Medium
- Count Distinct Substrings — Medium
- Maximum XOR of Two Numbers — Medium
- BFS of a Graph — Easy
- DFS of a Graph — Easy
- Flood Fill — Easy
- Number of Provinces — Easy
- Number of Connected Components — Medium
- Shortest Path in an Unweighted Graph — Medium
- Detect Cycle in an Undirected Graph — Medium
- Number of Islands — Medium
- Dijkstra's Shortest Paths — Medium
- Course Schedule — Medium
- Rotting Oranges — Medium
- Distance of Nearest Zero — Medium
- Surrounded Regions — Medium
- Number of Enclaves — Medium
- Is Graph Bipartite — Medium
- Detect Cycle in a Directed Graph — Medium
- Topological Sort — Medium
- Minimum Spanning Tree — Medium
- Bellman-Ford Shortest Paths — Medium
- Cheapest Flights Within K Stops — Medium
- Path With Minimum Effort — Medium
- Strongly Connected Components — Hard
- Bridges in a Graph — Hard
- Word Ladder — Hard
- Unique Grid Paths — Easy
- Frog Jump — Easy
- Longest Common Subsequence — Medium
- House Robber — Medium
- Coin Change (Minimum Coins) — Medium
- Coin Change (Number of Ways) — Medium
- 0/1 Knapsack — Medium
- Longest Increasing Subsequence — Medium
- Partition Equal Subset Sum — Medium
- Longest Palindromic Subsequence — Medium
- Frog Jump with K Distances — Medium
- House Robber II — Medium
- Unique Paths with Obstacles — Medium
- Triangle Minimum Path Sum — Medium
- Maximum Falling Path Sum — Medium
- Count Subsets with Sum K — Medium
- Minimum Subset Sum Difference — Medium
- Unbounded Knapsack — Medium
- Rod Cutting — Medium
- Longest Common Substring — Medium
- Stock Trading with Cooldown — Medium
- Maximal Square — Medium
- Number of Longest Increasing Subsequences — Medium
- Edit Distance — Hard
- Matrix Chain Multiplication — Hard
- Distinct Subsequences — Hard
- Wildcard Matching — Hard
- Burst Balloons — Hard
- Palindrome Partitioning II — Hard
- N Meetings in One Room — Medium
- Jump Game — Medium
- Minimum Platforms — Medium
- Fractional Knapsack — Medium
- Job Sequencing — Medium
- Jump Game II — Medium
- Non-overlapping Intervals — Medium
- Gas Station — Medium
- Valid Parenthesis String — Medium
- Candy — Hard
- Count Set Bits — Easy
- XOR from 1 to N — Easy
- Minimum Bit Flips — Easy
- Single Number II — Medium
- Two Non-Repeating Numbers — Medium
- Divide Two Integers — Medium
- Total Set Bits from 1 to N — Medium
- Power Set Using Bitmasks — Medium