← 返回 netflix 的题目列表Sort Shows by User Preference
类型:qbank
Deliberately open-ended: define what user preferences look like, choose data structures, and rank a list of shows into an ordered list of title IDs — graded on clarification and clean modeling, not the fastest algorithm.
The Challenge
Imagine you have an app that displays a list of TV shows. You need to write a program that sorts these shows based on what a user likes. The result should be returned as a list of title IDs.
This problem does not have strict rules. You need to decide the following:
What "user preferences" look like.
How those preferences change the order (ranking) of the shows.
Which Data Structures are best to use.
You are free to choose the format of the output.
What the Interviewer Wants
This question tests your problem-solving skills. The main goal is to see how you define data and create a ranking strategy. You need to turn your ideas into working code.
Do not worry too much about finding the perfect or fastest algorithm. Instead, interviewers want to see if you can:
Handle a vague problem by breaking it into smaller parts.
Make logical choices (assumptions) about how the system works.
Write clean, easy-to-read code.