โ† Amazon questions

Top 5 frequent words in a stream of strings

Filed under Amazon

Given a continuous stream of strings, design a data structure or algorithm to efficiently find and return the top 5 most frequent words at any given time.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Amazon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.