← 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: Senior-Level
Round: Phone Screen · Type: Coding · Difficulty: 6/10 · Duration: 60 min · Interviewer: Neutral
Topics: Object-Oriented Programming, Data Structures
Location: San Francisco Bay Area
Interview date: 2025-08-09
Got offer: False
I was asked to design a CreditTracker class with methods to add credits with expiration times, subtract credits (prioritizing earliest expiration), and check credit balance at a given time.
I was asked to design a CreditTracker class with the following methods:
add_credit(start_time, end_time, credit)subtract_credit(time, credit) - Subtract the credit with the earliest expiration time.check_credit(time)The prompt specified that the times in add_credit and subtract_credit are not guaranteed to be in increasing order.