Amazon phone interview

Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2024-05-03Added By Anonymous
Source: Link

Company: Amazon
Role: unknown
Interview Stage: Phone Screen
Location: unknown
Year: unknown

Original Post Content:

Recently appeared for phone interview. I was asked following question:
Create a hashmap implementation with get and put methods, along with an additional method, getAverage, which returns the number of get and put queries made in the last five minutes.
Follow up - there would be millions of queries per minute. How would you scale your solution?

Comments