Status: Experienced 6+, MS in MIS and BS in CS,
Current position - Team lead at a small startup
Offer Position: SDE2 at Microsoft and Oracle
Location: Seattle
Date: Microsoft - March 6, Amazon - March 9, Oracle - March 11
Preparation
I started preparing on leetcode sometime in Early Dec 2019. I solved around 181 Easy, 137 Medium and 12 Hard problems overall. I started with Easy and was able to do them properly, although some required a special techniques, specifically using Stacks on decreasing sequence. When I moved to Medium problems I was not able to solve any problems, but as I kept struggling with them, I became better, and soon medium problems were easy too. Same was the case with Hard problems.
I didnt set any daily quota of solving problems. Just did whatever I could after work. Usually, I was able to solve 2-3 problems per day on weekdays, and 4-5 on weekends. It is important to revise the problems you have already done too. Go back and solve them again.
Advice - Don't see the solution ever, unless you have written a code which is Accepted (doesn't matter the optimization, just solve it). Then go and see Discussion and solution which will tell different approaches you can think of. It's best to ponder over those as well and let them sink in, before you move on to next problems. Apply the learnings in next problem. Rinse and Repeat.
Leetcode Premium was worth it. I used "*** the system design interview" by ***[dot]io.
I also extensively studied Java, JDBC and design patterns. Then I started to apply to positions in mid Feb, and started the process right away.
Facebook - Phone screen
I applied and was contacted by recruiter to setup a phone screen. The Phone screen was Medium LC question - Accounts Merge. It involved union find, and I could not figure it out first, and wrote an O(N^2) solution. It later hit me that I could have solved it by union find. Although time was over. It didn't work very well. I got a reject few days after, which was expected.
Delhivery - Phone screen - Senior Software Engineer
A startup in logistics. Work seemed interesting, so I applied and after a quick recuiter call, phone screen was setup. The interviewer asked system design on phone screen, which I was not expecting at all. I was asked to design a traffic light system. It didn't go very well and I wasn't prepared for it. Got a rejection few days after. I started taking system design seriously after that.
Microsoft - Phone screen and Onsite
After initial recruiter call, a phone screen was setup. Interviewer asked question similar to merge two sorted lists. I was called for onsite later.
Onsite was 4 rounds -
- First was to traverse a binary tree n times in preorder and then perform some operation on the nth node. I took a wrong approach and then used a recrusive approach to complete the code on whiteboard. It is very difficult to solve a problem on whiteboard, if this is your first time doing it. I wrote 1-2 lines wrong, and took all the time to complete this problem. Interviewer asked to not use globals in recursion. He didn't seemed impressed.
- Next was to solve a problem but without writing implementation. It was on OO design.
- It was a lunch interview. I chatted with interviewer and took salad for lunch. We talked about design patterns. Then I was asked to write a DP problem. I solved it using both bottom up and top down approach. It was similar to the staircase problem, but a variant of it. It went well. We also talked about variations in requirements and how we will break this problem if using Hadoop.
- Last round was system design and behavioural. I was asked to design video streaming service. This round went well. I explained each part of the system in detail, and accepted that my knowledge is a bit limited, when asked how I would manage persistent connections to serve large video file chunks.
After 3-4 days I heard back that I got an offer from them.
Amazon - Phone Screen and Onsite
After initial hiring manager call, I was given Amazon OA, and there were 2 questions from common Amazon OA list. I was called for onsite later. The onsite was then canceled and moved to virtual interview. It was okay for me, no need to panic. Actually better than writing code on white board.
- First round was full behavioural. I didnt prepare well, and maybe that was why I got a reject from Amazon later. Please do prepare well. I would suggest - write your responses and read them aloud, record and listen to yourself. Do preapre for this. Follow Dan Crioter from youtube.
- It was system design with Hiring Manager. I was asked to design Amazon Locker Booking and Opening. Even without whiteboard, I was comfortable talking about every component. After my solution, we discussed the scenarios to make it work when there is an internet outage using public private key etc. We also talked about scenarios covering delivery guy and customer using lockers.
- Break for an hour after this.
- Next was 20min LP + technical. LC Medium - on finding the maximum length of substring satisfying a given criteria
- 20min LP + An LC Hard - merging and sorting a huge file of intergers, the file is too big to fit in RAM. Wrote a code to merge K lists and came up with formulas in terms of RAM size and K. Later realized that instead of K it should have been merge 2 lists over and over, to solve the given scenario.
- 15min LP + An LC Hard - from a given list of strings, find strings which can be formed by concatinating other strings. I wrote a recursive approach (O n^n), and took time to finish it. I later explained how I would optimize it using memorization and then use top down to bring it to (O(n^2)).
Got a reject 2 days after.
Oracle Cloud Infrastructure - Phone screen and Onsite
After initial Hiring Manager round, a phone screen was setup. It was an easy question to write a class for Min Stack. Interviewer was very helpful and even helped solve a small problem in my code (I forgot an equality check). I got a call for onsite later which was again changed to virtual onsite.
- First round was system design. I was asked to design a Hotel Booking reservation site. I had to solve it using google docs. I made full use of that, and wrote and organized my thought process. Interviewer then asked me to optimize my partition of data further and I made a wrong choice and got stuck a little bit. Mentioned other components that I would use for such a system.
- Next round was the coding round. I was asked to traverse a binary tree, and get paths which satisfied certain constraints. Was asked to optimize it if there are million calls to such a function with read-only data.
- Next round was with a senior guy who explained the team road map in half hour, and coding question for next half. It was LC Medium on intervals. For some reason, maybe exhaustion, I didn't do very well. I totally bombed this round.
- This round was system design again with Hiring Manager. He probed into a lot of details on the work that I am currently doing, and I showed him some of that work, a running application.
- This round was fully behavioural (bartender round). The interviewer was very nice and I talked to her on various aspects of working at OCI. It was a nice one hour long conversation.
Got an offer from them 2-3 days later.
Hope all this info help someone else. Keep practising and applying. On top of all this, do not forget to use your common sense, because that is one thing that helps you out in most of the difficult situations.