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

SDE - 1

Morgan Stanley
upvote
share-icon
2 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 6 months
Topics: I covered major data structure topics such as Arrays, Stacks, Queues, Linked Lists, Trees, Graphs, backtracking, and Dynamic Programming. After studying each topic, I practiced as many questions as possible from Coding Ninjas, GeeksforGeeks, and Hackerrank. When I encountered difficulties with a question, I preferred to watch solution videos provided by Coding Ninjas.
Tip
Tip

Tip 1: Consistent coding practice is crucial as it enables you to solve interview questions within the stipulated time. However, before diving into coding, it's essential to have a clear understanding of all data structures. This ensures that you can easily implement them when needed to solve a problem. Additionally, understanding the time and space complexities of algorithms is mandatory, as these factors are crucial in real interviews. Having good intuition and a solid problem-solving approach greatly aids in cracking interviews at top companies.

Tip 2: Employers do not judge you based on the number of internships or projects you've completed. A single high-quality project is sufficient, provided you have in-depth knowledge about it. What matters most is your efficiency as a learner, your problem-solving skills, and your confidence in your answers.

Tip 3: Practice solving questions topic-wise, participate in coding contests, and watch numerous YouTube solutions even after solving a question. Watching video solutions offers a clearer and deeper understanding of the logic, and you may discover more efficient approaches than your own. Additionally, praying hard alongside your preparation can bring positive outcomes.

Application process
Where: Campus
Eligibility: Above 7 CGPA
Resume Tip
Resume tip

Tip 1: Keep your resume short and clear. Mention your projects and internships with a brief description and the year of completion. Include the coding languages or other technical skills that you are proficient in. Avoid mentioning anything that you are not confident in. Highlight the topics that you excel in.

Tip 2: Be very honest and include only the things in your resume that you truly know. Anything extra or unknown may have a negative impact during your interview if asked about by the interviewer.

Interview rounds

01
Round
Easy
Video Call
Duration45 minutes
Interview date4 Mar 2022
Coding problem2

1. Word Search

Moderate
30m average time
60% success
0/80
Asked in companies
OlaGoldman SachsIBM

You are given a 2D board('N' rows and 'M' columns) of characters and a string 'word'.


Your task is to return true if the given word exists in the grid, else return false. The word can be constructed from letters of sequentially adjacent cells, where adjacent cells are horizontally or vertically neighboring.


Note:
The same letter cell should not be used more than once.
For Example:
For a given word “design” and the given 2D board 
[[q’, ‘v’, ‘m’, ‘h’],
 [‘d’, ‘e’, ‘s’, ‘i’],
 [‘d’, ‘g’, ‘f’, ‘g’],
 [‘e’, ‘c’, ‘p’, ‘n’]]

The word design can be formed by sequentially adjacent cells as shown by the highlighted color in the 2nd row and last column.

board

Problem approach

You are given a two-dimensional grid having 'N' rows and 'M' columns, consisting of upper case characters. You are also given a word 'WORD'. You have to find the number of occurrences of that word in the grid.
Starting from a given cell, a word can be formed by moving in all eight directions: horizontally left, horizontally right, vertically up, vertically down, and four diagonal directions.

Try solving now

2. Climbing the leaderboard

Moderate
15m average time
80% success
0/80
Asked in companies
Wells FargoGoldman SachsDunzo

Given a leaderboard of a game with the following ranking pattern:

The player with the highest score is ranked number 1 on the leaderboard.

Players who have equal scores receive the same ranking number, and the next player(s) receive the immediately following ranking number.

You are given game scores of a player of ‘M’ rounds. Your task is to return the position obtained in each round.

Note:
The leaderboard scores are in descending order.
The game scores are given in ascending order.
Problem approach

Given a leaderboard of a game with the following ranking pattern:
The player with the highest score is ranked number 1 on the leaderboard.
Players who have equal scores receive the same ranking number, and the next player(s) receive the immediately following ranking number.
You are given game scores of a player of ‘M’ rounds. Your task is to return the position obtained in each round.

Try solving now
02
Round
Easy
Video Call
Duration45 minutes
Interview date5 May 2022
Coding problem2

1. Design a hashset

Moderate
25m average time
65% success
0/80
Asked in companies
Goldman SachsExpedia GroupMorgan Stanley

Design a HashSet without using any built-in hash table libraries.

Implement the following public functions :

1) Constructor: It initializes the data members as required.

2) add(value): It inserts an element into the HashSet. The function takes one argument which is the value that needs to be added and returns nothing

3) contains(value): It checks whether the element exists in the HashSet or not. The function takes one argument which is the value that needs to be searched for in the HashSet. The function returns true if the element exists, otherwise returns false.

4) remove(value): It removes an element from the HashSet. The function takes one argument which is the value that needs to be removed from the HashSet and returns the element which is being removed. If the element does not exist in the HashSet or if HashSet is empty, return -1.
Operations Performed on the HashSet:
Query-1 (Denoted by an integer 1)- Inserts an element in the HashSet

Query-2 (Denoted by an integer 2)- Returns a boolean value denoting whether the element is present in the HashSet or not.

Query-3 (Denoted by an integer 3)- Removes the element from the HashSet.
Problem approach

Design a HashSet without using any built-in hash table libraries.
Implement the following public function

Try solving now
Hard
20m average time
80% success
0/120
Asked in companies
Goldman SachsUberApple

You are given an arbitrary binary tree, a node of the tree, and an integer 'K'. You need to find all such nodes which have a distance K from the given node and return the list of these nodes.


Distance between two nodes in a binary tree is defined as the number of connections/edges in the path between the two nodes.


Note:

1. A binary tree is a tree in which each node has at most two children. 
2. The given tree will be non-empty.
3. The given tree can have multiple nodes with the same value.
4. If there are no nodes in the tree which are at distance = K from the given node, return an empty list.
5. You can return the list of values of valid nodes in any order. For example if the valid nodes have values 1,2,3, then you can return {1,2,3} or {3,1,2} etc.
Example :

Sample Output 2 explanation

Consider this tree above. The target node is 5 and K = 3. The nodes at distance 1 from node 5 are {2}, nodes at distance 2 from node 5 are {1, 4} and nodes at distance 3 from node 5 are {6, 3}.
Problem approach

You are given an arbitrary binary tree, a node of the tree, and an integer 'K'. You need to find all such nodes which have a distance K from the given node and return the list of these nodes.
Distance between two nodes in a binary tree is defined as the number of connections/edges in the path between the two nodes.

Try solving now

Here's your problem of the day

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

Skill covered: Programming

How do you remove whitespace from the start of a string?

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
4 rounds | 8 problems
Interviewed by Morgan Stanley
1864 views
0 comments
0 upvotes
company logo
SDE - 1
1 rounds | 3 problems
Interviewed by Morgan Stanley
867 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by Morgan Stanley
903 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
115097 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
58238 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
35147 views
7 comments
0 upvotes