I interviewed for the Member team — it was basically an open-book style interview, similar to a couple of other phone screen reports I'd seen.
Problem Solving:
Netflix homepage content dedup — for each row, the first n titles need to be deduplicated globally; after position n+1, you only need to make sure there's no duplicate within that row itself. Follow-ups: 1. what if n is different for each row, 2. what if some special rows don't need global dedup.
Coding:
- Find the length of the longest run of the same character.
- Find the length of the longest substring without repeating characters — I used a left/right pointer sliding window. They asked if there was a way to optimize it, and the answer is you can use a map to record the position of each character within the current window.
- Find how many pairs of strings share no common characters — I used a pairwise comparison approach, but the interviewer later asked about a bitmask solution.
After writing the code, you also had to write your own test cases. I answered everything, though it wasn't bug-free every single time. I felt like the conversation with the interviewer went pretty well too. A couple days later they told me I didn't pass. I asked if there was any feedback, and they just said they went with a more suitable candidate.
Discussion
Loading comments…