Design service like Clipboard. (try to store the maximum clips)
MediumImagine you're building a design service, like Figma or Sketch. One crucial feature is the clipboard, allowing users to copy and paste design elements between different parts of their design or even between different design files. However, memory isn't infinite. We want to implement a clipboard that intelligently manages the number of design elements it stores, prioritizing recently used elements. The clipboard should efficiently handle add, remove, and paste operations. Our goal is to design a memory-efficient clipboard service that can store a maximum number of "Clips" (design elements). This service should follow good software design principles, be easily extensible, and thread-safe.
Requirements
Interview Simulation
Experience a realistic interview conversation. The interviewer will ask clarifying questions,and you'll reveal your understanding of the requirements.
Let's start by understanding the scope. What are the core functionalities this system needs to provide?
💡 Interview Tip
Identify the Actors (Who uses the system?) and their Use Cases (What are they trying to achieve?). Start with the 'Happy Path' scenarios.