As promised after my post about preparing for ML System design interview I would make a post on my final round experience. Here is some information about me first:
- Education: Undergraduate in mathematics and finance from top tier univerisity. Masters degree in mathematics after dropping out of PhD program also in a top tier univeristy.
- Experience: Roughly about 2 years working as a quant at a private equity company - mainly doing ML/DL.
Preperation:
In terms of preparation for coding I have been actively doing as many Facebook tagged questions as I can, thus I highly recommend the premium subscription. For system design I used the grok_ing the system design interview and made flashcards for all the key concepts. Now for ML I found this article really useful ML Design. I have also taken Andrew Ng deep leanring series course which really gave me a lot of understanding when it came to ML/DL but I also purchased these 300 flash cards ML Flashcards that really came in handy during my interview.
Advice:
I have intereviewed at Google, Amazon and now Facebook. I have been rejected from Google and Amazon mainly due to not being prepared enough going into the final round. Some takeaways I have learned was really spending the time to understand in depth various algorithms as well as system design architecture. That being said I think when you come across a question you do not understand try your best at solving it yourself but if you get no where then I think watching a youtube video or looking at the solution is helpful but just know that you will not get much stronger at problem solving overall doing that. Also, really try to spend speaking out loud and practicing with other people where english is not their first language. 9 times out of 10 you will be speaking with a foreigner where english is not their 1st language and its helpful to have practiced interviewing with people who also do not have english being their first language. I would recommend p_r_a_m_p for this reason.
Interview process:
The entire interview process was
- Two phone screens - the questions ranged from leetcode medium to hard and are literally in the facebook leetcode tagged questions.
- The first interview I only solve the first question perfectly. I had some bugs in the second problem they gave me and ran out of time to debug my code. Nonetheless the interviewer told the recruiter that I was of "high potential" candidate and thus still moved onto the second round.
- The second interview was very hard they asked me a leetcode hard question and I was only able to solve it because I did the exact question before. Complete luck there. Personally I think it was unreasonable to expect someone to solve that difficult of a question in 30 minutes. The overall acceptance rate on the question on Leetcode is around 20%.
- Final round - 1 ML system design question, 1 behavioral interview, 2 coding questions, and 1 regular system design interview.
- ML System Design - the question they asked me is a common question anyone can find online. I just want to note here that this is the most important interview and is highly weighted compared to all of the others from what my recruiter told me. I was very nervous about this one but I luckily did very well on this round based on the interviewers response to my different approaches as well as really being able to understand the steps in deploying a ML system into production. All credit goes to the article above I posted as well as Andrew Ng courses. The algorithms I used during this interview was LSTM and a gradient tree boosting algorithm (XGboost).
- Behavioral - Preparing for the leadership principles from Amazon really helped here. The questions were mainly about projects I was proud of, working on an ambigous project, working with difficuly co workers and managers. Just have a good story for this. There are good Youtube videos online that give you good ideas how to structure these stories.
- Coding question 1 - The question was not difficult but when I asked a clarifying question I started proceeding to solve the question but then my interviewer stopped me and said that this approach wont work. I then asked okay are did you mean that I need to find a contiguous subarray? He then said yes but I first asked if it was non-contiguous to which he also said yes. I think this was due to some connection issues the audio was breaking up at times. Nonetheless I still was able to solve the quesiton and get the optimal solution. He then gave me 5 test cases to go through to which I did. He then asked a follow up question about being solving the same question but having the numbers in a circle, no coding involved their but I was telling him how I would solve it and after explaining my approach he seemed a bit confused at first but then understood later what I was trying to do. Now even though I was able to get the optimal solution here and answered his follow up questions I give it a 50/50 chance I passed here. That may be pessimistic but I feel like if things are not 100% smooth then the interviewer could fail me. Would love to hear opinions from you guys on this.
- Coding question 2 - The question was also not that difficult but I was trying to figure out an optimal way of solving it. I was given a small hint and from there was able to first get a working solution which he said was "good" but I could improve the space complexity. After some discussion back and forth I mentioned how I could decrease the space by breaking up the decision making space using binary search. He said I was on the right track but then said something about how I may not need to use a map. I thought about it and then quickly optimized my code just in time before the next interviewer jumped on the call. He seemed satisfied with me being able to go from a brute force approach to optimizing my code. Since I was given a small hint though I also give myself a 50/50 chance on whether I passed. Again please share thoughts on this opinion I have.
- System design interview - Based on preperation and being sent a google draw I was prepared to build a distributed system but 30 mins before the interviewer sent me a coder pad link. The question was extemely difficult and was not involving building a system. He wanted to me to partition the data in such a way such that using some service would give the top 10 of something in 200 microseconds. I wish I could tell you guys what the question was but I can say this: my interviewer chose a question to which he knew I would completely have no idea on what to do which is what he told me. I came up with some ideas in terms of paritioning the data into a complete tree and then using a BFS level-order type traversal. He said that I was going into the right direction here but then asked me about how many levels there were to which I said something like log2^50m and he asked what that number was and I said I don't know the trick to doing that in my head, he laughed and didn't know either but googled the answer. I also had another approach to partitioning the data that he said could work but still was leading me to something else. I personally don't think I did that well based on his body language. Not sure what else to tell you guys on this one. There was really nothing I could do to prepare for that interview.
Overall thoughts and takeaways:
I was happy with how I did and I frankly think I did very well on everything except the final round which makes me beleive I have a good chance of getting an offer but at the same time because it was not perfect I give myself a 50/50 chance. It is difficult to really have a final round interview go completely smoothly but from my experience if it is not or if I mess up a bit on one round then I am screwed. Although I have read and head of experiences where people also have a bad round but yet still get the offer.
I will be editing this post as I find out more next week whether I get the job or not. I hope I do, I really worked really hard for this and I think I did very well besides the last round. Let me know what you guys think in regards to my opinions or if you have any clarifying questions. Thanks!
Final Decision:
Just got the call from the recruiter stating that I have been rejected. I tried to ask for more information but was told that she could not provide any details whatsoever, but I can interview with the same team again in one years time. Thus I am sort of left to speculate what went wrong to which I am guessing it was because of the last interview and/or the fact that I did not do two questions per the coding round. I am really sad by the decision to be honest since I thought I did well enough to get an offer especially considering I did so well on the ML design interview. I will keep going though but defeat is bitter.