Feature #4: Popularity Analysis
Explore how to identify increasing or decreasing popularity trends of Netflix titles from weekly score data using Rust. Understand how to determine trend patterns efficiently with a single pass algorithm, optimizing time and space complexity. This lesson helps you apply practical problem-solving skills for coding interviews based on real-world scenarios.
We'll cover the following...
Description
Netflix maintains a popularity score for each of its titles. This popularity score is derived from customer feedback, likes, dislikes, etc. This score is updated weekly and added to the end of the list containing previous scores for the same title. This score list helps Netflix identify titles that may be increasing or decreasing in popularity over time. Some titles may be steady in popularity, increasing, decreasing, and fluctuating. We want to identify and separate a title if it is gaining or losing popularity.
We’ll be provided with a list of integers representing the popularity scores of a movie collected over a number of weeks. We need to identify only those titles that are either increasing or decreasing in popularity, so we can separate them from the fluctuating ones for better analysis.
Solution
A list is increasing if the expression ...