Skip to content

Instantly share code, notes, and snippets.

View serdarmumcu's full-sized avatar

serdarmumcu serdarmumcu

View GitHub Profile
@serdarmumcu
serdarmumcu / LRUCache.java
Created July 30, 2020 18:44
LRU Cache Java Implementation
package com.yazilimmimari.hackerrank;
import java.util.LinkedHashMap;
import java.util.Map;
public class LRUCache<S,T> {
LinkedHashMap<S,T> cache;
int capacity;
LRUCache(int capacity) {
cache = new LinkedHashMap<>(capacity);