Message on Whatsapp 8879355057 for DSA(OA + Interview) + Fullstack Dev Training + 1-1 Personalized Mentoring to get 10+LPA Job
0 like 0 dislike

1 Answer

0 like 0 dislike
Morgan Stanley was one of the first organizations that arrived in our college for on-campus placement. Around 388 students from my university were shortlisted to attempt the online assessment. The CGPA cutoff for shortlisting was 9 CGPA. Applicants had a choice between Enterprise Engineer Track and App Development Track. I went ahead with the Enterprise Engineer Track.

Online Assessment: The assessment lasted 2 hours and it was divided into 3 sections. It was held on the Aspiring Minds (SHL) platform and although it was allowed to trackback to skipped questions within a section, one wasn’t allowed to switch between sections.

Debugging Round (20 minutes): This round consisted of 7 easy questions that had to be completed in 20 mins. One could choose their preferred programming language before beginning this section. The aim was simply to amend the given code(reverse sign, rectify logic, and/or correct syntax) to meet the requirements of the question and clear all the test cases.
Reasoning Ability Section (20 minutes): This section had 10 questions that tested one’s aptitude and reasoning ability (Quants). The questions were mostly of medium difficulty and did not require a lot of calculations.
Coding Round (80 minutes): One had to solve 3 coding questions (easy, easy, medium) in the preferred language.
a. Toys: A group of children(N) has the same (type-0) toy. You have been provided with Q queries. Each query has 3 integers L, R, and M. For each query you have to replace the toy of children between the range of L and R (inclusive) with M. At the end of each query print the toy that is most common amongst the children alongside the number of children that have the toy. ( Format = <integer representing most common toys>-<number of children with that toy>)

Input :  N = 4 Q = 3 toy types = 3
Query Array: [[1,1,1],[2,4,2],[1,4,3]]  

Output : 0-3 2-3 3-4

Explanation: We have 4 children and 3 queries. At the beginning every
             kid has the same toy 0.
             1) After the first query is triggered, child 1's toy is
                replaced with 1, yet 0 is the most common
                toy as rest of the 3 children have it.
             2) After the second query is triggered, 2,3, and 4's toy is
                replaced with 2. Now, 2 is the most
                common toy as 3 children have it.
             2) After the third query is triggered, everyone has their
                toy replaced with 3. Now, 3 is the most
                common toy.
Approach: I would classify the question as easy as hashing was a viable and intuitive solution to it. One just needed to store the child-toy pairs in an array with children as indices and then story the toy-children pairs in a hashmap. Then, it just required a variable to track the most common toy. For each query, we just needed to update the values (for all children between L and R), and compare them with the variable.


b. Maximum Continuous pickups: A factory has several boxes aligned in a row. You have a machine to pick up a subset of boxes. You are provided with N queries, where each query contains a range of boxes that need pickup. You need to determine the maximum number of continuous pickups the machine will have to make in the pickup process.

Input :  Q = 3
 Query Array: [[1,5],[6,9],[11,17]]  

Output : 9

Explanation: The interval 1-5 and 6-9 can be merged as 1-9.
             Hence maximum continuous pickups = 9
Approach: In my opinion, this too could be classified as an easy question. The approach suggested in the linked article could be used to merge intervals. The only catch for this question was that we had to increment the ending value for each range by 1 because even when a different range starts from the next number it is still considered as continuous pickup.

c. Advertisement for OTT platform: You are the head of an OTT platform. You have two shows that are set to be released on the same date. You realized that the advertisement department has accidentally booked up more slots for the first show than they have for the second show. Recognizing that this mess-up could favor the first show, you justly ask them to modify the slots so that both the shows have identical advertisement slots. Unfortunately, this process would cause loss of advertisement slots that have already been bought, hence you need to minimize the losses in the process by selecting as many identical slots as possible. An example of the advertisement schedule AD1 is abcdedgh, the cost of each slot C1 is 10. Given that you cannot change the order of advertisements, print the minimum possible loss.

Input :  AD1 = abcdedgh C1 = 10 AD2 = abcdgbksmn C2 = 20

Output : 130

Explanation: The final advertisement schedule is abcdg. So (8-5)3
             slots were lost in AD1 and (10-5)5 slots were lost in AD2.
             Final loss = 3*10 + 5*20 = 130
Approach: While the wording of the question was tricky, the approach was similar to a dynamic programming problem known as Longest Common Subsequence

I was able to answer all the questions before the end time(approx 20 mins earlier). Out of all the candidates, only 22 and 26 candidates were selected EE track and App dev track respectively.   Most applicants stumbled on the dynamic programming question because they couldn’t decode it.  Thereby, The importance of temperament cannot be overstated for such exams.

Virtual Interviews

Round 1 ( Technical Interview )

1) Introduction

2) Hashing
   – implementation of any hashing technique ( I discussed quadratic and forward hashing)
   – Given a set of numbers, figure out if it contains duplicates. ( Least Time Complexity)

3) Java
     – Garbage collector in detail
     – Collections class and interface

4) Linklist
      – find loop
      – remove loop

5) In-depth discussion of projects and contribution

6) Sorting
       – different in-place sorting techniques
       – time complexity analysis of different sorting techniques
       – quicksort implementation

7) Operating Systems
        – Process vs Thread
        – Virtual Memory
        – RAID
        – Thrashing
        – Preemptive/not preemptive scheduling, Starvation
        – page replacement and page faults

Verdict: Rejected

Even though I was able to answer all questions barring one. I wasn’t selected. There was one more round for EE Track (HR) and 10 applicants ( EE+ app dev) were selected in total. My only suggestion would be to learn from all your rejection and get over them as quickly as possible. Just 2 days after this process, I was shortlisted by Amazon.

My Key Takeaways from this Rejection

It is paramount that one learns from rejections and gets over them as quickly as possible. The time spent being fixated over the rejection is better spent preparing for the next opportunity.
The placement process comes hard and fast at you. Every company has different criteria. I remember a company rejected me even though I completed the coding round in merely 20 minutes. Don’t look for fairness in the process.
Be calm and composed during the interview. Communicate all your thoughts. Try not to have long pauses. If you forget something, mention it to the interviewer and keep on communicating while you try to remember it.
When picking a project to discuss, don’t pick the fancy one. Pick the one you know inside out.
Tips for Interview Preparation

Consistency is key. Brush up on your DSA daily and keep on practicing coding questions. Work on building programming logic and developing a systematic technique to approach questions.  (utilize InterviewBit, LeetCode, GFG, and Hackerrank)
Work on your ability to write clean and comprehensible code on the first go ( without making logical or syntactical errors). Debugging is time-consuming, it will help you during interviews and tests.
Try to incorporate touch typing. My typing speed used to be around 30 WPM, It almost took me 8 months to turn it to 95 WPM, but I am certain that it helped me during the interviews. ( 10fastfingers, Keybr, and Typingclub are some useful resources)
Before the interview, read up on the company. Their principles, work culture, etc.
During the interview, always discuss the brute force logic before moving on to the more complex solution and ask as many clarification questions as you want. Even if you have attempted that question before, try to portray that you are attempting it for the first time.
Be calm, composed, and confident during the interview. It is not necessary to answer all the answers to the T. Even if nothing is striking you, keep speaking your thought process and plausible solutions. You might be close and even if you aren’t, at least, the interviewer would be able to interpret the way you approach problems.
by Expert (30,360 points)