LRU Cache

A simple LRU cache implementation inspired by LeetCode's problem

Developing

Build

./gradlew build

Test

./gradlew test

Example of Usage

LRUCache<String, String> cache = new LRUCache<>(2 /* capacity */);

cache.put("Hi", "Hi");
cache.put("Bye", "Bye");
cache.put("No", "No"); // deletes "Hi"

cache.get("Hi") // returns null