In early May I got an interview invitation from HR, so I scheduled the phone screen for late May.
After the interview started, we chatted for about 10 minutes, talking about why I wanted to join Facebook. Then the DS interviewing me asked whether I wanted to start with SQL or a product question. I picked SQL first, and we jumped straight into it:
Table: Date, Timestamp, sender_id, receiver_id
This table records chat activity within Messenger, showing who sent a message to whom and when.
Q1: Find users who chatted with five or more different people today.
Q2: Find users who got a reply within one minute of sending a message.
On the first question I came up with an approach quickly, but once I wrote it out the interviewer hinted that something was wrong. I got a bit stuck in my original approach and couldn't get out of it — I thought for a few minutes and still couldn't come up with the answer, and the pressure kept building. Right as the interviewer was about to give me a hint, I suddenly clicked and blurted out my idea first. The interviewer said "I think you've already got it," and asked me to walk through it verbally. After I explained it, he said it was correct.
I finished the second question in under a minute, and the interviewer said it was fine.
Then we moved on to the product question — the one people had mentioned before, about the negative effects on teenagers after their parents register accounts to monitor them. He asked me to talk generally about how I'd test for this effect. After I described an A/B testing approach, the interviewer asked me to talk about the potential problems with the test and how to avoid them — this was actually the key follow-up. Anyone who's prepped for interviews can generally say "we should run a test," but what problems you'd actually run into is what tests a candidate's experience and how thorough their thinking is. My answer was that households where a parent has joined are fundamentally different from households where a parent hasn't, and those differences might be hard to measure with the data available. One option would be to compare the same group of people before and after the parent joined, but that requires a model to predict how that group would have behaved if the parent hadn't joined.
Finally the interviewer asked me to talk through my approach to solving this problem, and after I finished he gave a positive reaction. I felt like the product question went fairly smoothly, but based on his feedback, what I answered probably wasn't exactly what he was looking for — though there wasn't really anything wrong with my answer either. He seemed satisfied enough in the end, and then we moved into the part where I could ask questions.
Discussion
Loading comments…