Design a Tiered Expiring Item Store
Last updated: August 12, 2026
Quick Overview
Design a class that implements a tiered expiring item store with methods to store and retrieve items based on specific conditions.
Akuna Capital
August 12, 20264
0
43 solved
Design a class that implements a tiered expiring item store with methods to store and retrieve items based on specific conditions.
This question is typically asked in a technical screen round for software engineering roles at Akuna Capital. The interviewer is evaluating the candidate's understanding of object-oriented design principles, their ability to implement complex logic, and their attention to detail in adhering to specific requirements. The candidate's approach to problem-solving and code organization will also be assessed.
What the Interviewer Expects
- Clearly define the class structure and initialization method.
- Implement store and retrieve methods with proper handling of expiration and tier levels.
- Prioritize retrieval based on item weight and ensure level constraints are met.
- Demonstrate understanding of edge cases and error handling.
- Write clean, maintainable, and efficient code.
Key Topics to Cover
How to Approach This
- Apply SOLID principles. Single Responsibility makes code testable, Open/Closed makes it extensible.
- Choose data structures based on access patterns, not familiarity.
- Prefer immutable data and message passing over shared mutable state for concurrency.
- Design APIs with RESTful conventions, versioning, meaningful errors, and pagination from day one.
Possible Follow-up Questions
- How would you modify your design to handle concurrent access?
- Can you explain your choice of data structures for this implementation?
- What would you do if the expiration logic needed to be more complex?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
To design a tiered expiring item store, we need to implement a class that allows us to store items in different tiers based on their expiration times and weights. The store should have methods to add ...
High-Level Design
The class will have the following key components:
- Item Class: Represents an item with attributes for weight, expiration timestamp, and tier level.
- TieredStore Class: Manages multiple tiers...