Skip to content

Conversation

@trekhleb
Copy link
Owner

The LRUCache implementation example. The solution uses a HashMap for fast O(1) cache items access, and a DoublyLinkedList for fast O(1) cache items promotions and eviction (to keep the maximum allowed cache capacity).

@trekhlebtrekhleb merged commit e4f2ccd into masterJan 23, 2023
@trekhlebtrekhleb deleted the lru-cache branch January 23, 2023 17:03
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@trekhleb