0 day streak

Morgan Stanley coding interview questions

BankingFintech India Machine coding / LLD

Ranked by how often candidates report them. Each opens in the editor with hidden tests, an animated walkthrough and solutions in four languages; a question you solve once counts for every company that asks it.

0%ready
ProgressTitleDifficultyTopicHow often hereAlso asked atNext step
Best Time to Buy and Sell StockState Machine DP - Stock Problems Easy Dynamic Programming Amazon, Microsoft, Apple +38 Solve
Two SumTwo Sum Easy Arrays & Hashing Google, Amazon, Microsoft +46 Solve
Find The Original Array of Prefix XorXOR Basics Medium Bit Manipulation Nvidia Solve
Delete and Earn1D DP Medium Dynamic Programming Salesforce, Walmart Global Tech, Meesho Solve
Longest Substring Without Repeating CharactersSliding Window · Variable Medium Arrays & Hashing Google, Amazon, Microsoft +50 Solve
Merge IntervalsBasics Medium Intervals Google, Amazon, Microsoft +45 Solve
Copy List with Random PointerMiscellaneous Medium Linked List Google, Amazon, Microsoft +8 Solve
LRU CacheLinked Lists Medium Design Data Structures Google, Amazon, Microsoft +49 Solve
Palindrome NumberMath / Number Theory Easy Arrays & Hashing Bloomberg, Qualcomm, Intel +10 Solve
First Unique Character in a StringHashing Easy Arrays & Hashing Databricks, Nutanix, Goldman Sachs +8 Solve
Sort ColorsDutch National Flag Medium Arrays & Hashing Microsoft, Nvidia, Visa +12 Solve
Count Subarrays With Fixed BoundsSliding Window · Variable Hard Arrays & Hashing PhonePe, Meesho Solve
Kth Largest Element in an ArrayTop K / Kth Largest / Smallest Medium Heaps Meta, Apple, Netflix +14 Solve
3SumTwo Sum Medium Arrays & Hashing Google, Microsoft, Meta +31 Solve
Group AnagramsHashing Medium Arrays & Hashing Amazon, Microsoft, Meta +31 Solve
Spiral MatrixMatrix Traversal Medium Arrays & Hashing Microsoft, Apple, Databricks +15 Solve
Maximum Product SubarrayKadane's Algorithm Medium Arrays & Hashing LinkedIn, Salesforce, Adobe +4 Solve
Daily TemperaturesMonotonic Stack Medium Monotonic Stack Amazon, Salesforce, Intuit +5 Solve
Remove Nth Node From End of ListFront Back Pointer Medium Linked List Apple, Qualcomm, VMware by Broadcom +4 Solve
Next PermutationRight to Left Traversal Medium Arrays & Hashing Google, Amazon, Meta +15 Solve
Next Greater Element IMonotonic Stack Easy Monotonic Stack Oracle, Adobe, Barclays +8 Solve
Next Greater Element IIMonotonic Stack Medium Monotonic Stack Walmart Global Tech, Myntra Solve
Meeting Rooms IILine Sweep Medium Intervals Amazon, Meta, Apple +13 Solve
Jump GameGreedy Medium Arrays & Hashing Apple, DoorDash, Adobe +5 Solve
Contiguous ArrayPrefix Sum Strategy Medium Arrays & Hashing Cisco, PayPal, Tower Research Capital +1 Solve
Remove Duplicates from Sorted ArrayTwo Pointer Easy Arrays & Hashing Microsoft, Bloomberg, Cisco +8 Solve
Generate ParenthesesPick / Not-Pick Medium Recursion & Backtracking Google, Microsoft, Bloomberg +13 Solve
Word Search2D Matrix Backtracking Medium Recursion & Backtracking Google, Microsoft, Meta +13 Solve
Longest Common SubsequenceStrings Medium Dynamic Programming Google, Amazon, Apple +5 Solve
Remove All Adjacent Duplicates in String IIStack Basics Medium Stack Amazon, Spotify, Goldman Sachs +2 Solve
Next Greater Element IIIRight to Left Traversal Medium Arrays & Hashing DoorDash Solve
Minimum Number of Taps to Open to Water a GardenGreedy Hard Arrays & Hashing Uber, D. E. Shaw, Tower Research Capital +1 Solve
CandyGreedy Hard Arrays & Hashing Goldman Sachs, Razorpay Solve
Longest Palindromic SubstringStrings Medium Dynamic Programming Amazon, Microsoft, Apple +22 Solve
Reorder ListSlow Fast Pointers Medium Linked List Meta Solve
Palindrome Linked ListFront Middle Back Pointer Easy Linked List Meta, Spotify, Intel +1 Solve
Longest Increasing Subsequence1D DP Medium Dynamic Programming Google, Atlassian, Goldman Sachs +9 Solve
Coin ChangeKnapsack Medium Dynamic Programming Google, Microsoft, Apple +18 Solve
LFU CacheLinked Lists Hard Design Data Structures Amazon, Apple, Netflix +10 Solve
Binary Tree Level Order TraversalTraversals Medium Trees & BST Microsoft, Apple, Intel +1 Solve
Subarrays with K Different IntegersSliding Window · Hash Map Hard Arrays & Hashing ServiceNow, Flipkart Solve
Also reported, being added to AlgoRung (9)

Best Team With No Conflicts · Minimum Cost to Move Chips to The Same Position · Find the Longest Valid Obstacle Course at Each Position · Minimum Number of Lines to Cover Points · Find Subarrays With Equal Sum · The Employee That Worked on the Longest Task · Stamping The Sequence · Minimum Operations to Reduce X to Zero · Least Number of Unique Integers after K Removals

Questions people ask

What coding questions does Morgan Stanley ask most?

Best Time to Buy and Sell Stock, Two Sum, Find The Original Array of Prefix Xor, Delete and Earn, Longest Substring Without Repeating Characters, Merge Intervals, Copy List with Random Pointer, LRU Cache.

Which topics come up in Morgan Stanley coding rounds?

arrays, strings, linked list, stack, dynamic programming, intervals.

How hard are Morgan Stanley coding questions?

Of the reported questions, 7 are easy, 29 medium and 5 hard. A 45 to 60 minute live interview where you solve one or two data-structures-and-algorithms problems while explaining your thinking. Interviewers score problem solving, code quality, testing and communication.