Level: Mid-Level
Round: Phone Screen · Type: Coding · Difficulty: 3/10 · Duration: 60 min
Topics: Arrays, Data Structures
Location: Los Angeles, CA, US
Interview date: 2026-01-20
This was my second phone screen. The first was a skip-level screen with the hiring manager.
Part 1: Given a list of episode IDs from a user's viewing history, determine if there are any duplicate episodes.
print(has_duplicate_episodes([55, 66, 77, 88, 99])) # return: False (no duplicates) print(has_duplicate_episodes([55, 66, 77, 88, 66])) # return: True (duplicate: 66)
Part 2: Determine whether a user has watched the same episode multiple times within a time period of K days.
Part 3: Determine whether a user has watched at least two episodes from the same season within a time window of K days. Two episodes are considered to be from the same season if their IDs differ by at most T.