Open nblintao opened 7 years ago
In LRU Cache, after moving a node in the list to the front, it updated cacheMap[key] to cacheList.begin().
cacheMap[key]
cacheList.begin()
But I don't think the iterator to the node will be changed after splicing.
In LRU Cache, after moving a node in the list to the front, it updated
cacheMap[key]
tocacheList.begin()
.But I don't think the iterator to the node will be changed after splicing.