Feature #9: Movie Combinations of a Genre

Implement the "Movie Combinations of a Genre" feature for our "Netflix" project.


Suppose we have nn different movie genres like Action, Comedy, Family, Horror, and so on. In each genre, we have 00 to kk movies. We need to screen several movies of different genres in a specific sequence. For example, in the morning, may want to feature a Family program, followed by a Comedy. Late at night, we may want to show Horror movies followed by Action movies. At prime time, we may want to use some other sequence.

Our task is to implement an algorithm that creates a combination of movies, chosen from the given set of genres in a specific sequence.

Let’s say we have the following genres with the following movies in each genre:

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.