Computer Science, asked by sadvika83, 5 months ago

problem again. You can use System.out.println() to debug your code. The sys
not work in case of syntax/runtime error. The version of JDK being used is 1.8.
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;
userBooksListenedTo, 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;
bookGenres, a map with book genre as keys with a list of all the books within that genre as values.
Output
Datuur

Attachments:

Answers

Answered by himanshujadoun169
0

Answer:

website allows users to reserve railway ticket book

Similar questions