간단할 꺼라 생각했던 문제인데 생각외로 많은 시간이 걸렸다. 링크드 리스트 구현에서 애먹을 줄은 몰랐다. 이럴땐 계속해서 고쳐나가기 보다, 처음부터 다시 짜보는게 더 빠를때도 있는게 그게 바로 오늘인듯 싶다. class LRUCache : public Cache{ public : LRUCache(int cpVal) { cp = cpVal; } void set(int key,int value){ Node *node = new Node(key,value); if(mp.find(key) != mp.end()) { Node *nodePtr = head; while(nodePtr->key != node->key) { nodePtr = node->next; } nodePtr->prev->next = nodePtr-..