Upload Button Icon Add office photos

Morgan Stanley

Compare button icon Compare button icon Compare

Filter interviews by

Morgan Stanley Software Developer Interview Questions and Answers

Updated 21 Jan 2025

34 Interview questions

A Software Developer was asked 5mo ago
Q. What is abstraction?
Ans. 

Abstraction is a fundamental concept in software development that simplifies complex systems by hiding unnecessary details.

  • Abstraction allows developers to focus on high-level functionalities without worrying about low-level implementation.

  • In object-oriented programming, classes and interfaces are used to achieve abstraction. For example, a 'Car' class may abstract details like engine mechanics.

  • Abstraction can be ...

A Software Developer was asked 8mo ago
Q. Given an integer array nums and an integer k, return the kth largest element in the array.
Ans. 

Find the Kth maximum element in an array of strings.

  • Sort the array in descending order.

  • Return the element at index K-1.

Software Developer Interview Questions Asked at Other Companies

asked in Amazon
Q1. Maximum Subarray Sum Problem Statement Given an array of integers ... read more
asked in Rakuten
Q2. Merge Two Sorted Arrays Problem Statement Given two sorted intege ... read more
asked in Amazon
Q3. Minimum Number of Platforms Needed Problem Statement You are give ... read more
asked in Cognizant
Q4. Nth Fibonacci Number Problem Statement Calculate the Nth term in ... read more
asked in PhonePe
Q5. Form a Triangle Problem Statement You are given an array of integ ... read more
A Software Developer was asked 9mo ago
Q. Explain the concept of a HashMap.
Ans. 

HashMap is a data structure in Java that stores key-value pairs.

  • HashMap is part of the Java Collections framework.

  • It allows for fast retrieval of values based on keys.

  • Keys in a HashMap must be unique, but values can be duplicated.

  • Example: HashMap<String, Integer> map = new HashMap<>();

A Software Developer was asked
Q. Why do you want to work at Morgan Stanley?
Ans. 

I want to work at Morgan Stanley because of its reputation for excellence in finance, global presence, and opportunities for growth.

  • Morgan Stanley is a renowned financial institution known for its excellence in finance

  • I am attracted to the global presence of Morgan Stanley and the opportunity to work on international projects

  • I believe working at Morgan Stanley will provide me with opportunities for professional gr...

A Software Developer was asked
Q. Write a function to convert a string from camel case to snake case.
Ans. 

Converts a string from Camel case to Snake case.

  • Loop through the string and check for uppercase letters

  • Insert an underscore before each uppercase letter

  • Convert the string to lowercase

A Software Developer was asked
Q. Given an array of length n, find the highest value that occurs the same number of times within the array. For example, given [3,8,3,2,1,3,2], 3 occurs 3 times, so the output is 3. Given [4,6,7,6,7,5,4,2,4,9...
Ans. 

Find the highest value that occurs the same number of times within an array.

  • Iterate through the array and count the occurrences of each value.

  • Store the counts in a dictionary or hash map.

  • Find the maximum count and check which value(s) have that count.

  • Return the highest value among those with the maximum count.

A Software Developer was asked
Q. What is a weak reference? How does garbage collection work in the case of weak references?
Ans. 

Weak reference is a reference that does not prevent the object from being garbage collected.

  • Weak references are used to refer to objects that can be garbage collected if there are no strong references to them.

  • They are typically used in scenarios where you want to hold a reference to an object, but don't want to prevent it from being collected.

  • Weak references are implemented using weak reference queues, which allow...

Are these interview questions helpful?
A Software Developer was asked
Q. Given a class @Data class Account{String name; String acctBalance;}. Write logic to get Map using Stream API which shows the balance of each person i,e, key will be the name of the account holder and value ...
Ans. 

Logic to get Map using Stream API to show balance of each person

  • Use Stream API to group accounts by name

  • Use map() to get the sum of balances for each group

  • Collect the results into a Map

A Software Developer was asked
Q. Implementation of singleton pattern and ways of breaking it? singleton pattern implementation in a multithreaded environment?
Ans. 

Singleton pattern ensures a class has only one instance, while allowing global access to it.

  • Implement a private constructor to prevent direct instantiation.

  • Create a static method to provide a single point of access to the instance.

  • Use lazy initialization to create the instance only when needed.

  • Ensure thread safety in a multithreaded environment using synchronization or double-checked locking.

  • Breaking the singleton...

A Software Developer was asked
Q. Find number of occurrences of a character in string. Provide multiple approaches for the solution and choose the best why? For "string aabcadd output=a3b1c1d2
Ans. 

Count occurrences of a character in a string and output in a specific format.

  • Use a hash table to store the count of each character.

  • Loop through the string and update the count in the hash table.

  • Create the output string using the hash table.

Morgan Stanley Software Developer Interview Experiences

17 interviews found

Interview experience
5
Excellent
Difficulty level
-
Process Duration
-
Result
-
Round 1 - Coding Test 

Question Related to the DP and the Graph

Round 2 - Technical 

(2 Questions)

  • Q1. Kth Max Element in a Array
  • Ans. 

    Find the Kth maximum element in an array of strings.

    • Sort the array in descending order.

    • Return the element at index K-1.

  • Answered by AI
  • Q2. Coin Change and optimization through DP
  • Ans. 

    Coin change problem can be solved using dynamic programming to find the minimum number of coins needed to make a certain amount of change.

    • Use dynamic programming to build up solutions for smaller subproblems

    • Start by initializing an array to store the minimum number of coins needed for each amount from 0 to the target amount

    • Iterate through each coin denomination and update the array with the minimum number of coins need...

  • Answered by AI
Round 3 - HR 

(2 Questions)

  • Q1. Project include in your Resume
  • Q2. HR common question

Skills evaluated in this interview

Software Developer Interview Questions & Answers

user image Rajshree Singh

posted on 23 Sep 2024

Interview experience
2
Poor
Difficulty level
-
Process Duration
-
Result
-
Round 1 - Technical 

(2 Questions)

  • Q1. HasMap explanation
  • Ans. 

    HashMap is a data structure in Java that stores key-value pairs.

    • HashMap is part of the Java Collections framework.

    • It allows for fast retrieval of values based on keys.

    • Keys in a HashMap must be unique, but values can be duplicated.

    • Example: HashMap<String, Integer> map = new HashMap<>();

  • Answered by AI
  • Q2. Related question on concurrency

Skills evaluated in this interview

Interview experience
4
Good
Difficulty level
-
Process Duration
-
Result
-
Round 1 - Technical 

(1 Question)

  • Q1. What's is abstraction

Interview Preparation Tips

Interview preparation tips for other job seekers - System design and behaviour questions
Interview experience
4
Good
Difficulty level
-
Process Duration
-
Result
-
Round 1 - Aptitude Test 

Maths based questions

Round 2 - Coding Test 

Implement a function to calculate the exponential of a base number to a given exponent, handling both positive and negative components.

Interview Preparation Tips

Interview preparation tips for other job seekers - customize your resume, network actively, keep your online profiles updated, prepare thoroughly for interviews, use job search platforms effectively, updated your project details in github.
Interview experience
4
Good
Difficulty level
Moderate
Process Duration
Less than 2 weeks
Result
Not Selected

I applied via Company Website and was interviewed in Nov 2023. There were 2 interview rounds.

Round 1 - Coding Test 

Time based sections were given

Round 2 - Technical 

(1 Question)

  • Q1. Resume related questions were asked, core subjects and dsa
Interview experience
4
Good
Difficulty level
Moderate
Process Duration
6-8 weeks
Result
Selected Selected

I applied via Approached by Company and was interviewed before Jan 2024. There were 5 interview rounds.

Round 1 - Coding Test 

Multiple choice questions
Two programs on DSA

Round 2 - Technical 

(1 Question)

  • Q1. HashMap, One DSA based question LRU cache Multithreading
Round 3 - Technical 

(1 Question)

  • Q1. DSA question Producer Consumer Program Queries
Round 4 - Behavioral 

(1 Question)

  • Q1. General questions on the projects and tools worked
Round 5 - HR 

(1 Question)

  • Q1. Salary negotiation notice period Explain about company
Interview experience
4
Good
Difficulty level
Moderate
Process Duration
Less than 2 weeks
Result
Selected Selected

I applied via LinkedIn and was interviewed before Jun 2023. There were 2 interview rounds.

Round 1 - Coding Test 

Dsa algorithm with java

Round 2 - Technical 

(1 Question)

  • Q1. Map inplementtion

Interview Preparation Tips

Interview preparation tips for other job seekers - Java
Round 1 - Coding Test 

Several Programmming techniques

Round 2 - Technical 

(1 Question)

  • Q1. Data strcutures, OOPS

Interview Preparation Tips

Interview preparation tips for other job seekers - Learn to say I dont know when you dont know answer to a question. Dont make things up

I applied via Referral and was interviewed in Apr 2021. There were 4 interview rounds.

Interview Questionnaire 

11 Questions

  • Q1. Basic Java concepts like abstraction, JDK 1.8 architecture brief overview.
  • Q2. What is weak reference? garbage collection in case of such references?
  • Ans. 

    Weak reference is a reference that does not prevent the object from being garbage collected.

    • Weak references are used to refer to objects that can be garbage collected if there are no strong references to them.

    • They are typically used in scenarios where you want to hold a reference to an object, but don't want to prevent it from being collected.

    • Weak references are implemented using weak reference queues, which allow you ...

  • Answered by AI
  • Q3. Implementation of singleton pattern and ways of breaking it? singleton pattern implementation in a multithreaded environment?
  • Ans. 

    Singleton pattern ensures a class has only one instance, while allowing global access to it.

    • Implement a private constructor to prevent direct instantiation.

    • Create a static method to provide a single point of access to the instance.

    • Use lazy initialization to create the instance only when needed.

    • Ensure thread safety in a multithreaded environment using synchronization or double-checked locking.

    • Breaking the singleton patt...

  • Answered by AI
  • Q4. Annotations : @Component vs @service, @Controller vs @RESTController, @Configuration, @Transactional
  • Ans. 

    Annotations used in Spring Framework for defining components and services.

    • Annotations like @Component, @Service, and @Controller are used for defining components in Spring Framework.

    • @RestController is used for defining RESTful web services.

    • @Configuration is used for defining configuration classes.

    • @Transactional is used for defining transactional methods.

    • All these annotations help in defining and managing dependencies i...

  • Answered by AI
  • Q5. Internal implementation of HashSet? Which scenario will generate same hashcode for a HashMap?
  • Ans. 

    HashSet is implemented using a HashMap internally. Same hashcode is generated when two objects have the same value for hashCode() and equals() methods.

    • HashSet internally uses a HashMap to store its elements.

    • The hashcode of an object is generated using the hashCode() method.

    • If two objects have the same value for hashCode() and equals() methods, they will generate the same hashcode.

    • For example, if two String objects have...

  • Answered by AI
  • Q6. What is SQL Cursor? Index? Aggregate Functions examples?
  • Ans. 

    SQL Cursor is a database object used to manipulate data row by row.

    • Cursor is used to fetch and process data row by row

    • Index is a database object used to speed up data retrieval

    • Aggregate functions are used to perform calculations on a set of values

    • Examples of aggregate functions are SUM, AVG, COUNT, MAX, MIN

  • Answered by AI
  • Q7. Basic Java programming question:- Generate palindrome string inputs for the program are length of the string and number of distinct characters. If n=5 & k=2 output = ababa/zzdzz/rerer. If n=7 & k=3 output=...
  • Ans. 

    Generate palindrome string with given length and distinct characters.

    • Create a char array of length n and fill it with distinct characters.

    • Loop through the array and add the characters in reverse order to create a palindrome.

    • Repeat the process until the required number of palindromes are generated.

    • If k is less than the length of the palindrome, use the first k distinct characters.

  • Answered by AI
  • Q8. Given an array with length n , find highest value which occurs same number of times within the array. [3,8,3,2,1,3,2] 3 occurs 3 times output=3. [4,6,7,6,7,5,4,2,4,9,4,1,9] 4 occurs 3 times output=4
  • Ans. 

    Find the highest value that occurs the same number of times within an array.

    • Iterate through the array and count the occurrences of each value.

    • Store the counts in a dictionary or hash map.

    • Find the maximum count and check which value(s) have that count.

    • Return the highest value among those with the maximum count.

  • Answered by AI
  • Q9. Find number of occurrences of a character in string. Provide multiple approaches for the solution and choose the best why? For "string aabcadd output=a3b1c1d2
  • Ans. 

    Count occurrences of a character in a string and output in a specific format.

    • Use a hash table to store the count of each character.

    • Loop through the string and update the count in the hash table.

    • Create the output string using the hash table.

  • Answered by AI
  • Q10. Convert String from Camel case to Snake case
  • Ans. 

    Converts a string from Camel case to Snake case.

    • Loop through the string and check for uppercase letters

    • Insert an underscore before each uppercase letter

    • Convert the string to lowercase

  • Answered by AI
  • Q11. Given a class @Data class Account{String name; String acctBalance;}. Write logic to get Map using Stream API which shows the balance of each person i,e, key will be the name of the account holder and valu...
  • Ans. 

    Logic to get Map using Stream API to show balance of each person

    • Use Stream API to group accounts by name

    • Use map() to get the sum of balances for each group

    • Collect the results into a Map

  • Answered by AI

Interview Preparation Tips

Interview preparation tips for other job seekers - Marvelous interview experience. Although it was 7 rounds of process, each interviewer was best at his/her way.
Initial 2 rounds of interview will bring blood out of your veins , later rounds will bring a little pumping.

Skills evaluated in this interview

Interview Questionnaire 

2 Questions

  • Q1. 45 minute behavioral and technical questions (high level)
  • Q2. OOP concepts, API, JSON

Interview Preparation Tips

Interview preparation tips for other job seekers - practice UML design and OOP concepts.
good to know how to test your code in general.

Top trending discussions

View All
Interview Tips & Stories
2w
toobluntforu
·
works at
Cvent
Can speak English, can’t deliver in interviews
I feel like I can't speak fluently during interviews. I do know english well and use it daily to communicate, but the moment I'm in an interview, I just get stuck. since it's not my first language, I struggle to express what I actually feel. I know the answer in my head, but I just can’t deliver it properly at that moment. Please guide me
Got a question about Morgan Stanley?
Ask anonymously on communities.

Morgan Stanley Interview FAQs

How many rounds are there in Morgan Stanley Software Developer interview?
Morgan Stanley interview process usually has 2-3 rounds. The most common rounds in the Morgan Stanley interview process are Technical, Coding Test and HR.
How to prepare for Morgan Stanley Software Developer interview?
Go through your CV in detail and study all the technologies mentioned in your CV. Prepare at least two technologies or languages in depth if you are appearing for a technical interview at Morgan Stanley. The most common topics and skills that interviewers at Morgan Stanley expect are Agile, Core Java, Data Modeling, JSON and Linux.
What are the top questions asked in Morgan Stanley Software Developer interview?

Some of the top questions asked at the Morgan Stanley Software Developer interview -

  1. Given an array with length n , find highest value which occurs same number of t...read more
  2. Basic Java programming question:- Generate palindrome string inputs for the pro...read more
  3. Given a class @Data class Account{String name; String acctBalance;}. Write logi...read more

Tell us how to improve this page.

Overall Interview Experience Rating

3.9/5

based on 7 interview experiences

Difficulty level

Moderate 100%

Duration

Less than 2 weeks 67%
6-8 weeks 33%
View more
Morgan Stanley Software Developer Salary
based on 217 salaries
₹21.2 L/yr - ₹39.6 L/yr
185% more than the average Software Developer Salary in India
View more details

Morgan Stanley Software Developer Reviews and Ratings

based on 23 reviews

3.8/5

Rating in categories

3.4

Skill development

4.0

Work-life balance

3.5

Salary

3.2

Job security

3.9

Company culture

3.4

Promotions

3.6

Work satisfaction

Explore 23 Reviews and Ratings
Associate
3.5k salaries
unlock blur

₹10 L/yr - ₹17 L/yr

Senior Manager
2.5k salaries
unlock blur

₹26.1 L/yr - ₹47.3 L/yr

Manager
1.9k salaries
unlock blur

₹17.9 L/yr - ₹32.5 L/yr

Senior Associate
1.7k salaries
unlock blur

₹12.8 L/yr - ₹22 L/yr

Vice President
1.4k salaries
unlock blur

₹38.8 L/yr - ₹71.2 L/yr

Explore more salaries
Compare Morgan Stanley with

JPMorgan Chase & Co.

3.9
Compare

Goldman Sachs

3.5
Compare

TCS

3.6
Compare

Deloitte

3.7
Compare
write
Share an Interview