← Back to experiences
[ OK ] Loaded —
[ INFO ]
$ cd
$ ls -lt
01
02
03
04
05
$ ls -lt
01
02
03
04
05
user@intervues:~/experiences/…$
Level: Mid-Level
Round: Phone Screen · Type: Coding · Difficulty: 7/10 · Duration: 60 min · Interviewer: Unfriendly
Topics: Concurrency, Data Structures, Algorithms
Location: Los Gatos, CA
Interview date: 2025-12-31
I was asked to design a Latency Tracker class.
The class needs to provide two functionalities:
The class needs to support concurrency.
The coding question I got was to implement a Latency Tracker class with the following functionalities:
` class LatencyTracker: def init(self): # Implementation details pass
def store_latency(self, timestamp, latency_ms):
# Stores latency sample with timestamp
pass
def get_percentile_latency(self, time_window, percentile):
# Returns the specified percentile latency within the given time window
pass
`
My approach:
store_latency method to handle concurrent writes.get_percentile_latency method, ensuring it can handle concurrent reads and writes.Key insights: