Feature #6: Fetch Most Frequently Watched Titles

Implementing the "Fetch Most Frequently Watched Titles" feature for our "Netflix" project.

We'll cover the following

Description

This feature and the one we discussed before are almost similar, but now the titles are maintained in order of viewing/access frequency. When the data structure is at capacity, a newly inserted item will replace the least frequently accessed item. In the case of a tie, the least recently accessed item should be replaced.

Let’s say that a user has gone through the following titles: