MathWorks LeetCode Questions
29 questions all-time · 5 easy · 13 medium · 11 hard
| # | Problem | Difficulty | Frequency | Acceptance |
|---|---|---|---|---|
| 1 | Count Subarrays With Fixed Bounds Array, Queue, Sliding Window, Monotonic Queue | Hard | 100 | 69.4% |
| 2 | Maximum Number of Alloys Array, Binary Search | Medium | 99 | 38.9% |
| 3 | Sell Diminishing-Valued Colored Balls Array, Math, Binary Search, Greedy, Sorting, Heap (Priority Queue) | Medium | 91 | 30.0% |
| 4 | Reshape the Matrix Array, Matrix, Simulation | Easy | 91 | 63.9% |
| 5 | Total Cost to Hire K Workers Array, Two Pointers, Heap (Priority Queue), Simulation | Medium | 91 | 43.1% |
| 6 | Earliest Second to Mark Indices I Array, Binary Search | Medium | 89 | 34.7% |
| 7 | Binary Tree Cameras Dynamic Programming, Tree, Depth-First Search, Binary Tree | Hard | 89 | 47.2% |
| 8 | Keyboard Row Array, Hash Table, String | Easy | 89 | 72.5% |
| 9 | Maximum Palindromes After Operations Array, Hash Table, String, Greedy, Sorting, Counting | Medium | 89 | 43.1% |
| 10 | Shopping Offers Array, Dynamic Programming, Backtracking, Bit Manipulation, Memoization, Bitmask | Medium | 89 | 51.9% |
| 11 | Earliest Second to Mark Indices II Array, Binary Search, Greedy, Heap (Priority Queue) | Hard | 89 | 20.3% |
| 12 | Last Substring in Lexicographical Order Two Pointers, String | Hard | 89 | 34.6% |
| 13 | Count Anagrams Hash Table, Math, String, Combinatorics, Counting | Hard | 89 | 35.2% |
| 14 | Remove Colored Pieces if Both Neighbors are the Same Color Math, String, Greedy, Game Theory | Medium | 89 | 62.8% |
| 15 | Minimum Cost Tree From Leaf Values Array, Dynamic Programming, Stack, Greedy, Monotonic Stack | Medium | 89 | 67.7% |
| 16 | Pass the Pillow Math, Simulation | Easy | 81 | 56.6% |
| 17 | String Transformation Math, String, Dynamic Programming, String Matching | Hard | 81 | 25.1% |
| 18 | Minimum Edge Reversals So Every Node Is Reachable Dynamic Programming, Depth-First Search, Breadth-First Search, Graph | Hard | 73 | 55.3% |
| 19 | Longest String Chain Array, Hash Table, Two Pointers, String, Dynamic Programming, Sorting | Medium | 61 | 62.0% |
| 20 | Sum of Distances in Tree Dynamic Programming, Tree, Depth-First Search, Graph | Hard | 61 | 65.3% |
| 21 | Number of Divisible Triplet Sums Array, Hash Table | Medium | 61 | 67.8% |
| 22 | Split Array Largest Sum Array, Binary Search, Dynamic Programming, Greedy, Prefix Sum | Hard | 61 | 58.1% |
| 23 | Break a Palindrome String, Greedy | Medium | 51 | 51.5% |
| 24 | Reverse Nodes in k-Group Linked List, Recursion | Hard | 51 | 63.0% |
| 25 | Maximum Difference Between Increasing Elements Array | Easy | 51 | 66.1% |
| 26 | Convert Binary Number in a Linked List to Integer Linked List, Math | Easy | 51 | 81.2% |
| 27 | Longest Repeating Character Replacement Hash Table, String, Sliding Window | Medium | 51 | 57.2% |
| 28 | Distinct Subsequences String, Dynamic Programming | Hard | 51 | 50.1% |
| 29 | Beautiful Arrangement Array, Dynamic Programming, Backtracking, Bit Manipulation, Bitmask | Medium | 51 | 64.5% |
How to read this list
The tabs at the top split the questions by how recently people said they were asked in interviews. "Last 30 Days" is the past month, "Last 3 Months" is the past quarter, and so on. "All Time" is every question on record for this company.
Frequency is a score from 0 to 100 for how often a question showed up in that time window. A higher number means it came up more often, so the list starts with the most common questions first. Acceptance is the share of submissions that pass on LeetCode. Click any question to open it on LeetCode.