Level: Senior-Level
Round: Full Journey · Type: Coding · Difficulty: 6/10 · Duration: 60 min · Interviewer: Neutral
Topics: Machine Learning, Python, Algorithms
Location: San Francisco Bay Area
Interview date: 2026-01-15
Got offer: False
This was a coding interview focused on friend recommendations, using Python. The interviewer guided the session, asking about Big O notation and requiring a dry run of my code.
Question 1: I needed to fix a valid_recommend function to pass a test case. I identified that the function, which took a user and a list of users as input, didn't check if the list contained the user themselves. I fixed it with two lines of code.
Question 2: I was asked to implement a random_recommend function, and I was told I could use AI for this task. My initial AI-generated solution didn't work, but after a few iterations, I got a working solution. I copied the code, ran it, and it worked.
Question 3: The interviewer presented a problem about how to measure the effectiveness of a friend recommendation algorithm. I used AI to generate several metrics. The interviewer then asked which AI-generated ideas were usable, given the attributes of the User class (which only had id and currentFriends). I identified mutual friends as one viable metric and another metric I don't recall. Then, I was asked to implement mutual friends in a new file, with a test file, using AI. I copied the AI-generated code into the file, including the test file, and ran it.