Level: Senior-Level
Round: Phone Screen · Type: Coding · Difficulty: 3/10 · Duration: 60 min · Interviewer: Friendly
Topics: Algorithm Design, Data Structures, Hash Table, Linked List, LRU Cache
Location: San Francisco Bay Area
Interview date: 2025-05-15
Got offer: False
Question: The interview was a pleasant discussion of algorithms with the interviewer. The question was a combination of LeetCode 146 (LRU Cache) and LeetCode 981 (Time Based Key-Value Store). The interviewer added a getAverage method to the LeetCode 981 problem, challenging me to optimize its time complexity. Then the interviewer combined it with LeetCode 146, and asked me to retain only one key and update the value.
The phone screen involved a combined problem based on LeetCode 146 and LeetCode 981.
Initially, the interviewer presented a variation of LeetCode 981, adding a getAverage method and asking me to optimize its time complexity.
Then, the problem evolved to incorporate aspects of LeetCode 146, requiring me to retain only one key and update its value. I discussed the LRU cache implementation using a doubly linked list and a dictionary.
I ran out of time before finishing the code implementation.
Preparation Tips:
LeetCode similar: LeetCode 146, LeetCode 981