Morgan Stanley Interview Experience

OpenGig
6 min readJan 13, 2023

--

College: DTU
Check out Athenasquare Jobs:
https://athenasquare.org/jobs

Online Assessment:

It consisted of both coding and aptitude. There were 15 aptitude questions worth 50 marks and no negative marking. The questions covered topics such as quant, verbal and technical. The verbal section included questions on sentence completion and critical reasoning similar to those on the GRE. The technical section included questions on operating systems, database management systems, and data structures. I solved 7–8 questions and felt confident they were all correct.

There were also 2 coding questions, both worth 50 marks. The first question, “Lily’s problem,” involved dynamic programming to determine the minimum number of problems Lily needed to solve to achieve a certain happiness value.

The second question involved infix to postfix conversion to evaluate expressions in string format. I solved the second question but did not pass all test cases due to a compilation error in one code section. The final score for the aptitude and coding was based on the number of test cases passed.

I managed to progress into the next round.

Link to questions:
https://www.hackerrank.com/challenges/lilys-homework/problem
https://www.geeksforgeeks.org/convert-infix-expression-to-postfix-expression/

The First round of Interviews:

The company prefers the use of Java and/or C#. Despite expressing that I was most comfortable with C++, the interviewers focused on Java during both technical rounds.

I was asked questions about their preference for C++, the differences between C++ and C# and which one was better.

There were questions about the difference between C++ and Java, with a focus on performance, bytecode, and the JVM.

I was asked about inheritance in Java, its different types, and polymorphism. I was also given a Java program and asked to explain the output.

I was also asked algorithmic and database questions and questions about OS, such as the difference between processes and threads, thread scheduling, and libraries for creating XMLs and XSDs. I was asked about JSON and alternative data formats, such as maps and the time complexity of different implementations. I was also asked about the different techniques for resolving collisions in hashing.

Question 1: Given an array containing the prices of a particular stock at 10 mins intervals. You have to buy and sell according to these prices. Write an algorithm/program to maximize the profits. In this, they just try to check your approach.

Question 2: Given a binary tree. Make a mirror tree from it. This was easy. I was done with the algorithm and code within 10–15 mins. I used recursion. Asked me for a solution without recursion. Did that too.

Link to problems:
https://leetcode.com/problems/best-time-to-buy-and-sell-stock/
https://www.geeksforgeeks.org/write-an-efficient-c-function-to-convert-a-tree-into-its-mirror-tree/

Second Round of Interviews:

The design problem began with designing a hotel booking system. I was asked to create a class diagram, and then the actual implementation. I had to take every little detail into consideration, such as the placement of attributes within the classes, the functions which should belong to the classes, the relationship between them, the attributes of the relationship, whether a particular information must be modelled as an attribute, a composition relationship, or an inheritance relationship, handling historic data without a database, etc.

With each new concept, I was asked questions about it, such as the difference between composition and association, the four pillars of OOPs, the difference between abstraction and encapsulation, why we need abstraction, and the different access modifiers and their significance.

I then began with the implementation of the above. The interviewer wanted me to write code for every class and its functions. She wanted the code to be such that the system should be scalable and handle concurrent booking requests. I was not allowed to store the information in a database, so she asked me about the different data structures I would use to store all the info in main memory(or virtual) and to which class they should belong.

The structure chosen should be such that searching for a free hotel room of a given type from a particular start date and to a particular end date must be efficient. I got stuck here and tried everything from a tree to a trie. In the end, she told me a matrix would do the job and asked me for a space-optimized solution (Hashmaps).

She asked me to write an efficient hash function to search based on the above-mentioned parameters.

Concurrency control for the above was the next topic, I said monitors. The questions again followed: What are monitors? Other concurrency mechanisms? Difference between monitors and semaphores. And went into the implementation details of the two.

Next, she gave me a program and asked for the output. It was on virtual functions of C#, I didn’t know anything about the C# new operator. I applied C++ virtual functions concept and logic to give the answers, and they were correct.

Then, I was asked Why a child class reference can’t point to the parent’s object in Java/C++?

Further, I solved the nQueens problem with full code (Backtracking)

A few questions were also asked about my work at a previous internship, any problems encountered, alternate solutions to the utility I built, and Why I didn’t take the PPO.

Lastly, I was asked about the machine learning project.

Link to problems:
https://leetcode.com/problems/n-queens/

HR Round:

The round was an HR, managerial and technical round combined.

One of the questions I was asked was why I am not involved much in competitive coding. They asked about all my projects and whether I had any projects done in my interest. They also asked which is the most creative project I have done and the takeaways from my second-year Java mini-project.

I was asked in detail about my IoT projects, such as any scenarios in which it would fail, possible solutions and its uses. They also asked about my machine learning project, specifically how I got the data and the significance of the project.

The interviewer asked what all input is needed for the google maps application, what new feature can I add to it that will involve machine learning and which ML algorithm I would apply.

They gave me several scenarios to think about, like what I would do if a member is adamant about their solution in a team project, but I am sure about my solution. Another scenario was what I would do if I found out that the code I released on the prod had bugs in it.

They also asked me what I would do if I was given a project in which I was not interested.

I was also asked why I wanted to work for Morgan Stanley and about my hobbies and interests. They also asked about my general background.

The interviewer was impressed by my answers, and I felt confident I would be selected.

Here are some tips for you folks:

  • Practice solving coding challenges on websites like Leetcode or HackerRank
  • Review the basics of tree algorithms, as these are common topics in coding interviews
  • Brush up on your knowledge of Object Oriented Programming, as these topics may be covered in theory questions
  • Be prepared to write code on a whiteboard or online coding platform
  • Take your time and think through your solutions carefully
  • Be able to explain and defend your problem and be open to feedback and suggestions from the interviewer
  • Take your time and think through your answers carefully.

Good luck with your interview preparations, and I hope these tips help you succeed!

Follow Athenasquare for more such interview experiences & make sure to check out our website: https://athenasquare.org/

--

--

OpenGig

Democratise access to opportunities irrespective of college, background, and location