Level: Mid-Level
Round: Phone Screen · Type: Multiple Types · Difficulty: 6/10 · Duration: 120 min · Interviewer: Unfriendly
Topics: Algorithms, Problem Solving, Spam Detection
Location: Los Gatos, CA
Interview date: 2025-05-15
Got offer: False
Question: Given an array, find all pairs of numbers that, after applying addition, subtraction, multiplication, or division, result in a target value. Follow-up: extend this to three numbers.
Question: Given a large history of email exchanges, identify spam emails. We discussed how to determine if an email is spam and how to calculate the accuracy of the spam detection system. I wrote some class code in this open-ended discussion.
The first round focused on coding. I was asked to write a function that takes an array of numbers and a target value as input. The function should return all pairs of numbers from the array that, when added, subtracted, multiplied, or divided, result in the target value. A follow-up question extended this to finding triplets of numbers that satisfy the same condition.
The second round was more open-ended, focusing on problem-solving. I was given the scenario of having a large history of email exchanges and being tasked with identifying spam emails. We discussed various approaches to detect spam, such as analyzing email content, sender information, and email metadata. I also had to consider how to calculate the accuracy of the spam detection system, discussing metrics like precision, recall, and F1-score. I wrote a small amount of class code to illustrate some of the concepts.