Morgan Stanley Interview Experience | Set 35 (For Internship)
- Given two arrays A, B and a required array wanted. You are given 8 functions each with a fixed length (example functions 1. Returns element in A (length 1) 2. Returns min of elements in A and element in B (length 7) … ) we need to find out the length of the shortest function that can be applied on A, B to get wanted array if no such function is possible then return -1. This is a very easy question but the language of the question was not clear.
- We are given a code sample and asked to optimize the code.
Given a string s of length n
Count = 0
for i =0 to n
for j = 0 to n
if( s[i] != s[j])
Count += abs(i-j)
20 Students out of 170 were shortlisted for the Interview round.
Interview Round -1:
- Two processes are running on different computers how will you make them talk to each other.
- What is an API, REST, write a small REST API
- What is a thread
- Where are threads useful
- What is virtual memory
- Explain Paging
- some questions related to Process scheduling
- What happens when your ram is fully occupied.
- Write a small c++ multi-thread program
- What parts of memory do different threads share
- Problem with shared memory
- Locking mechanisms
- Problems with locks
- What is a deadlock
- How will you solve a deadlock
- How will you detect a cycle in a graph
- How will you detect a cycle in a graph using BFS
- You are given a very big file you need to give the top 10 most appeared words in that file.
- DBMS SQL queries. Top N query
Interview Round -2:
- What did you learn in previous internships?
- You are having many files on a file server how will you make sure that you download only files that are modified.
- Why Morgan Stanley.
- How will make sure you convert your Internship into a PPO.