Algorithms and Data Structures: TheAlgorist.com
System Design: SystemsDesign.Cloud
Low Level Design: LowLevelDesign.io
Frontend Engineering: FrontendEngineering.io
Problem Statement:Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and put.
getContent(key) - Get the value of the key if the key exists in the cache.
insertContent(key, value) - Set or insert the value if the key is not already present. When the cache reached its capacity, it should invalidate the least recently used item before inserting a new item.
Java and Python Solution:
This is a Premium Content.
Please subscribe to Low Level Design course to access the content.
If you have any feedback, please use this form: https://thealgorists.com/Feedback.
Follow Us On LinkedIn