Amazon wants to improve the Audible experience for its customers by offering better book
recommendations based on what the user has already listened to. To make this possible,
Amazon needs to identify users' favorite book genre(s). This is done by identifying the most
listened to book genres from the user history and giving them recommendations from the
same. A user can have more than one favorite genre if he/she has listened to the same
number of books per each of the genres.
Amazon has following information to identify a user's interest(s);
a) The name of the user mapped to the collection of all the books that he/she has listened to,
and
b) A list of all books and their associated genres. For the scenario, imagine that a book can
belong to only one genre.
Write an algorithm that will produce a map/dictionary of users and their favorite book genres.
Input
The input to the function/method consists of four arguments:
numUsers an integer number of users:
user Bookslistened to, a map with user names as keys and a list of all the books that the user
has listened to as values:
numGenres, an integer number of all genres available:
Answers
Answered by
0
Answer:
in this what is question first you tell then I will answer
Similar questions