Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8188031
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T02:45:58+00:00 2026-06-07T02:45:58+00:00

This was an interview question that someone asked me and I didn’t really have

  • 0

This was an interview question that someone asked me and I didn’t really have a good answer. I was wondering if someone could possibly help me understand the solution to this:

“You have a stream of billion tweets coming in. How will you figure out the top 10 hashtags ? “

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T02:46:01+00:00Added an answer on June 7, 2026 at 2:46 am

    Create a map, with a hashtag as the key and a counter as a value.

    Increment the counter of each tag in each tweet you receive.

    Examine the value of the counters to find the top 10.

    Your phrasing of the question doesn’t include any constraints that would prohibit this straightforward solution. In an interview situation, I would have asked clarifying questions to elicit these constraints.

    Under constraints like, “it has to run in linear time,” and, “it has to use a constant amount of memory,” much more interesting answers emerge.


    I am not sure if there is a constant memory solution to the problem as posed, but I know one for a related (and often more useful) problem: identifying elements that constitute a given fraction of results. I gave it as an answer to a similar question.

    (I say, “more useful”, because if the total fraction of a given item falls below a threshold, it’s more likely to be noise than true “Top 10” material.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In an interview this is the question that is asked: You have to write
Yesterday in my interview I was asked this question. (At that time I was
I was asked this question in a .net/C# interview: If we have two threads
This is an interview question. I have no idea how to solve it. could
This is an interview Question that i was asked recently: Write a C program
I was asked this interview question today!! (it was a really awkward telephonic interview..):
Just finished reading this blog post: http://www.skorks.com/2010/03/an-interview-question-that-prints-out-its-own-source-code-in-ruby/ In it, the author argues the case
I am preparing for my interview and came across this question: Consider that i
This is an interview question asked a month ago.... Do session use cookies? If
This is an interview question. I have K machines each of which is connected

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.