The online coding test consisted of 3 rounds.
The first one was 10-15 minutes and consisted of code snippet switch had some error because of which it wasn't giving the desired output. We had to correct the code.
The second one consisted of aptitude questions in which time management was key. Skip the questions which seem to take a lot of time because the questions at the end are usually easier (I didn't get to attempt the last 1-2).
The last round was of 60 minutes and consisted of 3 coding questions. The first one was a variation of knapsack problem. In the second one the main task was to find the area of intersection of 2 circles (all the consisting should be checked), which was difficult in the time frame as the formula for that is not easy. The last one was fairly simple and required sorting and binary search.
I could only submit one out of the three coding questions, but because my first 2 parts went good and I got one question right I was shortlisted.
The interviewer asked me questions on object oriented programming for which one need to be clear with his basics. He asked simple but tricky questions involving references in java.
Questions on strings.
I told him I didn't know object oriented programming in much detail and so he sited to arrays and linked lists. He asked me the advantages of one over the other. How would I implement the back functionality provided in browsers. I told him that I would use doubly linked list as then I could also provide the forward functionality in addition. He said that it worked but I could have used stack as well. I mentioned that a single stack would work too but only for back and not forward.
He asked me to write down the code for quicksort. I explained with an example what each function did and then wrote down the code.
He told me to design a pedestrian walk like situation in which the pedestrian would press a button which would cause the traffic signal to go red so that the pedestrian could safely cross. I told him all the classes that would be relevant to the situation and all the attributes and methods needed.
He seemed satisfied with my approach.
Both my interviews went fairly long. The interviewer asked me to introduce myself. Why did I choose Morgan Stanley and not any other company? What was the biggest challenge in my life? My biggest failure? If I ever had any big disagreements with my parents or teachers? He asked me about my hobbies. He asked me a simple question on how I could get the functionality of a queue using a stack( queue using 2 stack problem basically).
The interviewer was happy with most of my answers and asked if I had any questions for him.
Pay attention during the ppt of the company. Ask questions and make a good impression in front of them. Be confident during the interviews and don't forget to smile. If you don't understand a question ask the interviewer to repeat it. Try to get as much info from him as you can. Before writing down the code, explain your approach to him using an example, don't let there be a long period of silence.
And don't lie in your resume as it can easily backfire, it's okay if your resume isn't as long as your friends, if the interviewer asks you a question and you claimed in your resume that you know it, if you answer incorrectly, you are already at a disadvantage.
All the best and good luck! :)