Skip to content

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

Description

@nblintao

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions