Fixed-Capacity In-Memory Image Cache
Asked at Mobile · Mobile Engineering (Android/iOS) · Difficulty: Medium
Design a fixed-capacity cache that keeps recently used items in memory and drops the least-recently-used one when it is full. An image-loading library uses exactly this kind of cache for decoded bitmaps.
Loading the problem…
More Mobile interview questions
- Activity Lifecycle Configuration Changes and Process Death
- Design an Image Loading and Caching Library
- SwiftUI State Management Property Wrappers
- ARC Retain Cycles and weak vs unowned
- Jetpack Compose Recomposition State and Stability
- GCD vs Swift async-await Concurrency