Microsoft | SDE 2 (62) | Bangalore | July 2022 [Offer]

Anonymous User
3119
Jul 30, 2022
Aug 01, 2022

Status: Total 7 years of experience
Position: MTS 4 at a product based company
Location: Bengaluru, India
Date: July 2022

Overall Process:

  • The process started in May. A recruiter reached out to me on LinkedIn and started the process.
  • I got an online assessment which had to be completed within a week.
  • After I cleared the OA, I had 3 technical rounds on same day.
  • Then there was a hiring freeze in MS and I didn't hear anything until July.
  • In July, I got a call for the last round which is AA (As Appropriate). That round happened on a Friday night because the interviewer was from Seattle, WA.
  • On Monday, I got an email to submit some documents like current compensation and payslips.
  • Approx. 8 days after that I got the offer letter in Action Center.

Rounds

Online Assessment
The test was for 70 mins for me. I had to complete 2 questions.

Q1: There are houses situated in a row and there are garbage trucks which visit these houses. Each truck can take only 1 type of garbge. There are total 3 trucks (one each for Wet, Dry and Recycle waste). Each truck takes 1 unit of time to travel between houses as well as from start position to 1st house. Each house puts out different number of garbage bags. The time to load 1 garbage bag in the truck is also 1 unit. Each truck will only visit a house if there is a garbage bag of that type put out by the house.
Find the minimum amount of time taken by the trucks to collect all the garbage bags and come back to initial position.

Ex:

// The garbage bags are denoted by D (Dry), W (Wet) and R (Recycle)

// Input
bags: ["D2W1", "R2", "", "W1"]

/*
In this case there are total 4 houses. 
1st house has: 2 Dry waste bags and 1 Wet waste bag
2nd house has: 2 Recycle waste bag
3rd house has: 0 bags
4th house has: 1 Wet waste bag

Note: Since the trucks have to come back to start position, the time travelled by the trucks will become double.
*/

Q2: You are given an array courseDependencies. The value at each index of the array denotes that in order to take course i, you have to first take the course courseDependencies[i]. If i is equal to courseDependencies[i] then course i can be taken without any pre-requisite.
Given a list of courses which should be taken, return the total number of courses you end up taking.

Ex:

courseDependencies: [0, 0, 0, 3, 4], courses: [1, 4]

Answer: 3 
Explanation: Before taking course 1, we have to take course 0 because courseDependencies[1] = 0. 
Course 4 can be taken directly because it doesn't have any dependencies.
So total number of courses we end up taking are 0, 1, 4.

Interviews

Round 1
Q1: Longest substring without repeating characters

Q2: For a linked list given as below with a next and child pointer. Write a function to print the elements in level order fashion.

10 -> 5 -> 12 -> 7 -> 11
 |               |
4 -> 20 -> 13   17 -> 6
         |  |   |
		2  16   9
		
Output: 10, 5, 12, 7, 11, 4, 20, 13, 17, 6, 2, 16, 9

Round 2
Q1: LLD (Low Level Design) of an online Ludo game

Round 3
Q1: Implement an LRU Cache

Q2: Given a file system with a root directory with recursive directories and files inside it, design an iterator with MoveNext and HasNext functions. The iterator should return the files from the top level folders first before moving on to the next level.

Round 4
Q1: Tell me about a time you solved something big for a customer.

Q2: Given a string s, return the first repeating substring.

//Example 1:
s = "ABCBDAB"
Output: B

//Example 2:
s = "ABCBCA"
Output: BC

Compensation Details: Offer Details

Comments (4)