- Status: 12 YOE
- Position: Senior Software Engineer at a BANK
- Location: Toronto, Canada
- Date: April, 2022
I consider myself an average (probably below average) coder. This is because I still have to use my hands to calculate simple things like 7 + 19. Additionally, I often find myself googling basic coding tasks, such as how to initialize an array of integers with values, how to throw a new exception with a string message, and how to open and read a file. Medium-level coding questions sometimes take me an entire day just to understand the question or solution.
During my early coding journey, I experienced many mental breakdowns, especially in the first two months, and often felt like giving up. Thankfully, my wife was very supportive, and having someone there for me made a significant difference. I hope you also have someone to support you through your LeetCode journey.
I have tackled around 200 questions on LeetCode, but I couldn't solve a single one independently at first. Perhaps I managed to solve less than five questions on my own, but my solutions were lengthy, messy, and filled with nested if-else statements. In the end, I frequently encountered the Time Limit Exceeded (TLE) error. As a result, I gave up trying to solve the problems by myself and started looking at the solutions immediately.
I bet that the interview questions will be among the top 50-100 questions of each company I interviewed with. This means I need to truly understand and master these top 50 questions, including various solutions (brute force included) for each question. I also search and prepare for follow-up questions.
I believe that humans are creatures of habit, so I kept redoing and repeating these questions at least five times for each solution. Eventually, the solutions started to stick in my brain. I spent around five months preparing for and completing two rounds of interviews with Facebook. To achieve this, I had to change my lifestyle and make many sacrifices, similar to many in the Coding community.
Despite having a full-time job with 50-60 hour workweeks and numerous WebEx/Zoom meetings throughout the day, I found time to prepare for coding interviews. By the time I was free to do LeetCode, it was already 10:30 pm, and my brain was exhausted. Therefore, I changed my habits: no more winding down by watching TV at night. Instead, I went to sleep early, woke up every morning at 5 am (or 5:30 am if I hit the snooze button multiple times), and worked on LeetCode until 9 am during weekdays. I sacrificed weekends and holiday time with my child to focus on coding.
If I can do it, you can too. Although I must admit that luck plays a significant role in the interview process.
The Entry
A recruiter found me on LinkedIn and we scheduled an informal chat. Basically just an informal chat to get to know me and what I am looking for.
Technical phone screen (45 mins)
one of the "parentheses" related problems in Facebook tag questions
one of the "palindrome" related problems in Facebook tag questions (follow up question: one of the HARD palindrome question - doesn't need to code for follow up, only explains my approach )
my approach in 1st round:
- told interviewer I have seen this question before. (every one of them said it's OK as long as you have not seen this in FB interview)
- explain my idea
- pseudocode
- explain edge cases and complexity
- ask if it's OK to code? if yes, then start coding.
Online onsite :
coding #1 :
- subarray sum equals k (2 scenarios: input are all positive numbers and input could have negative numbers)
- one of the "Lowest Common Ancestor" problems
coding #2:
- one of the "Lowest Common Ancestor" problems (I got lucky here)
- merge k sorted array
- (the leetcode uses list, the question I got uses array)
System design
- similar to design ticketmaster (but less complicated)
- How I prepare for this part:
- I purchased "gr**king system design interview" , definitely worth it!
- (this article/course helped me to put a structure to my answer into this open ended question )
Behaviour questions:
- search the Facebook interview questions in google/youtube, you will get lots of sample questions.
- I mostly look at the sample answers from "CARRERVIDZ" channel in youtube.
- The sample answers are amazing! Not in a million year I would be able to come up with such amazing answers.
Aftermath
I felt I did really bad on the SystemDesign round and one of the coding round.
I was expecting a REJECT, but I received a call 8 days later and they are proceeding with an offer for E4/L4. I guess I got lucky! and super happy that hardwork finally paid off :-)
Wish everyone best of luck interviewing!
Apology if my interview approach offend your ethics.
Like I said, I consider myself an average (or below average), so this is the only way I can pass the interview.
And if I can do it, so can you. :-)
FYI, of course I got rejects too. I got reject from Amazon and Coinbase.