Skip to content

Instantly share code, notes, and snippets.

@mg11111
mg11111 / LRUCache.cpp
Created February 12, 2020 19:20
LRUCache Implementation using abstract class C++.
#include<iostream>
#include<bits/stdc++.h>
using namespace std;
struct Node{
Node *next,*prev;
int key,value;
Node(Node *p,Node *n, int k,int v):prev(p),next(n),key(k),value(v){};
Node(int k,int v):prev(NULL),next(NULL),key(k),value(v){};