(child)
| 527 | } |
| 528 | |
| 529 | function inorder(child) { |
| 530 | // in-order so we add items as we encounter them in the tree, then we can insert them in expected order later |
| 531 | if (keyArray.includes(child.key)) { |
| 532 | inOrderKeys.set(child.key, i++); |
| 533 | } |
| 534 | } |
| 535 | |
| 536 | function postorder(child) { |
| 537 | // remove items and update the tree from the leaves and work upwards toward the root, this way |