Morgan Stanley coding interview
questions, leaked.
51 problems reported across recent Morgan Stanley interviews. Top patterns: array, hash table, string. The list below is what most reported candidates actually saw, plus the honest play if you can't grind all of it.
Morgan Stanley's assessment leans hard on arrays. 34 of 51 problems touch array manipulation, and two-thirds sit at medium difficulty or higher. You're looking at a blend of classic LeetCode (Two Sum, Merge Intervals) and harder algorithmic patterns (First Missing Positive, Count Subarrays With Fixed Bounds). Most candidates drill the easy stuff and choke on medium array problems that require dynamic programming or binary search. If you hit a wall mid-assessment, StealthCoder runs invisibly during screen share and surfaces a working solution in seconds, so you can skip past the wall and keep moving.
Top problems at Morgan Stanley
| # | Problem | Diff | Frequency | Pass % | Patterns |
|---|---|---|---|---|---|
| 01 | Best Time to Buy and Sell Stock | EASY | 100.0 | 55% | Array · Dynamic Programming |
| 02 | Find The Original Array of Prefix Xor | MEDIUM | 89.7 | 88% | Array · Bit Manipulation |
| 03 | Minimum Cost to Move Chips to The Same Position | EASY | 89.7 | 72% | Array · Math · Greedy |
| 04 | Best Team With No Conflicts | MEDIUM | 89.7 | 50% | Array · Dynamic Programming · Sorting |
| 05 | The Employee That Worked on the Longest Task | EASY | 87.5 | 51% | Array |
| 06 | Find Subarrays With Equal Sum | EASY | 87.5 | 66% | Array · Hash Table |
| 07 | Find the Longest Valid Obstacle Course at Each Position | HARD | 87.5 | 63% | Array · Binary Search · Binary Indexed Tree |
| 08 | Minimum Number of Lines to Cover Points | MEDIUM | 87.5 | 43% | Array · Hash Table · Math |
| 09 | Count Subarrays With Fixed Bounds | HARD | 75.5 | 69% | Array · Queue · Sliding Window |
| 10 | Merge Intervals | MEDIUM | 71.2 | 49% | Array · Sorting |
| 11 | Two Sum | EASY | 71.2 | 56% | Array · Hash Table |
| 12 | First Missing Positive | HARD | 65.9 | 41% | Array · Hash Table |
| 13 | Longest Substring Without Repeating Characters | MEDIUM | 65.9 | 37% | Hash Table · String · Sliding Window |
| 14 | Make K-Subarray Sums Equal | MEDIUM | 59.2 | 37% | Array · Math · Greedy |
| 15 | Group Anagrams | MEDIUM | 59.2 | 71% | Array · Hash Table · String |
| 16 | 3Sum | MEDIUM | 59.2 | 37% | Array · Two Pointers · Sorting |
| 17 | Minimum Number of Refueling Stops | HARD | 59.2 | 41% | Array · Dynamic Programming · Greedy |
| 18 | Kth Largest Element in an Array | MEDIUM | 59.2 | 68% | Array · Divide and Conquer · Sorting |
| 19 | Copy List with Random Pointer | MEDIUM | 59.2 | 61% | Hash Table · Linked List |
| 20 | LRU Cache | MEDIUM | 59.2 | 45% | Hash Table · Linked List · Design |
| 21 | Contiguous Array | MEDIUM | 59.2 | 49% | Array · Hash Table · Prefix Sum |
| 22 | Minimum Operations to Reduce X to Zero | MEDIUM | 49.7 | 40% | Array · Hash Table · Binary Search |
| 23 | Stamping The Sequence | HARD | 49.7 | 62% | String · Stack · Greedy |
| 24 | Steps to Make Array Non-decreasing | MEDIUM | 49.7 | 23% | Array · Linked List · Stack |
| 25 | Valid Parentheses | EASY | 49.7 | 42% | String · Stack |
| 26 | Min Stack | MEDIUM | 49.7 | 56% | Stack · Design |
| 27 | Letter Combinations of a Phone Number | MEDIUM | 49.7 | 64% | Hash Table · String · Backtracking |
| 28 | Meeting Rooms II | MEDIUM | 49.7 | 52% | Array · Two Pointers · Greedy |
| 29 | Jump Game | MEDIUM | 49.7 | 39% | Array · Dynamic Programming · Greedy |
| 30 | Next Greater Element I | EASY | 49.7 | 75% | Array · Hash Table · Stack |
| 31 | Count Binary Substrings | EASY | 49.7 | 66% | Two Pointers · String |
| 32 | Rotate List | MEDIUM | 49.7 | 40% | Linked List · Two Pointers |
| 33 | Reverse String | EASY | 49.7 | 80% | Two Pointers · String |
| 34 | Decode Ways | MEDIUM | 49.7 | 37% | String · Dynamic Programming |
| 35 | Count of Range Sum | HARD | 49.7 | 37% | Array · Binary Search · Divide and Conquer |
| 36 | Subarray Sum Equals K | MEDIUM | 49.7 | 45% | Array · Hash Table · Prefix Sum |
| 37 | Count of Integers | HARD | 49.7 | 37% | Math · String · Dynamic Programming |
| 38 | Reverse Words in a String | MEDIUM | 49.7 | 52% | Two Pointers · String |
| 39 | House Robber | MEDIUM | 49.7 | 52% | Array · Dynamic Programming |
| 40 | Subtree of Another Tree | EASY | 49.7 | 50% | Tree · Depth-First Search · String Matching |
| 41 | Sort Colors | MEDIUM | 49.7 | 68% | Array · Two Pointers · Sorting |
| 42 | Maximum Subarray | MEDIUM | 49.7 | 52% | Array · Divide and Conquer · Dynamic Programming |
| 43 | Remove Duplicates from Sorted Array | EASY | 49.7 | 60% | Array · Two Pointers |
| 44 | Generate Parentheses | MEDIUM | 49.7 | 77% | String · Dynamic Programming · Backtracking |
| 45 | Kth Missing Positive Number | EASY | 49.7 | 62% | Array · Binary Search |
| 46 | Coin Change II | MEDIUM | 49.7 | 62% | Array · Dynamic Programming |
| 47 | Palindrome Linked List | EASY | 49.7 | 56% | Linked List · Two Pointers · Stack |
| 48 | Word Search | MEDIUM | 49.7 | 45% | Array · String · Backtracking |
| 49 | Number of Islands | MEDIUM | 49.7 | 62% | Array · Depth-First Search · Breadth-First Search |
| 50 | Subarrays with K Different Integers | HARD | 49.7 | 66% | Array · Hash Table · Sliding Window |
Frequencies derived from public community-tagged interview reports. Click a row to view on LeetCode.
You have a week, maybe less. You can't out-grind the list above. StealthCoder runs invisibly during the actual Morgan Stanley OA. The proctor cannot see it. Screen share cannot detect it. Built by an Amazon engineer who realized the OA tests how well you memorized 200 problems, not how well you code.
Get StealthCoder- array34 · 67%
- hash table14 · 27%
- string13 · 25%
- dynamic programming12 · 24%
- two pointers10 · 20%
- sorting8 · 16%
- greedy6 · 12%
- stack6 · 12%
- linked list5 · 10%
- math4 · 8%
Array problems dominate, so start there. Best Time to Buy and Sell Stock and Two Sum are warm-ups; don't waste time on them. Focus on the medium-tier array-DP problems (Best Team With No Conflicts, Find Subarrays With Equal Sum) because they appear repeatedly and trip most candidates. Hash tables show up in 14 problems, always paired with arrays or strings. Sorting and greedy algorithms are lighter (8 and 6 problems) but often combined with arrays, so they're less of a standalone threat. The hard tier (8 problems total) uses binary search and sliding window on arrays, patterns you won't see in most prep plans. Drilling those three to four hard array problems gives you confidence the night before. StealthCoder is your hedge for whatever pattern you didn't have time to cover, running live if you blank on a hash-table optimization or a binary-search variant.
Companies with similar patterns
If you prepped for Morgan Stanley, these companies recycle ~60% of the same topics.
You've seen the list.
Now make sure you pass Morgan Stanley.
Memorizing every problem above in a week is a fantasy. StealthCoder is the hedge: an AI overlay that's invisible during screen share. It reads the problem on screen and surfaces a working solution in under 2 seconds. Built by an Amazon engineer who realized the OA tests how well you memorized 200 problems, not how well you code. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Morgan Stanley interview FAQ
Should I focus on easy problems first?+
No. Morgan Stanley has 13 easy problems out of 51, but 30 medium ones. Easy problems like Two Sum and Best Time to Buy and Sell Stock are baseline. Spend 70% of your time on medium array and hash-table problems where most candidates actually fail. Easy drills are confidence, not the fight.
How much time should I spend on dynamic programming?+
12 problems touch DP. Most are array-based (Best Team With No Conflicts, Best Time to Buy and Sell Stock). Start by solving array problems that use DP. Don't study DP in isolation. Learn it through the problems themselves, which is faster.
Are hash tables as important as arrays?+
Hash tables appear in 14 problems, but almost always paired with arrays or strings. Master array problems first. Hash tables will feel natural once you're comfortable slicing, searching, and grouping arrays. They're the secondary pattern, not the primary threat.
What's the hardest topic I should drill before the assessment?+
Binary search and sliding window on arrays. Count Subarrays With Fixed Bounds and Find the Longest Valid Obstacle Course sit in the hard tier and combine these patterns. Most candidates skip them. Solving two or three hard array problems gives you a concrete edge.
Is sorting worth studying separately?+
Sorting appears in 8 problems, but never alone. It's always bundled with arrays (Merge Intervals, Best Team With No Conflicts). Know how to sort and merge arrays. Don't drill sorting as a standalone topic. You'll pick it up naturally from array problems.