Top N Buzzwords

You work on a team whose job is to understand the most sought after toys for the holiday season. A teammate of yours has built a web crawler that extracts a list of quotes about toys from different articles. You need to take these quotes and identify which toys are mentioned most frequently. Write an algorithm that identifies the top N toys out of a list of quotes and a list of toys.


This is a companion discussion topic for the original entry at https://algo.monster/problems/top_n_buzzwords/