Skip to content

Barcelona | OCT-2025-2 | Iheb Hamdi | Sprint 2 |Implement an LRU cache in Python| Module-Complexity - #3

Open
hamdiheb wants to merge 6 commits into
mainfrom
sprint2/lru_cache
Open

Barcelona | OCT-2025-2 | Iheb Hamdi | Sprint 2 |Implement an LRU cache in Python| Module-Complexity#3
hamdiheb wants to merge 6 commits into
mainfrom
sprint2/lru_cache

Conversation

@hamdiheb

Copy link
Copy Markdown
Owner

Summary

  • Implemented LruCache
  • LruCache(limit) raises ValueError for a non-positive limit
  • get and set both move the accessed entry to the front of the list (counts as a use)
  • set evicts the least-recently-used entry (the node before the tail sentinel) once limit is exceeded

Sign up for free to 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.

1 participant