Morgan Stanley interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

Morgan Stanley
upvote
share-icon
3 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Journey
The company's recruitment process was efficient and hassle-free. I went through a total of 3 rounds, and at each step, the process was smooth and convenient.I had a positive experience throughout the process and found it to be a great experience. The company's recruitment process was well-organized and streamlined, making it easy for the candidate to navigate. Overall, I was impressed with the company's recruitment process and would recommend it to others.
Application story
I got to know about the vacancy and applied on the company's website. The first online assessment was on 16th October 2022. I got the email for online interview on 4th November. The interviews were conducted on Skype call.
Why selected/rejected for the role?
I was rejected as I was struggling with solving complex problems and was not be able to come up with effective solutions in the interview.
Preparation
Duration: 4 Months
Topics: Dynamic programming, DBMS, OS, GRAPHS, trees, algorithms
Tip
Tip

Tip 1 : consistently practice the coding problems 
Tip 2 : have a good resume 
Tip 3 : give online coding contests

Application process
Where: Other
Eligibility: No active backlogs
Resume Tip
Resume tip

Tip 1 : good problem solving skills 
Tip 2 : communication skills matter alot during interviews

Interview rounds

01
Round
Medium
Online Coding Test
Duration100 Minutes
Interview date16 Oct 2022
Coding problem2

It was an online assessment on Hackerrank platform. We can attempt it on the anytime between the given time slot . Mic and camera were on.

1. Group Anagrams Together

Moderate
0/80
Asked in companies
AdobeAmazonGoogle

You have been given an array/list of strings 'STR_LIST'. You are supposed to return the strings as groups of anagrams such that strings belonging to a particular group are anagrams of one another.

Note :
An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase. We can generalize this in string processing by saying that an anagram of a string is another string with the same quantity of each character in it, in any order.
Example:
{ “abc”, “ged”, “dge”, “bac” } 
In the above example the array should be divided into 2 groups. The first group consists of { “abc”, “bac” } and the second group consists of { “ged”, “dge” }.
Try solving now

2. Count Distinct Elements in Every Window

Moderate
15m average time
85% success
0/80
Asked in companies
HSBCZS AssociatesCIS - Cyber Infrastructure

Given an array of integers ‘arr’ of size ‘n’ and an integer ‘k’. You need to find the count of distinct elements in every sub-array of size ‘k’ in the given array. Return an integer array ‘count’ that consists of n - k + 1 integers where ‘count[i]’ is equal to the number of distinct elements in a sub-array of size ‘k’ starting from index ‘i’.

Note:
1. The sub-array of an array is a continuous part of the array.
2. Consider ‘0’ based indexing.
3. ‘k’ will always be less than or equal to ‘n’.
3. Don’t print anything, just return the integer array ‘count’.
Try solving now
02
Round
Hard
Video Call
Duration40 Minutes
Interview date9 Nov 2022
Coding problem2

It was on Skype call between 10:30 am . The interview began on time. The interviewer was friendly and engaging in the discussion.

1. Maximum Size Rectangle Sub-matrix With All 1's

Hard
10m average time
80% success
0/120
Asked in companies
CiscoRazorpayAmerican Express

You are given an 'N' * 'M' sized binary-valued matrix 'MAT, where 'N' is the number of rows and 'M' is the number of columns. You need to return the maximum size (area) of the submatrix which consists of all 1’s i.e. the maximum area of a submatrix in which each cell has only the value ‘1’.

subMatrix_image

In the above image, areas in green, red, and violet color are all submatrices of the original 4x4 matrix.

Note:

1. Binary valued matrix has only two values in each cell : 0 and 1.
2. A submatrix is a matrix formed by selecting certain rows and columns from a larger matrix.
3. The area of a matrix with 'h' rows and 'w' columns is equal to 'h' * 'w'. 
Problem approach

1) Construct a sum matrix S[R][C] for the given M[R][C].
a) Copy first row and first columns as it is from M[][] to S[][]
b) For other entries, use following expressions to construct S[][]
If M[i][j] is 1 then
S[i][j] = min(S[i][j-1], S[i-1][j], S[i-1][j-1]) + 1
Else /*If M[i][j] is 0*/
S[i][j] = 0
2) Find the maximum entry in S[R][C]
3) Using the value and coordinates of maximum entry in S[i], print 
sub-matrix of M[][]

Try solving now

2. Minimum Swaps To Convert Binary Tree Into BST

Moderate
20m average time
80% success
0/80
Asked in companies
IntuitAmazon

You are given an arbitrary array of ‘N’ nodes which represents a complete binary tree, which means, for a node at index ‘i’, its left child will be at index (2 * i + 1) and right child will be at index (2 * i + 2).

You have to find the minimum number of swaps to convert this tree into a binary search tree.

Binary search tree is a binary tree where for any given root, all the values in the left subtree are smaller than the value of root and all the values in the right subtree are greater than or equal to the value of the root.

Problem approach

1.The idea is to use the fact that inorder traversal of Binary Search Tree is in increasing order of their value. 
2.So, find the inorder traversal of the Binary Tree and store it in the array and try to sort the array. The minimum number of swap required to get the array sorted will be the answer.

Try solving now
03
Round
Medium
HR Round
Duration40 Minutes
Interview date19 Nov 2022
Coding problem2

In this round the interviewer asked me a puzzle and one coding problem .

1. Greedy Algorithm For Ninja And The Coins

Easy
0/40
Asked in companies
InfosysFlipkartHuman Holdings

Ninja went to the toffee shop, and he purchased some toffies worth 'V' cents. Ninja has an unlimited supply of coins of 1, 2, 5, 10, 20, 50, 100, 500, and 1000 cents. Now Ninja wants to know the minimum number of coins he needs to pay to the shopkeeper.

Your task is to find the minimum number of coins Ninja needs to pay to the shopkeeper so as to pay 'V' cents to him.

Note: You have to solve this problem using the greedy approach.

Example:
Input: 'V' = 60
Output: 2

Ninja need to pay two coins only 50 + 10 = 60
Try solving now

2. Puzzle

Suppose we have 3 glasses and 10 coins. The problem is to place odd number of coins in each glass i.e. each glass should contain coins and the number of coins in each glass must be odd and total coins which will be used must be equal to 10.

Problem approach

1. It is not possible to use all 10 coins with each glass having odd number of coins. Therefore, we must think out of box.
2. In the 1st glass place 5 coins which is odd, after that in second glass place 2 coins and in the third glass place 3 coins which is odd. 
3. Now, place the entire 3rd glass inside 2nd glass. Indirectly, now 2nd glass contains 5 coins which is odd in nature.

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

Which of the following ensures referential integrity in SQL?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by Morgan Stanley
0 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 4 problems
Interviewed by Morgan Stanley
0 views
0 comments
0 upvotes
company logo
SDE - 1
1 rounds | 3 problems
Interviewed by Morgan Stanley
629 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by Morgan Stanley
613 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
109482 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
53499 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
32857 views
6 comments
0 upvotes