Education + Jobs Hiring Website - 2025
0 like 0 dislike
32 views
Microsoft SDE1 L60 Interview Experience

Round1 OA:- 2 questions

 

String permutation based DP + Backtracking question

 

Cache TTL:- AddCache(), RemoveCache(), CacheAtTimeT(), Map + Priority queue.

 

Got call from HR for full day interview 3 + 1 rounds.

 

Round2:- DSA, Max length subarray with k distinct elements. Sliding window + map.

 

Explained the logic, the TC and SC, pseudo code and dry run. Interviewer accepts the solution but no coding yet. Asks follow up what if instead of length we return indexes, my answer we store indexes in two separate global variables start and end whenever we find a subarray with k distinct elements and then return after full array scan. Asks to dry run again with 3 diff examples with same question explain how will you return the indexes. I told same ans again. Asked to update the pseudo code, did the same and then time was up. Didn't get the chance to fully code and run.

 

Asked feedback, interviewer said logic and solution is correct but he still didn't understand how I will return the indexes.

 

Round3:- DSA+LLD, kind of machine coding round.

 

Asked to write full production style code for a calculator which takes an expression as a string and then evaluates and return the answer.

 

Expectations:- Modularized, OOPs style code and cannot use any built in libraries.

 

Started coding the logic with main method calling the calculate method which in turn calls evaluate method which contains the logic. Told I'll use array as stack to evaluate using BODMAS rule. He said it's fine. Coded the whole solution. Dry ran with a big expression. Solution and logic accepted and he told good job. Then he told why you used array as stack and why not create a custom stack. I told yes we can do that but to code the logic first I used array as a stack and I can implement the stack as well. Also I had already told this when starting the code for logic.

 

In the end I asked feedback which was:- "The expectation was clear we needed full Modularized code without using any built in library and it was expected you would create a custom stack to use in the logic which was very crucial, so you can get the gist of how the interview went"

 

Round4:- LLD round. Design Digital Wallet System.

 

Requirements:- Add money, Transfer Money, Store Transactions.

 

Came up with classes and there methods, the relationship between them.

 

Questions where I think I made mistakes:-

 

When Transfer money you would accept account details as an object to the method or accept an account id and then use the id to get the account. I said for simplicity I am accepting as an object as the call will be from main method or demo class where Transfer is called. Follow up:- why not store list of account in the class containing the Transfer method

 

Concurrency and locking:- where will you apply locks, will it be pessimistic or optimistic. How will you ensure atomicity and consistency? My answer locking at method level for add and transfer and pessimistic locking.

 

Design patterns to use :- I said strategy pattern if we have multiple ways of transfer to perform. And observer pattern to notify the user/owner of the wallet.

 

He accepted the design but with hesitation. Didn't receive any feedback when asked.

 

Finally verdict:- Rejected. Called HR but got ignored and asked for feedback on mail but no replies.

 

Please tell me what I need to improve or where I made the obvious mistake.

 

I think I need to improve my LLD and communication for what is expected.

 

TLDR:- Round 1 OA:- q1, string Dp + backtracking q2, cache TTL Round 2 DSA:- Max length subarray with k distinct elements Round 3 DSA+LLD:- Calculator expression evaluation without using any built in library and production style modularized code. Round 4 LLD:- Design digital wallet system.
ago in Interview-Experiences by Expert (137,640 points) | 32 views

Please log in or register to answer this question.