I had a 45-minute technical phone screen with Decagon that included a brief introduction, a Python coding exercise on CoderPad, and time for questions at the end. The coding problem involved implementing a customer satisfaction tracking system that calculates average CSAT scores within a sliding time window. The follow-ups introduced score updates, expired record cleanup, duplicate timestamps, and time and space complexity analysis. I ultimately did not pass, although my overall interview experience was positive.
The interviewer asked me to implement a class called CSATTracker to track customer satisfaction scores over time. The class needed to support recording scores and calculating their average within a configurable time window. I was provided with API descriptions and test cases in the CoderPad environment.
The initial interface included the following operations:
The constructor accepted a window_size specifying the duration of the sliding window. All average calculations needed to consider only records within this window.
Record — Store a Customer Satisfaction Score
The record method accepted three parameters:
conversation_id: An identifier associated with a customer conversation.
score: A customer satisfaction rating between 1 and 5.
timestamp: The time at which the rating was recorded.
The system needed to keep track of these ratings so they could be included in future average calculations.
Get Average — Calculate the Current CSAT Score
The get_average(current_time) method needed to return the average satisfaction score of all records within the active time window. If there were no qualifying records, the method had to return None. The interviewer specified that records exactly on the left boundary
Unlock Full Details
Create a free account to unlock this interview experience report.