Feature #4: Popularity Analysis
Explore how to analyze Netflix title popularity by checking if weekly scores are increasing or decreasing. Understand how to implement a single-pass Elixir solution with efficient time and space complexity to differentiate between steady, rising, and falling trends for better problem-solving in coding interviews.
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 array containing previous scores for the same title. This score array 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 an array 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
An array is increasing if the expression ...