* This does not mark `children` as shared, so it is the responsibility of the caller * to ensure children are either marked shared, or aren't included in another tree.
(children: Array<BNode<K, V>>, keys?: Array<K>)
| 700 | * to ensure children are either marked shared, or aren't included in another tree. |
| 701 | */ |
| 702 | constructor(children: Array<BNode<K, V>>, keys?: Array<K>) { |
| 703 | if (!keys) { |
| 704 | keys = [] |
| 705 | for (let i = 0; i < children.length; i++) keys[i] = children[i]!.maxKey()! |
| 706 | } |
| 707 | super(keys) |
| 708 | this.children = children |
| 709 | } |
| 710 | |
| 711 | minKey() { |
| 712 | return this.children[0]!.minKey() |