After the phone screen with the manager, I was invited for virtual interviews. Here are the questions!
Interview 1:
Couple of questions on background, projects. Coding : Find all the prime numbers from 2 to n -- Approach 1 ( Use two for loops) - O(N2) -- Approach 2 (Sieve) - Gave my best answer for time complexity
Interview 2: Question on how did you handle a team conflict. Coding: I want you to build a wordament game which is a n*n grid, and we have to form the words and each correct word would give you an integer prize. -- Approach 1 ( Use DFS) and search from each cell in the grid -- Follow up (What if the game ends in 2 mins) How can we get the max. Prize?
Interviewer 3: Background? Interests? why microsoft? Coding problem: Given two strings: A and B, find out if they are equal. In the string, there could be a backspace character '#' which means we need not count the character previous to '#', meaning if A = "aab#c#" and B = "aa", then they are equal Approach 1 (Use stack) Approach 2 (Iterate through string) - saves O(N) space
Interviewer 4:
How were the interviews? Background? project discussion etc. Talked about his database background Coding : Merge two sorted arrays, discussion on merge k sorted arrays, and then write merge sort in an iterative way.
Overall, I liked the interviews and asked questions. I like how people are enthusiastic about databases, problem solving and professional communication.