Daily iOS
CS fundamentals and algorithmsPayPal

LRU cache with TTL

You've implemented an LRU cache and the interviewer follows up: "Now make each entry expire a fixed time after it's stored. What gets more expensive?" Explain the cheapest way to check expiry and what that approach costs you.

Submit