Back to problems

Top K Hash Tags

Algorithm · Snowflake · Medium

Coding / Software Engineering You receive a collection of hashtag records named events, with each record formatted as [userId, hashtag]. The popularity of a hashtag equals how many unique users have posted it. Repeated posts of an identical hashtag by one user contribute a single count for that hashtag. Produce the first k hashtags after ordering them by: Greater popularity before lower popularity. When two popularities match, the hashtag that comes earlier lexicographically…

Checking your access…