Facebook Internship (Reject)
Anonymous User
4980

I never really cared about becoming a developer, so I never really practiced until the beggining of this year, where the opportunity for an interview appeared. I did about 120 problems, one month and a half before the interviews, mostly medium or easy ones using O(1) memory and stuff, that end up being kind of a medium difficulty as well.

The first interview problems were:
1-https://leetcode.com/problems/first-bad-version/: solved with optimal solution.
2-https://leetcode.com/problems/verifying-an-alien-dictionary/: also solved with optimal solution.
I got so nervous that I had some trouble thinking about the second one, lol.

Second interview:
1-https://leetcode.com/problems/valid-palindrome-ii/submissions/: solved with optimal solution (although I did solve it before and it may have looked like it, since I jumped straight into the most efficient algorithm... But even in my first attempt I did the optimal way since the problem is simple).
2- This is where it got weird. The question was to find the element that appeared once in an array filled with duplicates (https://leetcode.com/problems/single-number/). I asked the interviewer if the array was sorted or not (he said it wasn't) and this was a terrible mistake.
As soon as I said you could use a Hash table, and, more efficiently, a XOR to find the single element, seeing that I was able to solve the question, he asked me to approach as if the array was, indeed, sorted.
So now I had to do this using a binary search (as usual when we're talking about sorted arrays), which I struggled a lot. Here it is how to do it:https://www.***.org/find-the-element-that-appears-once-in-a-sorted-array/?ref=rp (and I did it in the exact same way).

Despite being able to solve all problems in the most efficient way, I still got rejected. Not sure why, unfortunately. Despite never aiming for being a developer this was an incredible job, which I would've gladly taken. Haven't practiced anymore and I'm not sure if I will try again. Sharing this because countless posts about their interviews also helped me a lot. Still a bit hurt abouth being rejected for no apparent reason.

Good luck for everyone!

Comments (11)