Microsoft Coding Interview Questions: 449 Tagged Problems
449 coding problems tagged Microsoft — 112 easy · 243 medium · 94 hard — with solutions in 13 languages. Plus a 4-week study plan by topic.
- Problems: 449
- By difficulty: 112 easy · 243 medium · 94 hard
- Languages: JavaScript, TypeScript, Python, Java, C++, C, C#, Go, Kotlin, Swift, Rust, PHP and Ruby
- Cost: Free on every plan; sign in to run and submit
449 problems the CodeKairo catalogue tags as commonly asked in Microsoft's coding rounds — 112 easy, 243 medium and 94 hard — each judged by hidden tests in 13 languages. The most common topics among them are Arrays (206), Strings (92) and Dynamic Programming (82). Tagged for Microsoft and no other company: Convert Date to Binary. CodeKairo's Microsoft — Online Assessment mock covers the Microsoft online assessment pattern: two coding problems on a platform such as Codility or HackerRank, and nothing that is not code. The tag is the catalogue's own annotation of where a problem tends to come up — not a list published by Microsoft, which CodeKairo is not affiliated with.
Microsoft study plan by topic
40 of the 449 problems tagged Microsoft over 4 weeks, about 20 h 50 min of solving, grouped by technique in the order they build on each other — Strings, Hash Table, Counting and Math and 26 more. It ends with the Microsoft — Online Assessment mock.
Week 1: Strings, Hash Table, Counting +7
12 problems on Strings, Hash Table, Counting, Math, Two Pointers, Sliding Window, Prefix Sum, Sorting, Binary Search and Stack, easiest first within each topic.
- Length of Last Word Easy
- Find All Duplicates in an Array Medium
- Maximum Count of Positive Integer and Negative Integer Easy
- Reverse Integer Medium
- Reverse String Easy
- String Compression Medium
- Next Permutation Medium
- Longest Subarray of 1's After Deleting One Element Medium
- Running Sum of 1d Array Easy
- Sort Even and Odd Indices Independently Easy
- Find Smallest Letter Greater Than Target Easy
- Longest Valid Parentheses Hard
Week 2: Queue, Monotonic Stack, Matrix +6
12 problems on Queue, Monotonic Stack, Matrix, Simulation, Enumeration, Greedy, Recursion, Divide and Conquer and Heap, easiest first within each topic.
- First Unique Character in a String Easy
- Maximal Rectangle Hard
- Unique Paths II Medium
- Build Array from Permutation Easy
- Game of Life Medium
- Remove Digit From Number to Maximize Result Easy
- Can Place Flowers Easy
- Integer to Roman Medium
- Power of Four Easy
- Integer to English Words Hard
- Number of 1 Bits Easy
- Ugly Number II Medium
Week 3: Bit Manipulation, Bitmask, Combinatorics +5
11 problems on Bit Manipulation, Bitmask, Combinatorics, Trees, Backtracking, Graph, Breadth-First Search and Union Find, easiest first within each topic.
- Sum of Two Integers Medium
- Minimum Number of Work Sessions to Finish the Tasks Medium
- Count Special Integers Hard
- Same Tree Easy
- Symmetric Tree Easy
- Maximum Depth of Binary Tree Easy
- Time Needed to Inform All Employees Medium
- Word Search Medium
- Keys and Rooms Medium
- Word Ladder Hard
- Surrounded Regions Medium
Week 4: Dynamic Programming, Game Theory, String Matching
5 problems on Dynamic Programming, Game Theory and String Matching, easiest first within each topic.
- Delete Operation for Two Strings Medium
- Interleaving String Medium
- Best Time to Buy and Sell Stock III Hard
- Stone Game VII Medium
- Repeated Substring Pattern Easy
Finally: the timed test
Sit the Microsoft — Online Assessment mock under the clock — the coding problems are only one part of the round.
Microsoft test patterns
- Microsoft — Online Assessment pattern guide and timed mock
The Microsoft interview process, round by round
All problems tagged Microsoft
Easy (112)
- Design Parking System Design, Simulation, Counting
- Design HashMap Array, Hash Table, Design
- Design HashSet Array, Hash Table, Design
- Implement Queue using Stacks Stack, Queue, Design
- Implement Stack using Queues Stack, Queue, Design
- Delete N Nodes After M Nodes of a Linked List Linked List, Simulation
- Insert in a Sorted Linked List Linked List
- Nth Node From End of Linked List Linked List, Two Pointers
- Sort a Linked List of 0s, 1s and 2s Linked List, Sorting, Counting
- Remove Duplicates from an Unsorted Linked List Linked List, Hash Table
- Intersection of Two Sorted Linked Lists Linked List, Two Pointers
- Middle of the Linked List Linked List, Two Pointers
- Palindrome Linked List Linked List, Two Pointers, Stack
- Reverse Linked List Linked List, Recursion
- Remove Linked List Elements Linked List, Recursion
- Remove Duplicates from Sorted List Linked List, Two Pointers
- Merge Two Sorted Lists Linked List, Recursion, Two Pointers
- Sum of Leaf Nodes at Minimum Level Tree, Breadth-First Search
- Count BST Nodes That Lie in a Given Range Tree, Binary Search, Depth-First Search
- Kth Largest Element in BST Tree, Depth-First Search, Stack
- Ceil in BST Tree, Binary Search
- Nodes at Distance K from Root Tree, Depth-First Search, Breadth-First Search
- Check if Two Trees are Isomorphic Tree, Depth-First Search, Recursion
- Children Sum in a Binary Tree Tree, Depth-First Search
- Transform to Sum Tree Tree, Depth-First Search, Recursion
- Count Complete Tree Nodes Binary Search, Bit Manipulation, Tree
- Convert Sorted Array to Binary Search Tree Array, Divide and Conquer, Tree
- Sum of Root To Leaf Binary Numbers Tree, Depth-First Search, Bit Manipulation
- Search in a Binary Search Tree Tree, Binary Search
- Second Minimum Node In a Binary Tree Tree, Depth-First Search
- Two Sum IV - Input is a BST Tree, Depth-First Search, Hash Table
- Merge Two Binary Trees Tree, Depth-First Search, Breadth-First Search
- Subtree of Another Tree Tree, Depth-First Search, String Matching
- Diameter of Binary Tree Tree, Depth-First Search
- Minimum Absolute Difference in BST Tree, Depth-First Search, Breadth-First Search
- Find Mode in Binary Search Tree Tree, Depth-First Search
- Invert Binary Tree Tree, Depth-First Search, Breadth-First Search
- Path Sum Tree, Depth-First Search, Breadth-First Search
- Balanced Binary Tree Tree, Depth-First Search
- Minimum Depth of Binary Tree Tree, Depth-First Search, Breadth-First Search
- Maximum Depth of Binary Tree Tree, Depth-First Search, Breadth-First Search
- Symmetric Tree Tree, Depth-First Search, Breadth-First Search
- Same Tree Tree, Depth-First Search, Breadth-First Search
- Binary Tree Postorder Traversal Tree, Depth-First Search, Stack
- Binary Tree Preorder Traversal Tree, Depth-First Search, Stack
- Binary Tree Inorder Traversal Tree, Depth-First Search, Stack
- Semi-Ordered Permutation Array, Simulation
- Longest Continuous Increasing Subsequence Array
- Maximum Difference Between Even and Odd Frequency I Hash Table, String, Counting
- Convert Date to Binary Math, String
- Latest Time You Can Obtain After Replacing Characters String, Enumeration
- Cells in a Range on an Excel Sheet String
- Robot Return to Origin String, Simulation
- Count Ways to Tile a 2 x N Floor Math, Dynamic Programming
- Nearest Smaller Element Array, Stack, Monotonic Stack
- Rectangle Overlap Math, Geometry
- Day of the Week Math
- Number of Days Between Two Dates Math, String
- Greatest English Letter in Upper and Lower Case Hash Table, String, Enumeration
- Remove Digit From Number to Maximize Result String, Greedy, Enumeration
- Number of Valid Words in a Sentence String, Simulation
- Check if Numbers Are Ascending in a Sentence String, Simulation
- Longer Contiguous Segments of Ones than Zeros String, Counting
- Slowest Key Array, String
- Consecutive Characters String, Two Pointers
- String Matching in an Array Array, String, String Matching
- Check if Array Is Sorted and Rotated Array, Sorting
- Determine the Winner of a Bowling Game Array, Simulation
- Minimum Moves to Convert String String, Greedy
- Take Gifts From the Richest Pile Array, Heap, Simulation
- Sqrt(x) Math, Binary Search
- Find Smallest Letter Greater Than Target Array, Binary Search
- Count Subarrays of Length Three With a Condition Array, Sliding Window
- Defuse the Bomb Array, Sliding Window, Simulation
- Maximum Sum Subarray of Size K Array, Sliding Window
- Add to Array-Form of Integer Array, Math
- Longest Nice Substring String, Divide and Conquer
- Greatest Common Divisor of Strings String, Math
- Minimum Operations to Make the Array Increasing Array, Greedy
- Minimum Value to Get Positive Step by Step Sum Array, Prefix Sum
- Convert a Number to Hexadecimal Math, Bit Manipulation
- Power of Four Math, Bit Manipulation, Recursion
- Number of 1 Bits Divide and Conquer, Bit Manipulation
- Sort Even and Odd Indices Independently Array, Sorting
- Special Positions in a Binary Matrix Array, Matrix
- Find Winner on a Tic Tac Toe Game Array, Hash Table, Matrix
- Convert 1D Array Into 2D Array Array, Matrix, Simulation
- Row With Maximum Ones Array, Matrix
- The K Weakest Rows in a Matrix Array, Binary Search, Sorting
- Shift 2D Grid Array, Matrix, Simulation
- Count Negative Numbers in a Sorted Matrix Array, Binary Search, Matrix
- Reshape the Matrix Array, Matrix, Simulation
- Maximum Count of Positive Integer and Negative Integer Array, Binary Search, Counting
- Left and Right Sum Differences Array, Prefix Sum
- Remove Element Array, Two Pointers
- Check If Two String Arrays Are Equivalent Array, String
- Unique Email Addresses Array, Hash Table, String
- Rotate String String, String Matching
- Shuffle String Array, String
- Repeated Substring Pattern String, String Matching
- Length of Last Word String
- First Unique Character in a String Hash Table, String, Queue
- Relative Sort Array Array, Hash Table, Sorting
- Height Checker Array, Sorting, Counting Sort
- Can Place Flowers Array, Greedy
- Max Consecutive Ones Array
- Build Array from Permutation Array, Simulation
- Running Sum of 1d Array Array, Prefix Sum
- Roman to Integer Hash Table, Math, String
- Excel Sheet Column Title Math, String
- Excel Sheet Column Number Math, String
- Reverse String Two Pointers, String
Medium (243)
- Design a Number Container System Hash Table, Heap (Priority Queue), Ordered Set
- Design an ATM Machine Array, Greedy, Design
- Design Browser History Array, Linked List, Stack
- Design Linked List Linked List, Simulation, Design
- Design Circular Deque Array, Queue, Design
- Design Circular Queue Array, Queue, Design
- Design Twitter Hash Table, Heap (Priority Queue), Design
- Implement Trie (Prefix Tree) Hash Table, String, Trie
- Min Stack Stack, Design
- LRU Cache Hash Table, Design
- Merge Two Sorted Linked Lists in Reverse Order Linked List, Two Pointers, Sorting
- Rotate a Linked List Linked List, Two Pointers
- Union of Two Linked Lists Linked List, Hash Table, Sorting
- Segregate Even and Odd Nodes in a Linked List Linked List, Two Pointers
- Add 1 to a Number Represented as Linked List Linked List, Math, Recursion
- Remove Nodes From Linked List Linked List, Stack, Monotonic Stack
- Maximum Twin Sum of a Linked List Linked List, Two Pointers, Stack
- Delete the Middle Node of a Linked List Linked List, Two Pointers
- Swapping Nodes in a Linked List Linked List, Two Pointers
- Next Greater Node In Linked List Linked List, Stack, Monotonic Stack
- Add Two Numbers II Linked List, Math, Stack
- Odd Even Linked List Linked List, Two Pointers
- Sort List Linked List, Sorting, Merge Sort
- Insertion Sort List Linked List, Sorting
- Reorder List Linked List, Two Pointers, Stack
- Convert Sorted List to Binary Search Tree Linked List, Tree, Divide and Conquer
- Reverse Linked List II Linked List, Two Pointers
- Partition List Linked List, Two Pointers
- Remove Duplicates from Sorted List II Linked List, Two Pointers
- Rotate List Linked List, Two Pointers
- Swap Nodes in Pairs Linked List, Recursion
- Remove Nth Node From End of List Linked List, Two Pointers
- Add Two Numbers Linked List, Math, Recursion
- Foldable Binary Tree Tree, Depth-First Search, Recursion
- Largest BST in a Binary Tree Tree, Depth-First Search, Dynamic Programming
- Predecessor and Successor in BST Tree, Binary Search
- Inorder Successor in BST Tree, Binary Search, Depth-First Search
- Minimum Distance Between Two Given Nodes of a Binary Tree Tree, Depth-First Search
- Boundary Traversal of Binary Tree Tree, Depth-First Search
- Reverse Odd Levels of Binary Tree Tree, Depth-First Search, Breadth-First Search
- Amount of Time for Binary Tree to Be Infected Tree, Breadth-First Search, Depth-First Search
- Create Binary Tree From Descriptions Tree, Hash Table, Array
- Count Good Nodes in Binary Tree Tree, Depth-First Search, Breadth-First Search
- Linked List in Binary Tree Tree, Depth-First Search
- Maximum Product of Splitted Binary Tree Tree, Depth-First Search
- All Elements in Two Binary Search Trees Tree, Depth-First Search, Sorting
- Deepest Leaves Sum Tree, Breadth-First Search, Depth-First Search
- Maximum Level Sum of a Binary Tree Tree, Breadth-First Search
- Construct Binary Search Tree from Preorder Traversal Array, Stack, Tree
- Distribute Coins in Binary Tree Tree, Depth-First Search
- Check Completeness of a Binary Tree Tree, Breadth-First Search
- All Nodes Distance K in Binary Tree Hash Table, Tree, Depth-First Search
- Binary Tree Pruning Tree, Depth-First Search
- Insert into a Binary Search Tree Tree, Binary Search
- Trim a Binary Search Tree Tree, Depth-First Search, Recursion
- Maximum Width of Binary Tree Tree, Depth-First Search, Breadth-First Search
- Maximum Binary Tree Array, Divide and Conquer, Stack
- Find Bottom Left Tree Value Tree, Depth-First Search, Breadth-First Search
- Delete Node in a BST Tree, Binary Search, Recursion
- Lowest Common Ancestor of a Binary Tree Tree, Depth-First Search
- Lowest Common Ancestor of a Binary Search Tree Tree, Binary Search, Depth-First Search
- Flatten Binary Tree to Linked List Tree, Depth-First Search, Stack
- Binary Tree Level Order Traversal II Tree, Breadth-First Search
- Construct Binary Tree from Inorder and Postorder Traversal Tree, Array, Hash Table
- Construct Binary Tree from Preorder and Inorder Traversal Tree, Array, Hash Table
- Binary Tree Zigzag Level Order Traversal Tree, Breadth-First Search
- Binary Tree Level Order Traversal Tree, Breadth-First Search
- Recover Binary Search Tree Tree, Depth-First Search
- Validate Binary Search Tree Tree, Depth-First Search
- Construct String from Binary Tree Tree, Depth-First Search, String
- Maximize Distance to Closest Person Array, Two Pointers
- Minimum Seconds to Equalize a Circular Array Array, Hash Table, Greedy
- Making File Names Unique Array, Hash Table, String
- String Compression III String
- Water Connection Problem Graph, Depth-First Search
- Knight Walk Breadth-First Search, Matrix
- Maximum Sum Increasing Subsequence Array, Dynamic Programming
- Longest Bitonic Subsequence Array, Dynamic Programming
- Shortest Common Supersequence Length String, Dynamic Programming
- Longest Repeating Subsequence String, Dynamic Programming
- Optimal Strategy For A Game Array, Dynamic Programming, Game Theory
- Perfect Sum Problem Array, Dynamic Programming
- Subset Sum Problem Array, Dynamic Programming
- Longest Common Substring String, Dynamic Programming
- Rod Cutting Array, Dynamic Programming
- 0/1 Knapsack Array, Dynamic Programming
- Letter Case Permutation String, Backtracking, Bit Manipulation
- Matchsticks to Square Array, Backtracking, Bitmask
- Combination Sum III Array, Backtracking
- Permutations II Array, Backtracking, Sorting
- Valid Tic-Tac-Toe State Array, Matrix, Simulation
- Queens That Can Attack the King Array, Matrix, Simulation
- Battleships in a Board Array, Depth-First Search, Matrix
- Minimum Swaps to Arrange a Binary Grid Array, Greedy, Matrix
- Image Overlap Array, Matrix, Enumeration
- Difference of Number of Distinct Values on Diagonals Array, Hash Table, Matrix
- Most Stones Removed with Same Row or Column Graph, Union Find, Depth-First Search
- Solving Questions With Brainpower Array, Dynamic Programming
- Guess Number Higher or Lower II Math, Dynamic Programming, Game Theory
- Filling Bookcase Shelves Array, Dynamic Programming
- Partition to K Equal Sum Subsets Dynamic Programming, Backtracking, Bitmask
- Out of Boundary Paths Dynamic Programming, Matrix
- Broken Calculator Math, Greedy
- Minimum Number of Coins for Fruits Array, Dynamic Programming, Monotonic Queue
- Infix to Postfix String, Stack
- The Celebrity Problem Array, Stack, Two Pointers
- Jump Game VI Array, Dynamic Programming, Queue
- Steps to Make Array Non-decreasing Array, Stack, Monotonic Stack
- Stock Span Problem Array, Stack, Monotonic Stack
- K-th Element of Two Sorted Arrays Array, Binary Search, Divide and Conquer
- Heaters Array, Binary Search, Sorting
- Count the Number of Fair Pairs Array, Two Pointers, Binary Search
- Count Subarrays Where Max Element Appears at Least K Times Array, Sliding Window
- Maximum Sum Obtained of Any Permutation Array, Greedy, Sorting
- Maximum Length of Subarray With Positive Product Array, Dynamic Programming, Greedy
- Largest Combination With Bitwise AND Greater Than Zero Array, Hash Table, Bit Manipulation
- Minimum Operations to Make the Integer Zero Bit Manipulation, Brainteaser, Enumeration
- Punishment Number of an Integer Math, Backtracking
- Closest Prime Numbers in Range Math, Number Theory
- Count Good Numbers Math, Recursion
- Queries on Number of Points Inside a Circle Array, Math, Geometry
- Rectangle Area Math, Geometry
- The k-th Lexicographical String of All Happy Strings of Length n String, Backtracking, Combinatorics
- Find the Minimum Number of Fibonacci Numbers Whose Sum Is K Math, Greedy
- Robot Bounded In Circle Math, String, Simulation
- Prime Palindrome Math, Number Theory
- Water and Jug Problem Math, Depth-First Search, Breadth-First Search
- Bulb Switcher II Math, Bit Manipulation, Breadth-First Search
- Minimum Penalty for a Shop String, Prefix Sum
- Shifting Letters II Array, String, Prefix Sum
- Longest Palindrome by Concatenating Two Letter Words Array, Hash Table, String
- Remove Colored Pieces if Both Neighbors are the Same Color Math, String, Greedy
- Minimum Number of Swaps to Make the Binary String Alternating String, Greedy, Counting
- Smallest String With A Given Numeric Value String, Greedy
- Rearrange Words in a Sentence String, Sorting
- Break a Palindrome String, Greedy
- Print Words Vertically Array, String, Simulation
- Reorder Data in Log Files Array, String, Sorting
- Find And Replace in String Array, Hash Table, String
- Masking Personal Information String
- Minimum Time Difference Array, Math, String
- Additive Number String, Backtracking, Enumeration
- Bulls and Cows Hash Table, String, Counting
- Restore IP Addresses String, Backtracking
- Zigzag Conversion String, Simulation
- Maximum Sum of Distinct Subarrays With Length K Array, Hash Table, Sliding Window
- Number of Ways to Split Array Array, Prefix Sum
- Minimum Average Difference Array, Prefix Sum
- Partition Array According to Given Pivot Array, Two Pointers, Simulation
- Minimum Elements to Add to Form a Given Sum Array, Greedy
- Maximum Subarray Sum with One Deletion Array, Dynamic Programming
- Minimum Domino Rotations For Equal Row Array, Greedy
- Pairs of Songs With Total Durations Divisible by 60 Array, Hash Table, Counting
- Find the Winner of an Array Game Array, Simulation
- Find the Winner of the Circular Game Array, Math, Recursion
- Stone Game VII Array, Math, Dynamic Programming
- Minimum Number of Work Sessions to Finish the Tasks Array, Dynamic Programming, Bit Manipulation
- Count Fertile Pyramids in a Land Array, Dynamic Programming, Matrix
- Number of Ways to Divide a Long Corridor Math, String, Dynamic Programming
- Construct String With Repeat Limit Hash Table, String, Greedy
- Minimum Number of Changes to Make Binary String Beautiful String, Greedy
- Alternating Groups II Array, Sliding Window
- Maximum Value of an Ordered Triplet II Array, Prefix Sum
- Process Tasks Using Servers Array, Simulation, Heap (Priority Queue)
- Number of Ways to Arrive at Destination Graph, Dynamic Programming, Shortest Path
- Shortest Path with Alternating Colors Graph, Breadth-First Search
- Maximum Number of Fish in a Grid Array, Matrix, Depth-First Search
- Map of Highest Peak Array, Matrix, Breadth-First Search
- Convert an Array Into a 2D Array With Conditions Array, Matrix, Hash Table
- Rotating the Box Array, Matrix, Two Pointers
- Difference Between Ones and Zeros in Row and Column Array, Matrix, Simulation
- Count Alternating Subarrays Array, Math, Dynamic Programming
- Maximum Consecutive Floors Without Special Floors Array, Sorting, Greedy
- Removing Minimum and Maximum From Array Array, Greedy
- Search a 2D Matrix II Array, Matrix, Binary Search
- Find First and Last Position of Element in Sorted Array Array, Binary Search
- Minimum Consecutive Cards to Pick Up Array, Hash Table, Sliding Window
- Count Complete Subarrays in an Array Array, Hash Table, Sliding Window
- K Radius Subarray Averages Array, Sliding Window, Prefix Sum
- The k Strongest Values in an Array Array, Two Pointers, Sorting
- Super Ugly Number Dynamic Programming, Math, Heap
- Minimum Operations to Reduce an Integer to 0 Bit Manipulation, Greedy, Dynamic Programming
- 4Sum II Hash Table, Array, Counting
- Maximum Size Subarray Sum Equals k Array, Hash Table, Prefix Sum
- Maximum Number of Occurrences of a Substring String, Sliding Window, Hash Table
- Kth Smallest Element Array, Sorting, Quickselect
- Maximum Index Array, Two Pointers
- Count Inversions Array, Divide and Conquer, Fenwick Tree
- K-diff Pairs in an Array Array, Hash Table
- Word Search Array, String, Backtracking
- Snakes and Ladders Array, Breadth-First Search, Matrix
- Minimum Genetic Mutation Hash Table, String, Breadth-First Search
- Maximal Network Rank Graph
- Path With Minimum Effort Array, Binary Search, Depth-First Search
- Time Needed to Inform All Employees Tree, Depth-First Search, Breadth-First Search
- Reorder Routes to Make All Paths Lead to the City Zero Depth-First Search, Breadth-First Search, Graph
- Number of Operations to Make Network Connected Depth-First Search, Breadth-First Search, Union Find
- Find Eventual Safe States Depth-First Search, Breadth-First Search, Graph
- Keys and Rooms Depth-First Search, Breadth-First Search, Graph
- Bulb Switcher Math, Brainteaser
- Divide Two Integers Math, Bit Manipulation
- Gray Code Math, Backtracking, Bit Manipulation
- Maximum XOR of Two Numbers in an Array Array, Hash Table, Bit Manipulation
- Sum of Two Integers Math, Bit Manipulation
- Bitwise AND of Numbers Range Bit Manipulation
- Single Number II Array, Bit Manipulation
- Dota2 Senate String, Greedy, Queue
- Reverse Substrings Between Each Pair of Parentheses String, Stack
- Basic Calculator II Math, String, Stack
- Validate Stack Sequences Array, Stack, Simulation
- Next Greater Element III Math, Two Pointers, String
- K Closest Points to Origin Array, Math, Divide and Conquer
- Partition Array into Disjoint Intervals Array, Greedy
- Maximum Swap Math, Greedy
- Largest Number Array, String, Greedy
- Remove Covered Intervals Array, Greedy, Sorting
- Minimum Number of Steps to Make Two Strings Anagram Hash Table, String, Counting
- Minimum Deletions to Make Character Frequencies Unique String, Hash Table, Greedy
- Reduce Array Size to The Half Array, Hash Table, Greedy
- Queue Reconstruction by Height Array, Greedy, Sorting
- Knight Dialer Dynamic Programming
- Last Stone Weight II Array, Dynamic Programming
- Ugly Number II Hash Table, Math, Dynamic Programming
- Interleaving String String, Dynamic Programming
- Delete Operation for Two Strings String, Dynamic Programming
- Count Servers that Communicate Array, Depth-First Search, Breadth-First Search
- Surrounded Regions Array, Depth-First Search, Breadth-First Search
- Game of Life Array, Matrix, Simulation
- Unique Paths II Array, Dynamic Programming, Matrix
- Minimum Path Sum Array, Dynamic Programming, Matrix
- Sort the Matrix Diagonally Array, Sorting, Matrix
- Spiral Matrix II Array, Matrix, Simulation
- Remove Duplicates from Sorted Array II Array, Two Pointers
- Longest Subarray of 1's After Deleting One Element Array, Dynamic Programming, Sliding Window
- String Compression Two Pointers, String
- Count and Say String, Simulation
- Reverse Words in a String Two Pointers, String
- Increasing Triplet Subsequence Array, Greedy
- Next Permutation Array, Two Pointers
- Find All Duplicates in an Array Array, Hash Table
- Integer to Roman Hash Table, Math, String
- Count Primes Math, Sieve of Eratosthenes
- Reverse Integer Math
Hard (94)
- Design Skiplist Linked List, Design
- LFU Cache Hash Table, Linked List, Design
- Subtraction in Linked List Linked List, Math
- Reverse Nodes in k-Group Linked List, Recursion
- Merge k Sorted Lists Linked List, Divide and Conquer, Heap (Priority Queue)
- Maximum Path Sum Between Two Leaves Tree, Depth-First Search, Recursion
- Binary Tree Cameras Tree, Depth-First Search, Dynamic Programming
- Binary Tree Maximum Path Sum Tree, Depth-First Search, Dynamic Programming
- Create Components With Same Value Array, Math, Tree
- Contain Virus Array, Depth-First Search, Breadth-First Search
- Articulation Points in a Graph Graph, Depth-First Search
- Strongly Connected Components (Kosaraju's Algorithm) Graph, Depth-First Search
- Substring With Largest Variance Array, Dynamic Programming
- Minimum Number of Removals to Make Mountain Array Array, Binary Search, Dynamic Programming
- Word Wrap Array, Dynamic Programming
- Boolean Parenthesization String, Dynamic Programming
- Matrix Chain Multiplication Array, Dynamic Programming
- Permutation Sequence Math, Recursion
- N-Queens II Backtracking, Bit Manipulation
- Word Search II String, Backtracking, Trie
- Sudoku Solver Array, Hash Table, Backtracking
- Max Sum of Rectangle No Larger Than K Array, Binary Search, Matrix
- Paint House III Array, Dynamic Programming
- Maximum Profit in Job Scheduling Array, Binary Search, Dynamic Programming
- Minimum Cost to Merge Stones Array, Dynamic Programming, Prefix Sum
- Arithmetic Slices II - Subsequence Array, Dynamic Programming, Hash Table
- Maximum Score from Performing Multiplication Operations Array, Dynamic Programming
- Course Schedule III Array, Greedy, Sorting
- The Skyline Problem Array, Divide and Conquer, Heap (Priority Queue)
- Basic Calculator Math, String, Stack
- Maximum of Minimum for Every Window Size Array, Stack, Monotonic Stack
- Maximum Score of a Good Subarray Array, Two Pointers, Stack
- Minimum Cost to Make Array Equal Array, Binary Search, Greedy
- Kth Smallest Product of Two Sorted Arrays Array, Binary Search, Two Pointers
- Consecutive Numbers Sum Math, Enumeration
- Parsing A Boolean Expression String, Stack, Recursion
- Student Attendance Record II Dynamic Programming, Combinatorics
- Integer to English Words String, Math, Recursion
- Text Justification Array, String, Simulation
- Count Ways to Make Array With Product Array, Math, Dynamic Programming
- Maximum Number of Events That Can Be Attended II Array, Binary Search, Dynamic Programming
- Create Sorted Array Through Instructions Array, Binary Search, Divide and Conquer
- Painting the Walls Array, Dynamic Programming
- Painting a Grid With Three Different Colors Dynamic Programming, Bitmask
- Minimum Incompatibility Array, Dynamic Programming, Bit Manipulation
- Number of Distinct Roll Sequences Dynamic Programming, Memoization
- Form Largest Integer With Digits That Add up to Target Array, String, Dynamic Programming
- Build Array Where You Can Find The Maximum Exactly K Comparisons Dynamic Programming, Prefix Sum
- Allocate Mailboxes Array, Math, Dynamic Programming
- Restore the Array String, Dynamic Programming
- Maximum Height by Stacking Cuboids Array, Dynamic Programming, Sorting
- Cherry Pickup II Array, Dynamic Programming, Matrix
- Number of Ways to Stay in the Same Place After Some Steps Dynamic Programming
- Maximum Value of K Coins From Piles Array, Dynamic Programming, Prefix Sum
- Count Special Integers Math, Dynamic Programming, Combinatorics
- Number of Great Partitions Array, Dynamic Programming
- Paths in Matrix Whose Sum Is Divisible by K Array, Dynamic Programming, Matrix
- Smallest K-Length Subsequence With Occurrences of a Letter String, Stack, Greedy
- Valid Palindrome III String, Dynamic Programming
- String Compression II String, Dynamic Programming
- Apply Operations to Maximize Score Array, Math, Stack
- Meeting Rooms III Array, Sorting, Simulation
- Maximum Performance of a Team Array, Greedy, Sorting
- Construct Target Array With Multiple Sums Array, Heap (Priority Queue), Math
- Minimum Number of Operations to Make Array Continuous Array, Hash Table, Binary Search
- Put Marbles in Bags Array, Greedy, Sorting
- Minimum Time to Visit a Cell In a Grid Array, Matrix, Graph
- Minimum Number of Days to Disconnect Island Array, Matrix, Depth-First Search
- Checking Existence of Edge Length Limited Paths Array, Union Find, Graph
- Minimum Obstacle Removal to Reach Corner Array, Matrix, Graph
- Largest Component Size by Common Factor Array, Math, Union Find
- Critical Connections in a Network Graph, Depth-First Search, Biconnected Component
- Number of Restricted Paths From First to Last Node Graph, Dynamic Programming, Shortest Path
- Jump Game IV Array, Hash Table, Breadth-First Search
- Escape the Spreading Fire Array, Matrix, Binary Search
- Making A Large Island Array, Matrix, Depth-First Search
- Unique Paths III Array, Matrix, Backtracking
- Maximal Rectangle Array, Matrix, Stack
- Minimum Cost to Cut a Stick Array, Dynamic Programming, Sorting
- Scramble String String, Dynamic Programming
- Distinct Subsequences II String, Dynamic Programming
- Frog Jump Array, Hash Table, Dynamic Programming
- Dungeon Game Array, Matrix, Dynamic Programming
- Russian Doll Envelopes Array, Binary Search, Dynamic Programming
- Split Array Largest Sum Array, Binary Search, Greedy
- Shortest Subarray with Sum at Least K Array, Prefix Sum, Sliding Window
- Subarrays with K Different Integers Array, Hash Table, Sliding Window
- Number of Digit One Math, Digit DP, Recursion
- Longest Happy Prefix String, KMP, Rolling Hash
- Shortest Palindrome String, KMP, Rolling Hash
- Word Ladder Hash Table, String, Breadth-First Search
- Longest Valid Parentheses String, Dynamic Programming, Stack
- Count Vowels Permutation Dynamic Programming
- Best Time to Buy and Sell Stock III Array, Dynamic Programming
Topics Microsoft asks most
- Arrays 206 problems
- Strings 92 problems
- Dynamic Programming 82 problems
- Trees 72 problems
- Depth-First Search 72 problems
- Math 60 problems
- Hash Table 53 problems
- Matrix 47 problems
- Breadth-First Search 46 problems
- Greedy 43 problems
- Sorting 42 problems
- Two Pointers 40 problems