Tip 1 : For Morgan Stanley specifically, OS fundamentals are absolutely important, as they ask very deep OS based questions in interviews.
Tip 2 : For other core subjects, OOPS implementation is very crucial as they check DSA along with OOPS in all rounds.
Tip 3 : For the OA, hard level questions of backtracking, trees (BSTs) and questions on two-pointer and sliding window algorithm are repeatedly asked.
Tip 4 : Morgan Stanley has a very high CGPA cutoff for on campus placement (for example: 9.1+), so if you are aiming to crack Morgan Stanley you must pay attention to your CGPA as well.
Tip 1 : If possible, try to have at least one core subject project on your resume
Tip 2 : Try to add coursework such as Operating Systems, Parallel and Distributed Computation,
Tip 3 : If you have done any research work in any core subject it helps with resume shortlisting alot
The test was conducted on July 20th at 1pm, the duration was 90 minutes. We had to solve 3 questions, they were or medium hard level. The problems required printing the complete solutions and not just the count so DP based solutions could not work instead good level of implementation skills in backtracking and binary tree traversals helped were required.
'S' = "{}()".
There is always an opening brace before a closing brace i.e. '{' before '}', '(' before ').
So the 'S' is Balanced.
Output the sum modulo 10 ^ 9 + 7.
If ‘X’ = 1, ‘Y’ = 1 and ‘Z’ = 0 then the output will be 84.
Explanation : 3 + 4 + 34 + 43 = 84
Given ‘N’ = 2, The total number of BST’s is 2.
1. A binary search tree is a rooted binary tree whose internal nodes each store a key greater than all the keys in the node's left subtree and less than those in its right subtree.
2. A structurally unique binary search tree is a tree that has at least 1 node at a different position or with a different value compared to another binary search tree.
I passed this round. This was the first interview round, scheduled at 9 in the morning. It was a technical, elimination-based round. The topics covered in this round included DSA questions, Zigzag traversal of tree (Using deque was preferred by the interviewer) and a problem based on the Matrix Chain Multiplication problem. Other than this the Interviewer also asked me about OOPs concepts and requirement to solve the DSA questions using OOPs paradigms.
Input: Consider the following Binary Tree:
Output:
Following is the level-order traversal of the given Binary Tree: [1, 2, 3, 5, 6, 4]
1. We can use a deque to solve the problem.
2. Push and pop in different ways depending on if the level is odd or level is even.
3. Maintain a flag for the odd/even level
For arr[ ] = { 10, 20, 30, 40}, matrix A1 = [10 * 20], A2 = [20 * 30], A3 = [30 * 40]
Scalar multiplication of matrix with dimension 10 * 20 is equal to 200.
We can solve the problem using DP as:
1. Iterate from l = 2 to N-1 which denotes the length of the range:
1.1 Iterate from i = 0 to N-1:
1.2 Find the right end of the range (j) having l matrices.
1.2.1 Iterate from k = i+1 to j which denotes the point of partition.
1.2.2 Multiply the matrices in range (i, k) and (k, j).
1.2.3 This will create two matrices with dimensions arr[i-1]*arr[k] and arr[k]*arr[j].
1.2.4 The number of multiplications to be performed to multiply these two matrices (say X) are arr[i-1]*arr[k]*arr[j].
1.2.5 The total number of multiplications is dp[i][k]+ dp[k+1][j] + X.
The value stored at dp[1][N-1] is the required answer.
This was a core subject based round where the interviewer asked about various open-ended questions on Operating Systems. I was also asked about the previous internship experience and was asked to design a REST based API and how I would address the resources.
Describe about locking mechanisms. How do Semaphores and mutex locks differ. How would you find the maximum number in the product of 2 matrices, would it require semaphores, how would you parallelize the solution.
Tip 1 : Try to explain the reasoning behind the solution and the problems you are facing in optimization of open-ended questions.
Tip 2 : Practice standard OS questions apart from theory, such as designing LRU cache etc.
Tip 3 : For parallel computing, try to break down the problem into individual, independent tasks and present the solution along with a dependency graph.
Design a REST API to store the details of the user along with preferred mobile number and other mobile numbers.
Tip 1 : Try to look at the problem with a theoretical aspect, such as treating endpoints as OOPs entities
Tip 2 : Be thorough with your resume and practice Ad-hoc problems based on the technologies you have written in your resume
Tip 3 : Take time to present any solution with justification and try to adhere to conventions as much as possible and include real life examples.
This round was a technical + HR + Managerial round. This included questions such as my motivation to join Morgan Stanley and questions based on my resume and projects.
I was asked about my projects and the technologies I used, as well as how I would extend them. I was also asked to draw parallels with other real-world examples for the OOPs based inheritence.
Tip 1 : Try to be thorough with your project and understand the underlying Technolgies as well.
Tip 2 : Make sure if your projects are relating to core subjects that you understand the fundamentals of that core subject really well.
Tip 3 : Try to include real world analogies when presenting a solution, especially OOPs based solution.
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
Suppose list1 is [2, 133, 12, 12], what is max(list1) in Python?