Skip to content

Scapegoat trees #38

Open
Open
@make-github-pseudonymous-again

Description

No description provided.

Activity

make-github-pseudonymous-again

make-github-pseudonymous-again commented on Nov 24, 2018

@make-github-pseudonymous-again
OwnerAuthor

Insertion only:

At each node remember:

  • a counter initialized to the size of its subtree
  • a counter initialized to 0
    When inserting a new node increment the second counter of each ancestor
    If one of those second counters becomes equal to the first counter of the same node, rebuild its subtree from scratch in a balanced way.
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

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @make-github-pseudonymous-again

        Issue actions

          Scapegoat trees · Issue #38 · make-github-pseudonymous-again/js-data-structures