Skip to content
RED SAG Skills
medium10 pts · first answer countshash-mapcountingbucket-sort

Top k frequent elements faster than sorting

After counting frequencies in a map, how can you get the k most frequent values in O(n)?

Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions