Click here to Skip to main content
15,899,679 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I was asked this question to test my knowledge of scalability. There are a stream of numbers and I have to return a histogram representing these numbers. I asked questions like what would be the range of the numbers and what would be the bucket size of the histograms etc. to which he responded that I could select the bucket size and I don't have to rescale the buckets etc. So my solution was that as I receive a number I will update a counter for a particular bucket. In the end I will return back the buckets like 0-100,101-200 and the corresponding count of each bucket. I didn't get through the interview and I was wondering as to what would be a suitable answer to a question like this
Posted

1 solution

As you have already been told, there is no suitable answer apart from the one the interviewer was expecting. If you want to pass an interview, the only way is to have a good understanding of, and experience in, the subject role that you are interviwiewing for.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900