Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LRU Cache: Not necessary to update cacheMap after splice #89

Open
nblintao opened this issue Oct 3, 2016 · 0 comments
Open

LRU Cache: Not necessary to update cacheMap after splice #89

nblintao opened this issue Oct 3, 2016 · 0 comments

Comments

@nblintao
Copy link

nblintao commented Oct 3, 2016

In LRU Cache, after moving a node in the list to the front, it updated cacheMap[key] to cacheList.begin().

But I don't think the iterator to the node will be changed after splicing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant