Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Morgan Stanley interview experience Real time questions & tips from candidates to crack your interview

Technology Spring Analyst Program

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

Interview preparation journey

expand-icon
Journey
It was one of the best interview experiences I've had. The process was very smooth starting from giving Online Assessment to getting interview calls and then getting an offer. The recruiter and recruiting coordinator were very helpful, and they were communicating properly with me regarding everything.
Application story
I submitted my application through their career site, and near the end of September, I received a link to take their online assessment. I heard from the recruiting coordinator after around two weeks, telling me that my technical interview is scheduled for the next day. After giving the first round, I got a call 2-3 days later for the HR+Technical round, which was scheduled for two days later. Two weeks after the last round, I received the selection mail.
Why selected/rejected for the role?
I think I was selected because I was referred by someone which increased the selection chances. Also, apart from the Technical knowledge, I was very confident during my interviews, even if I was getting stuck during solving the questions. In the HR round also, the confidence and my communication skills played a big role.
Preparation
Duration: 1 month
Topics: Data structures, OOPS, System Design, Algorithms, Personal Projects
Tip
Tip

Tip 1 : Practice the DSA questions from Code Studio which are already being asked by Morgan Stanley.
Tip 2 : Thoroughly go through your projects.
Tip 3 : Study Object Oriented Programming Concepts

Application process
Where: Referral
Eligibility: Bachelors/Masters in the final year of study.
Resume Tip
Resume tip

Tip 1 : Have some good projects on your resume
Tip 2 : Do not put false things on your resume

Interview rounds

01
Round
Medium
Online Coding Interview
Duration80 minutes
Interview date1 Oct 2022
Coding problem2

It was late in the evening at 7PM and we had to complete it by 9PM.

1. Nearest Pallindrome

Moderate
30m average time
70% success
0/80
Asked in companies
eBayAppleRed Hat

You have been given a string ‘S' representing a number. Your task is to find the closest palindromic number from this integer represented by 'S'. The closest number is defined as the one for which the absolute difference between the given integer represented by 'S' and the palindrome number is minimum. If more than one number have the same difference then return the smaller integer.

Example:

Let 'S' is 121. Then the nearest integers are 111 and 131 which are palindrome. Both have the same absolute difference but 111 is smaller. Hence 111 is the answer.
Problem approach

Used the concept of Binary Search

Try solving now

2. Coding Problem

Find the minimum number of edges to be removed such that no path exists between the given pair of vertices (Learn)

02
Round
Medium
Video Call
Duration60 minutes
Interview date14 Oct 2022
Coding problem4

This round was taken by a manager. The interviewer was exceptionally helpful.

1. OOPS Question

What is Inheritance? (Learn)
What is Polymorphism? (Learn)

Problem approach

Tip 1 : Revise Object Oriented Concepts thoroughly.
Tip 2 : Try to explain the concepts by giving real-life examples.

2. Zig Zag Subsequence

Hard
25m average time
75% success
0/120
Asked in companies
OlaMorgan StanleyLTI - Larsen & Toubro Infotech

Ninja on his way to home found ‘N’ tokens on the ground arranged in a line horizontally. Each token has some number written on it.

Ninja wants to count the longest subsequence of the tokens with a “Zig-Zag” arrangement.

A subsequence is a sequence that can be derived from another sequence by deleting some or no elements without changing the order of the remaining elements.

Note :
A “Zig-Zag” arrangement is an arrangement where the differences between successive numbers on tokens strictly alternate between positive and negative integers. 

Example :

“3 8 5 9 4 7 2 6” is a “Zig-Zag” arrangement as the differences “5 -3 4 -5 3 -5 4” alternates between positive and negative. 
Note :
The first difference (if one exists) may be either positive or negative.

Your task is to help Ninja in finding the longest subsequence of “Zig-Zag” arrangement of tokens.

Problem approach

The idea is to use a modified one pass of bubble sort. This means swapping elements if they are not in position.
The steps are as follows: 
- Traverse the array, from 0th position to ‘N’-2th position.
- Maintain a bool variable ‘flag’ for representing which order currently we need, greater than or less than.
- If the current two elements, i.e., the element at ‘i’ and ‘i’+1th position, are not in that order, then swap those elements; otherwise, not.
- We will return ‘arr’ as the final answer.

Try solving now

3. Minimum insertions to make a string palindrome

Moderate
30m average time
70% success
0/80
Asked in companies
FacebookApplePaytm (One97 Communications Limited)

A palindrome string is one that reads the same backward as well as forward.


You are given a string 'str'.


Find the minimum number of characters needed to insert in 'str' to make it a palindromic string.


Example :
Input: 'str' = "abca"

Output: 1

Explanation:
If we insert the character ‘b’ after ‘c’, we get the string "abcba", which is a palindromic string. Please note that there are also other ways possible.


Try solving now

4. Best Time to Buy and Sell

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

You are given an array(PRICES) of stock prices for N consecutive days. Your task is to find the maximum profit that you can make by completing as many transactions as you like, where a transaction denotes buying one and selling one share of the stock.

Note:

You must sell the stock before you buy it again.
Problem approach

The optimal solution was to use Valley Peak Approach. In this approach, we need to find the next greater element and subtract it from the current element so that the difference keeps increasing until we reach a minimum. If the sequence is a decreasing sequence, so the maximum profit possible is 0.

Try solving now
03
Round
Medium
HR Round
Duration30 minutes
Interview date20 Oct 2022
Coding problem2

This round was conducted in the evening by a Senior Hiring Manager. The interviewer was very friendly. The questions asked in this round were situation based and were testing if I was aware of the company culture and values.

1. Puzzle

There are 20 lions who are hungry and there's a piece of meat. Every time a lion eats that piece of meat, it goes to sleep and is eaten by another lion. In this way, only a single lion will be left. I had to tell what can be done so that maximum lions can live.

Problem approach

Tip 1 : Cut the meat into 20 pieces.
Tip 2 : Tell every possible answer you can think of.

2. Basic HR Question

You are an outstanding performer. You have done a mistake and your promotion is due. Your manager asked you not to tell the seniors about the mistake until the promotion. After you'll get promoted, you can tell then. What will you do?

Problem approach

Tip 1 : Yes, tell the seniors about the mistake at the earliest.
Tip 2 : Morgan Stanley's value includes honesty so everyone in the organization should know what is going on.
 

Here's your problem of the day

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

Skill covered: Programming

Suppose list1 is [2, 133, 12, 12], what is max(list1) in Python?

Choose another skill to practice
Start a Discussion
Similar interview experiences
company logo
SDE - 1
2 rounds | 4 problems
Interviewed by Morgan Stanley
0 views
0 comments
0 upvotes
company logo
Software Engineer
2 rounds | 6 problems
Interviewed by Morgan Stanley
632 views
0 comments
0 upvotes
company logo
Technology Analyst
2 rounds | 6 problems
Interviewed by Morgan Stanley
653 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 6 problems
Interviewed by Morgan Stanley
507 views
0 comments
0 upvotes