Questions › Technical PM › Top-Interview
Implement an LRU cache with serialization and evolving constraints.
- Technical PM
- Top-Interview
- Medium
- 10 min
Focus on designing a Least Recently Used (LRU) cache that can efficiently store and retrieve data while also handling serialization for persistence. Start by outlining the core data structures you would use, such as a hash map for quick access and a doubly linked list for maintaining the order of usage. Discuss how you would implement the serialization process, ensuring that the cache state can be saved and restored effectively. Address the evolving constraints by considering how the cache should adapt to changes in size limits or data types, and be prepared to explain your choices regarding complexity and performance trade-offs.
What this question tests
- Technical PM
- Structured problem solving
- Communication
- Trade-off reasoning
Practise this question under interview conditions. Answer it out loud against a timer with an AI interviewer that asks follow-ups, then review the scored report.
Related Technical PM questions
- Find the number of users who called three or more people in the last week.Top-Interview · Technical PM · Easy
- What percentage of users who were active on Messenger yesterday made a video call yesterday?Top-Interview · Technical PM · Easy
- Find the sum of all elements in a binary tree that fall within the range [low, high], where 'low' and 'high' are integers.Top-Interview · Technical PM · Easy
- Design a web service for asynchronous communication.Top-Interview · Technical PM · Easy
- Design browser history.Top-Interview · Technical PM · Easy
- Design an app suggestion system for phones.Top-Interview · Technical PM · Easy
All Technical PM questions · Product manager interview questions by skill area