LRU Cache with Fewer Recency Writes and Concurrent Access

Quick Overview

Implement a fixed-capacity least-recently-used cache with constant-time get and put, then discuss two follow-ups: cutting the shared-state writes that every read causes when it updates recency, and making the cache safe and fast under concurrent access, including how eviction order changes.

LRU Cache with Fewer Recency Writes and Concurrent Access

Company: Apple

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: medium

Interview Round: Onsite

Overview: Implement a fixed-capacity least-recently-used cache with constant-time get and put, then discuss two follow-ups: cutting the shared-state writes that every read causes when it updates recency, and making the cache safe and fast under concurrent access, including how eviction order changes.

Read the full Apple Software Engineer interview experience this question came from

Apple logo
Apple
Aug 31, 2026
mediumSoftware EngineerOnsiteSoftware Engineering Fundamentals
6
0
Loading...