Feature 2: Rank Movies / Fetch Top Movies
Problem Statement
Let's say you're building another feature of an app like Netflix. Now, you need to build a criterion so the top movies from multiple categories will combine into a single list of top-rated movies. In order to scale, the content search is performed in a distributed fashion. Search results for each category are produced in separate lists. Each member of a given list is ranked by popularity, with 1
being most popular and popularity decreasing as the rank number increases.
Input
![](https://learn.innoskrit.in/content/images/2024/04/image-1.png)
Output
![](https://learn.innoskrit.in/content/images/2024/04/image-2.png)
Similar problem on LeetCode: Merge K Sorted Lists