Hi All,
I appeared for the Java Developer(2-8 YOE) role in Morgan Stanley. It was a total of 4 rounds with first 2 as technical round, 3rd one being Managerial & Behavioural round & 4th HR Round. My experience is as follows:
-
Online assessment round: [EASY]
- 2 coding problems: One Trie based and another DP based
- MCQs on OOPS, OS, SQL, Databases, Core Java, SpringBoot
-
Technical Round 1: [EASY]
- Firstly interviewer asked for my introduction
- Asked about the projects which I worked on in current company - Good brief discussion
- Find the first non-repeting character in a string - https://leetcode.com/problems/first-unique-character-in-a-string/description/ Here the interviewer was expecting the data structure from me which I can use so that the order is preserved for the characters of the string
- Given an array of integer, find the pair that sums to target. https://leetcode.com/problems/two-sum/description/. Futher extended the question to find all list of all pairs that sums to target.
- Given an array of pair of cities like [["BLR", "MUM"], ["MUM", "DEL"], ["DEL", "CHE"]], needed to find out the path covering all the cities once. Also tell the time complexity.
- Given an array of integer, find the second largest element - The interviewer was expecting use of stream and lamdba function
- List down all the conditions for garbage collection
- Lastly interviewer asked if I have any questions
-
Technical Round 2: [MEDIUM]
- Asked a question on OOPS where we have two classes, lets say class A & class B such that class B extends class A.
public class A {
static void m1(){
System.out.println("A m1");
}
void m2(){
m3();
}
}
class B extends A {
static void m1(){
System.out.println("B M1");
}
void m2(){
System.out.println("B M2");
}
}
Now if we create an object like this and call method m1()
A obj = new B();
obj.m1();
which class method will be called? Also if we remove method m2() from class A and call obj.m2() whether m2() from class B will be called?
- Questions related to syncronization
- Questions on concurrency & HashMap concurrency
- Given a method where we have try catch bloack with finally like this
method(){
try{
E1;
} catch (E1){
E2;
} finally {
E3;
}
}
Here E1, E2, E3 are custom errors, if we call the above method which error will be thrown and why?
- Question on multithreading
- Question on Database Indexing - Tell me what is clustering indexing & non-clustering indexing
- Given an integer array containing both postive & negative numbers. Do operations on the array such that all positive numbers should come first then the negative numbers. Two constraints are there one is the order of the elements should not chnage and second is no use of any extra space, although time complexity was not an issue. I was expected to write the code.
- How does HashSet maintains uniquness means no duplication of elements?
- Asked me about my projects which I worked in my current company.
- Asked me if I have any questions for him.
-
Managerial + Behavioual Round [MEDIUM]
- Brief introduction about my me & my projects.
- We mostly discussed about what I have done in my current company, which tech stacks used and what his team is done in terms of business & technolgy being used. It was indeed a good discussion [Will suggest you all to be confident and ask more and more questions about the project which you will work if gets selected]
- Asked me why I want to change and why I have not applied for internal transfer within the current company
- What are my strengeths and weekness? [Will suggest you to be honest. You will be happy to know sometimes manager also sync with your thought]
- What are some of the new things that I have learned recently?
- What do I expect in terms of skill development if I join the team?
-
HR Round
- Mostly discussed about salary
BE CONFIDENT. All the best!