matchit icon indicating copy to clipboard operation
matchit copied to clipboard

Node removal optimisation

Open Totodore opened this issue 1 year ago • 0 comments

Currently when a node is removed from the tree there is no mechanism to check for optimisations.

Here is a non-exhaustive list of the possible things to do:

  • Rewind the branch and check if nodes can be removed (only one child without value). Stop at the first non-removable node.
  • Rewind the branch and check if nodes can be merged together (only one, non-wild child that doesn't have a value).

Totodore avatar May 29 '24 15:05 Totodore