Algorithm · Google · Hard
Part 1: Top-K movie recommendations from a similarity graph You are given an undirected graph of movies. Movie IDs are 0 through n - 1, and adj[i] lists the movies directly similar to movie i. The rating of movie i is stored in rating[i]. A user liked the movie start and has already watched the movies in watched. Return at most k movie IDs as recommendations. A movie may be recommended only when all of these are true: it is reachable from start using graph edges, it is not…
Checking your access…