Problem 460 · Hard

LFU Cache

Three hash maps tracking key→value, key→freq, and freq→LRU list; O(1) get/put.

Open the interactive visualisation