Microsoft | Software Engineer | Hyderabad | Dec 2020 [Offer]
2696

Work Experience: 2 years - Software Developer
Position: Software Engineer at Microsoft
Location: Hyderabad, India
Date: December, 2020

Process of Applying :

I applied on the career website many times. I asked many of my friends (LinkedIn connections) to refer me as well. One fine day I got an email saying that my profile was shortlisted for Software Engineer profile and we'll be scheduling interviews soon enough.
PS : I got a referral based interview call.

Interview Process:

Round 1: Data Structure & Algorithm based + System Design + Project Discussion (1 hour)

The round started with brief introduction and then discussion on the projects I worked upon and currently working. The interviewer gave me some feature enhancements to work upon in one of my projects and then discussion on that.

Q1) - Design a Dynamic Questionare which has different levels of difficulty and for each level you have some set of questions. With every right/wrong ans the level will increase/decrease respectively.
Discussion on HLD/LLD for the same , system readiness checks , tech-stack to be used etc ...

Q2) - Given an unsorted array with duplicates. Print sorted distinct elements first and then the remaining duplicates.

Input  : [34,12,2,1,67,89,5,67,8,76,12]

Output : [1,2,5,8,12,34,67,76,89,12,67] 

I started with naive approach O(N^2). Then I gave an answer based on sorting O(N log N).
He asked me to code in O(N) without extra space (Range of array values [0-1000].
I explained him my approach and coded it.

Round 2: Data Structure & Algorithm based + Project Discussion (1 hour)

This round started with deep discussion about my project , tech-stack , roles and responsibilities. The interviewer went through my resume and checked my competitive programming profiles mentioned in the resume and discussed some stuff about competitive programming.

The interviewer shared hackerrank problem links with me and clearly stated that there will be 2 DSA based questions.
Expectations :-

  • First question to be solved within 20 minutes with all the test-cases passed.
  • Second question to be solved within 15 minutes with atleast all the basic test-cases passed.

Both the solutions should be highly optimized and production-ready code is expected.

Q1) - Longest Increasing Subsequence (Medium) with some variations like :-

  • How will you print the sequence ?
  • Print the sequence by modifying the same code (Don't add extra loop for calculating the sequence)

Link : https://www.hackerrank.com/challenges/common-child/problem

I started with DP appraoch as he wanted to most optimized solution. The for printing the sequence only the approach was required.

Q2) - Difference Array Update (Medium-Hard)

Link : https://www.hackerrank.com/challenges/crush/problem

I explained him the approach and coded the solution.

Q3) - The interviewer asked me a puzzle.

Statement : There is a bag which contains confidential data which you have to send to your friend.

Following are the constraints given :-

  • The bag can hold two locks at a time but only one lock is sufficient enough to provide safety.
  • You have one lock and key and your friend has one lock and key.
  • You cannot share your key with anyone else not even your friend.]

You are expected to parcel your bag to your friend ensuring safety of confidential data inside it.

Round 3: Computer Science Fundamentals + Project Discussion (1 hour)

This round started with deep discussion about my previous company project.I was asked to explain the project, the algorithm’s used in the project and improvements , enahncements using latest tech-stack. The discussion went on for 15-20 minutes.

Question related to Computer Science Fundamentals :
1 .Operating System questions related to mutex-semaphore, deadlock, banker’s algorithm, Paging and Page Replacement Algorithms.

  1. Difference between SQL and NoSQL
  2. Questions on multithreading , synchronization , class level and object level locking
  3. Memory management (Java memory structure) , Garbage collection (Popular garbage collection strategies and algorithms) , Collection framework in Java , String class related concepts like SCP (String Constants Pool) , String intern() method
  4. Java 8 features (Streams , Lambda , Fucntional programming , Method references)
  5. Android (Had done a boot camp course during college) - What challeneges you faced while working at it ? Which android application you worked upon ? (A complete overview)

Question related to String :

Q1) - Given an input string (username). You have to append some hash value N number of times to it to make it unique.
      Given the hash value and N write production-ready code for the same.

Discussed my approach using StringBuilder (mutable) , StringBuffer (multithreaded enivronment) and finally came to the use of char[] array. Discussion on how time complexity will vary if hash value to be appended is a character or a string of length N.

Discussion about the work and tech stack of the team for which I was being interviewed.

Round 4: Behavioural Questions+ Design Problem + Project Discussion (1 hour)

Again, my current project was discussed and questions were asked related to my current project to test my knowledge on load handling and design of the system. The discussion went on for 15-20 minutes.
2 Coding Questions :-

Q1) - Given two arrays X and Y of positive integers, find the number of pairs such that x^y > y^x (raised to power of) where x is an element from X and y is an element from Y.

Input:
M = 3, X[] = [2 1 6]
N = 2, Y[] = [1 5]
Output : 3

Q2) - Given two unsorted arrays and a given number x, find all pairs (one from each array) that add up to the X.

Input : 
A = [3 , 57 , 8 , 1 , 9]
B = [0 , 2 , 6 , 11 , 25]

Output : [ [3,6] , [9,0] , [8,1] ]

Discussion on if duplicates are present then how will you change the code ? How time complexity will be affected ? What if we have negatives as well , did it affect time complexity ? What if we have unequal sized arrays then what will be the consequences ?

Initially started with HashSet (distinct array elements) , then came to HashMap (duplicates) and finally at Two-pointer approach with no extra space.

Behavioural Questions :

  • Innovations you have done at your workplace apart from work?
  • Handling conflicts between team members ?
  • Handling negative feedback ?
  • Strengths and weaknesses
  • Handling failures and setbacks.

Puzzle :
There are two empty bowls in a room. You have 50 white balls and 50 black balls. After you place the balls in the bowls, a random ball will be picked from a random bowl. Distribute the balls (all of them) into the bowls to maximize the chance of picking a white ball.

Discussion on roles and responsibilties , expectations , tech-stack related to team and project I'll be joining.

Result : The recruiter confirmed my selection the very next day and asked for details like compensation , any offer currently holding etc ...

Edit : Officially got the offer letter today after a week today (15-12-2020)

Comments (7)