class LRUCache提供两个接口:get(int key)和set(int key,value)
#include using namespace std; class LRUCache{ public: LRUCache(int cap):current(0),capacity(cap){ A=new node[cap]; } int get(int key) { for(int i=0;i 测试: