I had promised myself I will give back to the Leetcode community regardless of my result and here I am. This is a post about how I prepared for my dream company and almost got an offer. If you are looking for exact questions which were asked, you can skip reading this as such posts only distracted me in my preparation for the company.
I have roughly 5 years of experience working for internet based large-scale companies. My friend referred me and I got a call from recruiter in a couple of days. The recruiter asked me about my preparation level and I told him that I am hardly prepared and will need minimum a month for preparation. I scheduled my phone screen for roughly one and half months later.
Tip 1 - Be honest with your recruiter. Do ask time if you are not prepared as even they want you to succeed and will be happy to give you enough time for your preparation.In my phone screen I was asked two questions LC Hard and LC Medium. Solved the LC Hard problem completely. LC medium has two parts to it, I solved one part and shared approach for second as there was no time left.
Result - I cleared the phone screen with a feedback from interviewer that I will need some more preparations.
He was right I did not really prepare well for phone screen. Things I did which I shouldn't have
I always thought this is the best way to prepare as it saves me time and I am able to cover more patterns of questions. But below is a better way in my opinion
Tip 2 - Practice! Practice! Practice!
* Whenever you are stuck in some solution, take a day off and do it again later. If you are still stuck the next day, look at the solution but DO NOT CODE right away. Come back a couple of days later to this question and solve it on your own. This approach almost takes up the same time as previous approach but is better.
* Write all different type of test cases which your code should be tested against with. This is an important step in FB interview where the interviewer asks you to list down all different test cases and dry run it against your code. Once you make it a practice you will start identifying patterns in the question and it won't take as much time and will help you a lot in interview.
* Naming variables is my personal OCD. I take up a lot of time here which reflects in interview. If you have any such roadblocks in the way you code, identify it (By maybe mock interviews etc) and work on it which can save your precious couple of minutes.
* Put yourself in time contraint, speak out loud while coding.With the above strategy in mind, I asked the recruiter for another one and half months for my next virtual onsite rounds.
Round 1 - Coding
First question was a straight forward question labled LC medium. It was so straighforward that I panicked after hearing the question. This has never happened with me. Maybe it was because working in facebook has been my dream for last many years and I was so close to it. I got blank for first minute and then the interviewer asked me what am I thinking and I got back to the round. Solved and moved ahead. The interviewer asked me to dry run it against a specific usecase which when I did identified a bug in the code, fixed it and moved ahead. Discussed about time and space complexity and different test cases.
Second question - LC Medium - Solved it, dry run it against all possible test cases which I listed out and discussed time and space complexity.
Round 2 - Coding
First question - LC Medium - Solved it, dry run it against all possible test cases which I listed out and discussed time and space complexity. Had some time left so discussed DP approach to the problem as well.
Second question - LC Medium - Solved it, dry run it against all possible test cases which I listed out and discussed time and space complexity.
Round 3 - Behavioural
Here is again where Leetcode community helped me. I have seen various posts where the candidate wasn't sure what went wrong in this behavioural round which costed him/her the interview. I followed all of their advices which was basically
Tip 3 - Do not skip preparing for behavioural interview. Even though all we gotta do in this round is being honest about everything, sometimes even to recall various incidents in your career life takes time.How I prepared for this round -
Round 4 - Design
This is where again your experience will help you a lot. Regardless, another major chunk of your preparation time should go for this. I had prepared from a competitor's website for this round which has some really good courses on design and architecture. (*** the design interview, object-oriented interview, web applications and software architecture 101).
Tip 4 - For design interview, prepare on your preferred interview tool (Google drawings, white board etc)This is a round where you will be asked to design a service or a software. Even though it is an open ended discussion, remember that it is you who is being interviewed. So once you have all the clarity around the service, scope and expectations, lead the discussion. Talk about YOUR design.
This is my strong field as I take a lot of design interviews. Sometimes I come across candidates who looks like have went through all these courses and just parrot out the complete article. Don't do that. Understand whats being done and why and then use your own logic and design your own service. Understand the pros and cons of each choices. Most of which comes with experience but in these 3 months you can learn a lot in your current company. Speak to leads and seniors around their software choices etc.
I got a call from the recruiter in a week who informed me about the good and the bad news. I cleared the interview but because of no head counts available, my application will be kept on hold and will be picked up again once he receives an head count. Frankly, this is putting my head to go through all the What If scenarios. I just hope to get the offer soon.
Remember, preparing for FAANG is an experience in itself. So don't take pressure, enjoy it and cheers.
Edit 1 - Preparations I did
Daily Challenge for the month of April, May and June - Best part of the preparation.
Facebook Explore card
Roughly 100 others Facebook tagged questions
*** Systen Design
*** Object-Oriented Design and Web Applications and Software Architecture 101
*** Behavioral