Back to Questions

Implement a Map with Time Expiration (Heap/Set)

57.1K viewsAsked at Apple
Hard

Question Explain

Design a map where keys expire after a specified duration. Use a combination of a Hash Map for storage and a Min-Heap for managing expiration times efficiently.

Start Trying This Question Simulation

Practice answering orally or with text to get instant AI feedback.

Practice with This Question