The data structure of double linked list + hash table. The nodes of the linked list serve as the keys of the hash table. For a doubly linked list, we can maintain the head pointer and tail pointer to achieve head and tail insertion O(1), and the hash table can achieve query O(1). This data structure is very commonly used, see leetcode’s classic question LRU
The data structure of double linked list + hash table. The nodes of the linked list serve as the keys of the hash table. For a doubly linked list, we can maintain the head pointer and tail pointer to achieve head and tail insertion O(1), and the hash table can achieve query O(1). This data structure is very commonly used, see leetcode’s classic question LRU
arraylist set get快 linkedlist add remove 快
"Backend" obviously refers to the linked list, the query speed is fast, it seems to be talking about LinkedHashMap.
LinkedHashMap is a double linked list + hash table structure.