Skip to content

Why the LRUCache implementation is using Array over the Doubly Linked List with Map? #700

Open
@kuldeepsingh-d11

Description

@kuldeepsingh-d11

Is there any specific reason for using Array instead of Doubly Linked List implementation.
Right now the time complexities for get function is O(n), and not sure about the set function complexity as unshift functions complexity can be O(n) or O(1) depending on the JS engine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions