Message on Whatsapp 8879355057 for DSA(OA + Interview) + Fullstack Dev Training + 1-1 Personalized Mentoring to get 10+LPA Job
0 like 0 dislike
in Interview-Experiences by Expert (30,360 points) | 563 views

1 Answer

0 like 0 dislike

Microsoft Interview Experience | SDE-1  | On Campus | SELECTED

Round 1 :- Online Coding Test

   Three  coding problems were asked based on DSA .

 1 . Distinct Strings With Odd and Even Swapping Allowed.

 2. Check If One String Is A Rotation Of Another String.

 3. Buses -  You are given a vector of 'N' integers denoting the number of buses that can be boarded from the i-th position. The bus stops only at stops whose number is a multiple of the bus stop number from which the bus originates. You need to find the number of buses originating from each bus stop from 1 to 'N'.


Round 2 :- Technical Round 1  ( 45 minutes)

  Two  problems were asked .

 1. Longest Mountain Subarray

   You are given an array of 'N' integers denoting the heights of the mountains. You need to find the length of the longest subarray which has the shape of a mountain.

2. Other problems were based on OS subjects .

   What is a process?

   What is a program?

   Difference between a program and a process.

   What is a thread?

   What are the different states in a process life cycle?


Round 3 :- Technical Round 2 ( 60 minutes)

1. Kth largest element in the unsorted array.

2. OS Questions

 What are semaphores?

 What are the different types of semaphores?

 What is a mutex?

 What is a deadlock and how to handle it?


3. OOPS Questions

 What is an abstract method?

 What is polymorphism?

 What is encapsulation?

4. The interview discussed the tech skills and projects mentioned in my resume. Since I had recently started one NLP based project, the interviewer asked me about a challenge that I might face in that domain and how I am planning to overcome it. I thought for a while and gave a simple answer which I could think of at that time.

 Explain the internal working of HashMaps in Java.What is the importance of hashcode function?

How does Java work internally (JVM and its use)

How is Java different from Python?


Round 4 :- Technical Round 3 (60 Minutes)

 Three problems were asked .

1. BST to sorted DLL

 You are provided with a Binary Search Tree (BST), all you have to do is to convert it into the sorted doubly linked list (DLL).


2. Data Structure Supporting Insert Delete And GetRandom

Design and implement a data structure which supports the following operations:

insert(X): Inserts an element X in the data structure and returns true if the element was not present, and false otherwise.

remove(X): Removes the element X from the data structure, if present. Returns true if the element was present and false otherwise.

search(X): Search the element X in the data structure. Returns true if the element was present and false otherwise.

getRandom(): Return a random element present in the data structure.


3. Asked General Questions .

by Expert (30,360 points)