Implement LRU Cache

Problem Statement

Implement an LRU (Least Recently Used) cache. It should support the following operations: get and put.

  • get(key) - Get the value (will always be a positive integer) of t...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: