49 problems · 13 Easy, 28 Medium, 8 Hard · Ranked #42 of 458
Difficulty breakdown
13 Easy
27% · avg 23%
28 Medium
57% · avg 59%
8 Hard
16% · avg 18%
Top topics
array
65.3%
string
26.5%
dynamic-programming
24.5%
hash-table
24.5%
two-pointers
18.4%
sorting
14.3%
Interview profile
Based on 49 reported problems, Morgan Stanley interviews are in line with industry averages - 16% Hard vs 18% overall. The majority (57%) of questions are Medium difficulty, which is typical for companies that want to see solid fundamentals without excessive trick questions.
Compared to the industry average, Morgan Stanley puts unusual emphasis on binary-indexed-tree (4.1% of problems, 9.2x the industry average), queue (4.1% of problems, 2.8x the industry average), prefix-sum (6.1% of problems, 1.8x the industry average). If you're short on time, these are the categories to double down on.
The most common topics are array (65.3%), string (26.5%), dynamic-programming (24.5%), hash-table (24.5%). Problems below are sorted by frequency, the ones at the top are asked most often.
All 49 problems
Problem
Difficulty
Frequency
Topics
Best Time to Buy and Sell Stock
You are given an array prices where prices[i] is the price of a given stock on the ith day.
You are the manager of a basketball team. For the upcoming tournament, you want to choose the team with the highest overall score. The score of the team is the...
Find the Longest Valid Obstacle Course at Each Position
You want to build some obstacle courses. You are given a 0-indexed integer array obstacles of length n, where obstacles[i] describes the height of the ith obsta...
Given a 0-indexed integer array nums, determine whether there exist two subarrays of length 2 with equal sum. Note that the two subarrays must begin at differen...
Given an array of intervals where intervals[i] = [starti, endi], merge all overlapping intervals, and return an array of the non-overlapping intervals that cove...
Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0.
You are given a 0-indexed integer array arr and an integer k. The array arr is circular. In other words, the first element of the array is the next element of t...
You are given an integer array nums and an integer x. In one operation, you can either remove the leftmost or the rightmost element from the array nums and subt...
Given a binary string s, return the number of non-empty substrings that have the same number of 0's and 1's, and all the 0's and all the 1's in these substrings...
Given the roots of two binary trees root and subRoot, return true if there is a subtree of root with the same structure and node values of subRoot and false oth...
Given an integer array nums sorted in non-decreasing order, remove the duplicates in-place such that each unique element appears only once. The relative order o...
You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from rob...
You are given an integer array nums. You are initially positioned at the array's first index, and each element in the array represents your maximum jump length...
Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. Return the answer in any order.
Given an array nums with n objects colored red, white, or blue, sort them in-place so that objects of the same color are adjacent, with the colors in the order...
You are the manager of a basketball team. For the upcoming tournament, you want to choose the team with the highest overall score. The score of the team is the...
You want to build some obstacle courses. You are given a 0-indexed integer array obstacles of length n, where obstacles[i] describes the height of the ith obsta...
Given a 0-indexed integer array nums, determine whether there exist two subarrays of length 2 with equal sum. Note that the two subarrays must begin at differen...
Given an array of intervals where intervals[i] = [starti, endi], merge all overlapping intervals, and return an array of the non-overlapping intervals that cove...
Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0.
You are given a 0-indexed integer array arr and an integer k. The array arr is circular. In other words, the first element of the array is the next element of t...
You are given an integer array nums and an integer x. In one operation, you can either remove the leftmost or the rightmost element from the array nums and subt...
Given a binary string s, return the number of non-empty substrings that have the same number of 0's and 1's, and all the 0's and all the 1's in these substrings...
Given the roots of two binary trees root and subRoot, return true if there is a subtree of root with the same structure and node values of subRoot and false oth...
Given an integer array nums sorted in non-decreasing order, remove the duplicates in-place such that each unique element appears only once. The relative order o...
You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from rob...
You are given an integer array nums. You are initially positioned at the array's first index, and each element in the array represents your maximum jump length...
Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. Return the answer in any order.
Given an array nums with n objects colored red, white, or blue, sort them in-place so that objects of the same color are adjacent, with the colors in the order...
The next greater element of some element x in an array is the first greater element that is to the right of x in the same array.
EasySometimes
arrayhash-tablestack
How often are these problems asked?
Frequency scores are based on crowdsourced interview reports. A higher score means the problem has been reported more often in recent Morgan Stanley interviews.
Very Likely
75-100%
Likely
50-74%
Sometimes
25-49%
Rare
0-24%
Preparing for your Morgan Stanley coding interview
Morgan Stanley interviews focus heavily on array, string, dynamic-programming problems. If you're short on time, these are the categories to prioritize. The problems on this page are sorted by frequency, so start from the top and work your way down.
Beyond solving problems, practice explaining your approach. Morgan Stanley interviewers care about your thought process - how you break down a problem, consider edge cases, and evaluate tradeoffs between solutions. A clean O(n) solution you can explain clearly beats an O(log n) solution you can't articulate.
What coding problems does Morgan Stanley ask in interviews?add
Morgan Stanley has been reported to ask 49 distinct coding problems. The most common topics are array, string, dynamic-programming. 13 are Easy difficulty, 28 are Medium, and 8 are Hard. Problems are sorted by frequency - the ones at the top are asked most often.
How hard are Morgan Stanley coding interviews?add
Based on 49 reported problems, Morgan Stanley interviews are in line with industry averages - 16% Hard vs 18% overall. 57% of questions are Medium difficulty. Focus on the high-frequency Medium problems first, then work through the Hard ones.
How should I prepare for a Morgan Stanley coding interview?add
Start with the highest-frequency problems listed on this page. Focus on the core topics: array, string, dynamic-programming. Practice solving them under time pressure and explaining your approach out loud. Mock interviews with AI can simulate the real experience.
Simulate a real Morgan Stanley coding interview with an AI interviewer. Get a scorecard with specific feedback on your problem-solving, code quality, and communication.