Skip to content

Reducing TreeNode size #2

@hongjisung

Description

@hongjisung

Problem :
this tree data structure has a large node size than other npm packages.
And 'insert' method is relatively slower than 'erase' method.
I think the reason of above situation is that 'insert' method handles node object creating and it affects to efficiency.

Unlike other packages, there are some additional elements in TreeNode.

  1. point parent node.
  2. get/set method.
  3. getPrev/getNext method.

but,

  1. is useful for backtracking.
  2. is good for knowing access restrictions.
  3. is good for acture use or method chaining.

how to treat this problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions