| 20 | DoublyLinkedListNode* head; |
| 21 | DoublyLinkedListNode* tail; |
| 22 | LRUCache(int capacity) : capacity(capacity) { |
| 23 | head = new DoublyLinkedListNode(-1, -1); |
| 24 | tail = new DoublyLinkedListNode(-1, -1); |
| 25 | head->next = tail; |
| 26 | tail->prev = head; |
| 27 | } |
| 28 | // Destructor: Cleans up dynamically allocated resources |
| 29 | // to prevent memory leaks. Implemented if time permits |
| 30 | // during an interview. |
nothing calls this directly
no outgoing calls
no test coverage detected