Hello Leetcoders,
My time has come to contribute to this fabulous community. But don't get too excited as I didn't make it to on-site. Alright, recruiter reached out to me via LinkedIn, scheduled an intro call and talked briefly about the opportunities at FB London, one of the highlights was that recruiter mentioned that given my seniority I could even potentially choose which team to join (recruiter said I could join either: instagram, whatsapp, or workplace teams... among others I don't remember).
I asked for ample time to study since I hadn't practiced interviews in a long time and recruiter was happy to oblige, then there's the usual material and videos they provide you in order to prepare, while the material is good I don't think it's better than Leetcode.
So, the day comes and I couldn't have asked for a better interviewer, whom I can only describe as a calm, kind and supportive individual who treated me as if he has known me for years, we briefly talked about FB life and how COVID-19 has impacted London, and he appeared to be really happy to be interviewing me in particular, I made a joke and got a good laugh out of him even. But as you're about to find out this means nothing if you screw it up.
Off we went to the first coding exercise, it was one not present here on Leetcode, and even though I didn't sign an NDA I'm not sure If I should share it, let me know what you guys think? I don't want to be banned from Facebook as I believe it's very possible to pass their bar eventually (but I might temporarily edit this post and show the Question depending on your opinions). In any case the Question was a Graph problem, a really simple one! but once I read the statement I made the terrible mistake of trying to remember Which Leetcode problem is this? (Maybe interviewer picked up on it). Because the graph structure was evident and the statement contained the word: "tasks" in it I mistakenly thought it was Course Schedule, WRONG! Hence, I tell interviewer it looks like a case for topological sort, at that moment I lost the interviewer, his disappointment was palpable, he does not give any major hints other than saying an iterative solution would be enough. I kind of double down and say maybe use a DFS, interviewer reluctantly agrees with that option given that at this point we had already lost like 5 out of the 15 minutes allocated per Question. As I'm writing the DFS, interviewer points out an awful flaw, I hadn't assembled the graph correctly, you see, interviewer does not give you a signature method for you to fill out with an implementation like Leetcode does, you have to write the method signature yourself! the problem was that my graph parameter didn't match the data displayed in the problem statement. At this point it was even more obvious interviewer didn't care anymore as I could hear him typing...
A moment later he stops me and says, "your solution clearly is not going to work, let's move on to another Question, shall we?" Before I mention what the 2nd Question was, It now comes to mind that at some point I said to the interviewer: "I think this may be a good option, What do you suggest?" (I don't remember now What I was referring to) but this made the interviewer kind of mad, his reply was: "No, No, I'm not suggesting anything!" Apparently it's a sin to ask an interviewer for a Hint in this manner, I don't know but he seemed triggered by the Question.
Question number 2 was: Leftmost Column with at Least a One. Solved it quickly using Binary Search, but prior to that, interviewer asked me for Space and Time complexity of my solution, I answered correctly but like I said, at this point interviewer's heart was not in it anymore, it was so obvious and kind of awkward to be honest. After I end up coding the solution, interviewer asks me to dry run it but doesn't explain to me how to do it, so what I did was is I picked a row and illustrated Binary Search on it using 2 pointers like this:
0 0 0 1 1 1
^ ^Interviewer then says, "ok, but now do it with the actual variables, I want to see that kind of testing", I tried to do it as he says but clearly it wasn't enough because he wasn't satisfied, moreover he ends up saying: "Are you sure your solution works for all cases? does your Binary search bounding condition handles all cases?" I said to him: "I think so". Afterwards I check the Question here and I noticed that this particular problem has sort of a catch, and it fails if your while (iterative) uses the <= operator like this:
while (lo <= hi) {
...
}I think it handles all edges cases properly if you use the < operator instead, maybe that's what interviewer was referring to? I'd really appreciate your input regarding this matter in particular.
That's it true believers, that's how I miserably failed my chance at FB! and I felt so bad afterwards and still do, It has made me feel like the most stupid candidate ever.
Here are my take-aways:
Don't focus on Company Specific Questions here on Leetcode, the key to passing a Tech interview like this is to be able to work through any Question, reading other experiences I have noticed that Questions aren't even that hard, but the probablity they will ask you something you haven't seen before is high!
Learn the format to do Testing or Dry Runs using the format that FAANG companies expect! This I feel is an overlooked topic and I say it because I have failed an Amazon interview earlier and I remember I couldn't do a Dry-Run either, or it was obvious it wasn't what the interviewer was expecting when he asked for one.
Other than that, my morale is low, I'm aware my performance was poor and I'm not sure what exactly should I do next If I want to one day pass these interviews. In all honesty I got nervous and that got the best of me, a moment after the interview ended I was able to solve the 1st Question easily, so I don't know what to make of that. Some days I just think FAANG maybe isn't for me :(
Thanks in advance for reading my post and Looking forward to your commentary,
Kind Regards,
Again, the interviewer went from friendly to disappointed in a couple of seconds because I believe he (and FB engineering in general) expects candidates to be able to recognize a Graph Problem in a matter of seconds, and I failed to do so! This, at least I'm sure of... If you can't see the obvious graph in a Question like this you're going to look like an ass to them.
A Final Take-away: