Skip to main content
LFU Cache | AlgoCracked
AlgoCracked
ProblemsLFU Cache
Hard43.0% acceptance
Hash TableLinked ListDesignDoubly Linked List

LFU Cache

Design a least-frequently-used cache. On overflow evict the least-frequently-used key; break ties by evicting the least-recently-used among them. get / put run in O(1) average. LFUCache(capacity) constructs it. Input format Operation names + parallel argument lists.

Loading workspace…