Citadel SWE Interview Question 2023 November | Design | on-campus
Citadel · Question · Posted Jun 2026
Question 1: LRU Cache Problem Statement Design a data structure that follows the constraints of a Least Recently Used (LRU) cache. Implement the LRUCache class with capacity cap. The cache evicts the least recently used key when it exceeds capacity. LRUCache(int capacity) — initialize LRU cache with positive capacity int get(int key) — return value if key exists, otherwise return -1 void put(int key, int value) — update value if key exists; otherwise insert. If capacity is exceeded, evict the ...
The full answer & interview discussion are available to premium members.
Log in Create a free account