(child)
| 518 | } |
| 519 | |
| 520 | function inorder(child) { |
| 521 | // in-order so we add items as we encounter them in the tree, then we can insert them in expected order later |
| 522 | if (keyArray.includes(child.key)) { |
| 523 | inOrderKeys.set(child.key, i++); |
| 524 | } |
| 525 | } |
| 526 | |
| 527 | function postorder(child) { |
| 528 | // remove items and update the tree from the leaves and work upwards toward the root, this way |