binary-tree-typed 2.5.2 → 2.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +194 -55
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs-legacy/index.cjs +194 -55
- package/dist/cjs-legacy/index.cjs.map +1 -1
- package/dist/esm/index.mjs +194 -55
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm-legacy/index.mjs +194 -55
- package/dist/esm-legacy/index.mjs.map +1 -1
- package/dist/types/data-structures/binary-tree/avl-tree.d.ts +50 -2
- package/dist/types/data-structures/binary-tree/binary-indexed-tree.d.ts +56 -0
- package/dist/types/data-structures/binary-tree/binary-tree.d.ts +116 -15
- package/dist/types/data-structures/binary-tree/bst.d.ts +99 -3
- package/dist/types/data-structures/binary-tree/red-black-tree.d.ts +79 -8
- package/dist/types/data-structures/binary-tree/segment-tree.d.ts +24 -0
- package/dist/types/data-structures/binary-tree/tree-map.d.ts +520 -1
- package/dist/types/data-structures/binary-tree/tree-multi-map.d.ts +489 -1
- package/dist/types/data-structures/binary-tree/tree-multi-set.d.ts +393 -1
- package/dist/types/data-structures/binary-tree/tree-set.d.ts +500 -1
- package/dist/types/data-structures/graph/directed-graph.d.ts +40 -0
- package/dist/types/data-structures/graph/undirected-graph.d.ts +36 -0
- package/dist/types/data-structures/hash/hash-map.d.ts +51 -6
- package/dist/types/data-structures/heap/heap.d.ts +98 -12
- package/dist/types/data-structures/linked-list/doubly-linked-list.d.ts +75 -0
- package/dist/types/data-structures/linked-list/singly-linked-list.d.ts +61 -1
- package/dist/types/data-structures/linked-list/skip-linked-list.d.ts +72 -0
- package/dist/types/data-structures/matrix/matrix.d.ts +32 -0
- package/dist/types/data-structures/queue/deque.d.ts +82 -0
- package/dist/types/data-structures/queue/queue.d.ts +61 -0
- package/dist/types/data-structures/stack/stack.d.ts +42 -2
- package/dist/types/data-structures/trie/trie.d.ts +48 -0
- package/dist/types/interfaces/binary-tree.d.ts +2 -3
- package/dist/umd/binary-tree-typed.js +194 -55
- package/dist/umd/binary-tree-typed.js.map +1 -1
- package/dist/umd/binary-tree-typed.min.js +5 -5
- package/dist/umd/binary-tree-typed.min.js.map +1 -1
- package/package.json +2 -2
- package/src/data-structures/binary-tree/avl-tree.ts +52 -5
- package/src/data-structures/binary-tree/binary-indexed-tree.ts +56 -0
- package/src/data-structures/binary-tree/binary-tree.ts +167 -81
- package/src/data-structures/binary-tree/bst.ts +101 -7
- package/src/data-structures/binary-tree/red-black-tree.ts +82 -15
- package/src/data-structures/binary-tree/segment-tree.ts +24 -0
- package/src/data-structures/binary-tree/tree-map.ts +540 -3
- package/src/data-structures/binary-tree/tree-multi-map.ts +490 -2
- package/src/data-structures/binary-tree/tree-multi-set.ts +393 -1
- package/src/data-structures/binary-tree/tree-set.ts +520 -3
- package/src/data-structures/graph/directed-graph.ts +41 -1
- package/src/data-structures/graph/undirected-graph.ts +37 -1
- package/src/data-structures/hash/hash-map.ts +67 -12
- package/src/data-structures/heap/heap.ts +107 -19
- package/src/data-structures/linked-list/doubly-linked-list.ts +88 -0
- package/src/data-structures/linked-list/singly-linked-list.ts +61 -1
- package/src/data-structures/linked-list/skip-linked-list.ts +72 -0
- package/src/data-structures/matrix/matrix.ts +32 -0
- package/src/data-structures/queue/deque.ts +85 -0
- package/src/data-structures/queue/queue.ts +73 -0
- package/src/data-structures/stack/stack.ts +45 -5
- package/src/data-structures/trie/trie.ts +48 -0
- package/src/interfaces/binary-tree.ts +1 -9
|
@@ -797,6 +797,10 @@ var _Queue = class _Queue extends LinearBase {
|
|
|
797
797
|
|
|
798
798
|
|
|
799
799
|
|
|
800
|
+
|
|
801
|
+
|
|
802
|
+
|
|
803
|
+
|
|
800
804
|
|
|
801
805
|
|
|
802
806
|
|
|
@@ -847,6 +851,10 @@ var _Queue = class _Queue extends LinearBase {
|
|
|
847
851
|
|
|
848
852
|
|
|
849
853
|
|
|
854
|
+
|
|
855
|
+
|
|
856
|
+
|
|
857
|
+
|
|
850
858
|
|
|
851
859
|
|
|
852
860
|
|
|
@@ -861,6 +869,14 @@ var _Queue = class _Queue extends LinearBase {
|
|
|
861
869
|
get first() {
|
|
862
870
|
return this.length > 0 ? this.elements[this._offset] : void 0;
|
|
863
871
|
}
|
|
872
|
+
/**
|
|
873
|
+
* Peek at the front element without removing it (alias for `first`).
|
|
874
|
+
* @remarks Time O(1), Space O(1)
|
|
875
|
+
* @returns Front element or undefined.
|
|
876
|
+
*/
|
|
877
|
+
peek() {
|
|
878
|
+
return this.first;
|
|
879
|
+
}
|
|
864
880
|
/**
|
|
865
881
|
* Get the last element (back) without removing it.
|
|
866
882
|
* @remarks Time O(1), Space O(1)
|
|
@@ -913,6 +929,10 @@ var _Queue = class _Queue extends LinearBase {
|
|
|
913
929
|
|
|
914
930
|
|
|
915
931
|
|
|
932
|
+
|
|
933
|
+
|
|
934
|
+
|
|
935
|
+
|
|
916
936
|
|
|
917
937
|
|
|
918
938
|
|
|
@@ -975,6 +995,10 @@ var _Queue = class _Queue extends LinearBase {
|
|
|
975
995
|
|
|
976
996
|
|
|
977
997
|
|
|
998
|
+
|
|
999
|
+
|
|
1000
|
+
|
|
1001
|
+
|
|
978
1002
|
|
|
979
1003
|
|
|
980
1004
|
|
|
@@ -1044,6 +1068,10 @@ var _Queue = class _Queue extends LinearBase {
|
|
|
1044
1068
|
|
|
1045
1069
|
|
|
1046
1070
|
|
|
1071
|
+
|
|
1072
|
+
|
|
1073
|
+
|
|
1074
|
+
|
|
1047
1075
|
|
|
1048
1076
|
|
|
1049
1077
|
|
|
@@ -1103,6 +1131,10 @@ var _Queue = class _Queue extends LinearBase {
|
|
|
1103
1131
|
|
|
1104
1132
|
|
|
1105
1133
|
|
|
1134
|
+
|
|
1135
|
+
|
|
1136
|
+
|
|
1137
|
+
|
|
1106
1138
|
|
|
1107
1139
|
|
|
1108
1140
|
|
|
@@ -1155,6 +1187,10 @@ var _Queue = class _Queue extends LinearBase {
|
|
|
1155
1187
|
|
|
1156
1188
|
|
|
1157
1189
|
|
|
1190
|
+
|
|
1191
|
+
|
|
1192
|
+
|
|
1193
|
+
|
|
1158
1194
|
|
|
1159
1195
|
|
|
1160
1196
|
|
|
@@ -1206,6 +1242,21 @@ var _Queue = class _Queue extends LinearBase {
|
|
|
1206
1242
|
this._elements[this._offset + index] = newElement;
|
|
1207
1243
|
return true;
|
|
1208
1244
|
}
|
|
1245
|
+
/**
|
|
1246
|
+
* Delete the first element that satisfies a predicate.
|
|
1247
|
+
* @remarks Time O(N), Space O(N)
|
|
1248
|
+
* @param predicate - Function (value, index, queue) → boolean to decide deletion.
|
|
1249
|
+
* @returns True if a match was removed.
|
|
1250
|
+
*/
|
|
1251
|
+
deleteWhere(predicate) {
|
|
1252
|
+
for (let i = 0; i < this.length; i++) {
|
|
1253
|
+
if (predicate(this._elements[this._offset + i], i, this)) {
|
|
1254
|
+
this.deleteAt(i);
|
|
1255
|
+
return true;
|
|
1256
|
+
}
|
|
1257
|
+
}
|
|
1258
|
+
return false;
|
|
1259
|
+
}
|
|
1209
1260
|
/**
|
|
1210
1261
|
* Reverse the queue in-place by compacting then reversing.
|
|
1211
1262
|
* @remarks Time O(N), Space O(N)
|
|
@@ -1248,6 +1299,10 @@ var _Queue = class _Queue extends LinearBase {
|
|
|
1248
1299
|
|
|
1249
1300
|
|
|
1250
1301
|
|
|
1302
|
+
|
|
1303
|
+
|
|
1304
|
+
|
|
1305
|
+
|
|
1251
1306
|
|
|
1252
1307
|
|
|
1253
1308
|
|
|
@@ -1294,6 +1349,10 @@ var _Queue = class _Queue extends LinearBase {
|
|
|
1294
1349
|
|
|
1295
1350
|
|
|
1296
1351
|
|
|
1352
|
+
|
|
1353
|
+
|
|
1354
|
+
|
|
1355
|
+
|
|
1297
1356
|
|
|
1298
1357
|
|
|
1299
1358
|
|
|
@@ -1363,6 +1422,10 @@ var _Queue = class _Queue extends LinearBase {
|
|
|
1363
1422
|
|
|
1364
1423
|
|
|
1365
1424
|
|
|
1425
|
+
|
|
1426
|
+
|
|
1427
|
+
|
|
1428
|
+
|
|
1366
1429
|
|
|
1367
1430
|
|
|
1368
1431
|
|
|
@@ -1416,6 +1479,10 @@ var _Queue = class _Queue extends LinearBase {
|
|
|
1416
1479
|
|
|
1417
1480
|
|
|
1418
1481
|
|
|
1482
|
+
|
|
1483
|
+
|
|
1484
|
+
|
|
1485
|
+
|
|
1419
1486
|
|
|
1420
1487
|
|
|
1421
1488
|
|
|
@@ -1473,6 +1540,10 @@ var _Queue = class _Queue extends LinearBase {
|
|
|
1473
1540
|
|
|
1474
1541
|
|
|
1475
1542
|
|
|
1543
|
+
|
|
1544
|
+
|
|
1545
|
+
|
|
1546
|
+
|
|
1476
1547
|
|
|
1477
1548
|
|
|
1478
1549
|
|
|
@@ -1952,7 +2023,7 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
1952
2023
|
}
|
|
1953
2024
|
/**
|
|
1954
2025
|
* Adds a new node to the tree.
|
|
1955
|
-
* @remarks Time O(
|
|
2026
|
+
* @remarks Time O(N) — level-order traversal to find an empty slot. Space O(N) for the BFS queue. BST/Red-Black Tree/AVL Tree subclasses override to O(log N).
|
|
1956
2027
|
*
|
|
1957
2028
|
* @param keyNodeOrEntry - The key, node, or entry to add.
|
|
1958
2029
|
* @returns True if the addition was successful, false otherwise.
|
|
@@ -1981,6 +2052,10 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
1981
2052
|
|
|
1982
2053
|
|
|
1983
2054
|
|
|
2055
|
+
|
|
2056
|
+
|
|
2057
|
+
|
|
2058
|
+
|
|
1984
2059
|
|
|
1985
2060
|
|
|
1986
2061
|
|
|
@@ -2000,7 +2075,7 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2000
2075
|
}
|
|
2001
2076
|
/**
|
|
2002
2077
|
* Adds or updates a new node to the tree.
|
|
2003
|
-
* @remarks Time O(
|
|
2078
|
+
* @remarks Time O(N) — level-order traversal to find an empty slot. Space O(N) for the BFS queue. BST/Red-Black Tree/AVL Tree subclasses override to O(log N).
|
|
2004
2079
|
*
|
|
2005
2080
|
* @param keyNodeOrEntry - The key, node, or entry to set or update.
|
|
2006
2081
|
* @param [value] - The value, if providing just a key.
|
|
@@ -2035,6 +2110,10 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2035
2110
|
|
|
2036
2111
|
|
|
2037
2112
|
|
|
2113
|
+
|
|
2114
|
+
|
|
2115
|
+
|
|
2116
|
+
|
|
2038
2117
|
|
|
2039
2118
|
|
|
2040
2119
|
|
|
@@ -2141,6 +2220,10 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2141
2220
|
|
|
2142
2221
|
|
|
2143
2222
|
|
|
2223
|
+
|
|
2224
|
+
|
|
2225
|
+
|
|
2226
|
+
|
|
2144
2227
|
|
|
2145
2228
|
|
|
2146
2229
|
|
|
@@ -2183,6 +2266,10 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2183
2266
|
|
|
2184
2267
|
|
|
2185
2268
|
|
|
2269
|
+
|
|
2270
|
+
|
|
2271
|
+
|
|
2272
|
+
|
|
2186
2273
|
|
|
2187
2274
|
|
|
2188
2275
|
|
|
@@ -2246,6 +2333,10 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2246
2333
|
|
|
2247
2334
|
|
|
2248
2335
|
|
|
2336
|
+
|
|
2337
|
+
|
|
2338
|
+
|
|
2339
|
+
|
|
2249
2340
|
|
|
2250
2341
|
|
|
2251
2342
|
|
|
@@ -2262,22 +2353,66 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2262
2353
|
this.setMany(anotherTree, []);
|
|
2263
2354
|
}
|
|
2264
2355
|
/**
|
|
2265
|
-
*
|
|
2266
|
-
* @remarks Time O(N)
|
|
2356
|
+
* Deletes a node from the tree (internal, returns balancing metadata).
|
|
2357
|
+
* @remarks Time O(N) — O(N) to find the node + O(H) for predecessor swap. Space O(1). BST/Red-Black Tree/AVL Tree subclasses override to O(log N).
|
|
2358
|
+
* @internal Used by AVL/BST subclasses that need balancing metadata after deletion.
|
|
2267
2359
|
*
|
|
2268
|
-
* @param
|
|
2269
|
-
* @
|
|
2360
|
+
* @param keyNodeEntryRawOrPredicate - The node to delete.
|
|
2361
|
+
* @returns An array containing deletion results with balancing metadata.
|
|
2270
2362
|
*/
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
this.
|
|
2363
|
+
_deleteInternal(keyNodeEntryRawOrPredicate) {
|
|
2364
|
+
const deletedResult = [];
|
|
2365
|
+
if (!this._root) return deletedResult;
|
|
2366
|
+
const curr = this.getNode(keyNodeEntryRawOrPredicate);
|
|
2367
|
+
if (!curr) return deletedResult;
|
|
2368
|
+
const parent = curr == null ? void 0 : curr.parent;
|
|
2369
|
+
let needBalanced;
|
|
2370
|
+
let orgCurrent = curr;
|
|
2371
|
+
if (!curr.left && !curr.right && !parent) {
|
|
2372
|
+
this._setRoot(void 0);
|
|
2373
|
+
} else if (curr.left) {
|
|
2374
|
+
const leftSubTreeRightMost = this.getRightMost((node) => node, curr.left);
|
|
2375
|
+
if (leftSubTreeRightMost) {
|
|
2376
|
+
const parentOfLeftSubTreeMax = leftSubTreeRightMost.parent;
|
|
2377
|
+
orgCurrent = this._swapProperties(curr, leftSubTreeRightMost);
|
|
2378
|
+
if (this._isMapMode) {
|
|
2379
|
+
this._store.set(curr.key, curr);
|
|
2380
|
+
this._store.set(leftSubTreeRightMost.key, leftSubTreeRightMost);
|
|
2381
|
+
}
|
|
2382
|
+
if (parentOfLeftSubTreeMax) {
|
|
2383
|
+
if (parentOfLeftSubTreeMax.right === leftSubTreeRightMost)
|
|
2384
|
+
parentOfLeftSubTreeMax.right = leftSubTreeRightMost.left;
|
|
2385
|
+
else parentOfLeftSubTreeMax.left = leftSubTreeRightMost.left;
|
|
2386
|
+
needBalanced = parentOfLeftSubTreeMax;
|
|
2387
|
+
}
|
|
2388
|
+
}
|
|
2389
|
+
} else if (parent) {
|
|
2390
|
+
const { familyPosition: fp } = curr;
|
|
2391
|
+
if (fp === "LEFT" || fp === "ROOT_LEFT") {
|
|
2392
|
+
parent.left = curr.right;
|
|
2393
|
+
} else if (fp === "RIGHT" || fp === "ROOT_RIGHT") {
|
|
2394
|
+
parent.right = curr.right;
|
|
2395
|
+
}
|
|
2396
|
+
needBalanced = parent;
|
|
2397
|
+
} else {
|
|
2398
|
+
this._setRoot(curr.right);
|
|
2399
|
+
curr.right = void 0;
|
|
2400
|
+
}
|
|
2401
|
+
this._size = this._size - 1;
|
|
2402
|
+
deletedResult.push({ deleted: orgCurrent, needBalanced });
|
|
2403
|
+
if (this._isMapMode && orgCurrent) this._store.delete(orgCurrent.key);
|
|
2404
|
+
return deletedResult;
|
|
2274
2405
|
}
|
|
2275
2406
|
/**
|
|
2276
2407
|
* Deletes a node from the tree.
|
|
2277
|
-
* @remarks Time O(
|
|
2408
|
+
* @remarks Time O(N) — O(N) to find the node + O(H) for predecessor swap. Space O(1). BST/Red-Black Tree/AVL Tree subclasses override to O(log N).
|
|
2278
2409
|
*
|
|
2279
2410
|
* @param keyNodeEntryRawOrPredicate - The node to delete.
|
|
2280
|
-
* @returns
|
|
2411
|
+
* @returns True if the node was found and deleted, false otherwise.
|
|
2412
|
+
|
|
2413
|
+
|
|
2414
|
+
|
|
2415
|
+
|
|
2281
2416
|
|
|
2282
2417
|
|
|
2283
2418
|
|
|
@@ -2321,51 +2456,11 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2321
2456
|
* console.log(tree.size); // 4;
|
|
2322
2457
|
*/
|
|
2323
2458
|
delete(keyNodeEntryRawOrPredicate) {
|
|
2324
|
-
|
|
2325
|
-
if (!this._root) return deletedResult;
|
|
2326
|
-
const curr = this.getNode(keyNodeEntryRawOrPredicate);
|
|
2327
|
-
if (!curr) return deletedResult;
|
|
2328
|
-
const parent = curr == null ? void 0 : curr.parent;
|
|
2329
|
-
let needBalanced;
|
|
2330
|
-
let orgCurrent = curr;
|
|
2331
|
-
if (!curr.left && !curr.right && !parent) {
|
|
2332
|
-
this._setRoot(void 0);
|
|
2333
|
-
} else if (curr.left) {
|
|
2334
|
-
const leftSubTreeRightMost = this.getRightMost((node) => node, curr.left);
|
|
2335
|
-
if (leftSubTreeRightMost) {
|
|
2336
|
-
const parentOfLeftSubTreeMax = leftSubTreeRightMost.parent;
|
|
2337
|
-
orgCurrent = this._swapProperties(curr, leftSubTreeRightMost);
|
|
2338
|
-
if (this._isMapMode) {
|
|
2339
|
-
this._store.set(curr.key, curr);
|
|
2340
|
-
this._store.set(leftSubTreeRightMost.key, leftSubTreeRightMost);
|
|
2341
|
-
}
|
|
2342
|
-
if (parentOfLeftSubTreeMax) {
|
|
2343
|
-
if (parentOfLeftSubTreeMax.right === leftSubTreeRightMost)
|
|
2344
|
-
parentOfLeftSubTreeMax.right = leftSubTreeRightMost.left;
|
|
2345
|
-
else parentOfLeftSubTreeMax.left = leftSubTreeRightMost.left;
|
|
2346
|
-
needBalanced = parentOfLeftSubTreeMax;
|
|
2347
|
-
}
|
|
2348
|
-
}
|
|
2349
|
-
} else if (parent) {
|
|
2350
|
-
const { familyPosition: fp } = curr;
|
|
2351
|
-
if (fp === "LEFT" || fp === "ROOT_LEFT") {
|
|
2352
|
-
parent.left = curr.right;
|
|
2353
|
-
} else if (fp === "RIGHT" || fp === "ROOT_RIGHT") {
|
|
2354
|
-
parent.right = curr.right;
|
|
2355
|
-
}
|
|
2356
|
-
needBalanced = parent;
|
|
2357
|
-
} else {
|
|
2358
|
-
this._setRoot(curr.right);
|
|
2359
|
-
curr.right = void 0;
|
|
2360
|
-
}
|
|
2361
|
-
this._size = this._size - 1;
|
|
2362
|
-
deletedResult.push({ deleted: orgCurrent, needBalanced });
|
|
2363
|
-
if (this._isMapMode && orgCurrent) this._store.delete(orgCurrent.key);
|
|
2364
|
-
return deletedResult;
|
|
2459
|
+
return this._deleteInternal(keyNodeEntryRawOrPredicate).length > 0;
|
|
2365
2460
|
}
|
|
2366
2461
|
/**
|
|
2367
2462
|
* Searches the tree for nodes matching a predicate.
|
|
2368
|
-
* @remarks Time O(
|
|
2463
|
+
* @remarks Time O(N) — full DFS scan; may visit every node. Space O(H) for call/explicit stack (O(N) worst-case). BST subclasses with key search override to O(log N).
|
|
2369
2464
|
*
|
|
2370
2465
|
* @template C - The type of the callback function.
|
|
2371
2466
|
* @param keyNodeEntryOrPredicate - The key, node, entry, or predicate function to search for.
|
|
@@ -2414,7 +2509,7 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2414
2509
|
}
|
|
2415
2510
|
/**
|
|
2416
2511
|
* Gets the first node matching a predicate.
|
|
2417
|
-
* @remarks Time O(
|
|
2512
|
+
* @remarks Time O(N) via `search`. Space O(H) or O(N). BST/Red-Black Tree/AVL Tree subclasses override to O(log N) for key lookups.
|
|
2418
2513
|
*
|
|
2419
2514
|
* @param keyNodeEntryOrPredicate - The key, node, entry, or predicate function to search for.
|
|
2420
2515
|
* @param [startNode=this._root] - The node to start the search from.
|
|
@@ -2448,6 +2543,10 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2448
2543
|
|
|
2449
2544
|
|
|
2450
2545
|
|
|
2546
|
+
|
|
2547
|
+
|
|
2548
|
+
|
|
2549
|
+
|
|
2451
2550
|
|
|
2452
2551
|
|
|
2453
2552
|
|
|
@@ -2470,7 +2569,7 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2470
2569
|
}
|
|
2471
2570
|
/**
|
|
2472
2571
|
* Gets the value associated with a key.
|
|
2473
|
-
* @remarks Time O(
|
|
2572
|
+
* @remarks Time O(1) in Map mode, O(N) otherwise (via `getNode`). Space O(1) in Map mode, O(H) or O(N) otherwise. BST subclasses override non-Map-mode to O(log N).
|
|
2474
2573
|
*
|
|
2475
2574
|
* @param keyNodeEntryOrPredicate - The key, node, or entry to get the value for.
|
|
2476
2575
|
* @param [startNode=this._root] - The node to start searching from (if not in Map mode).
|
|
@@ -2506,6 +2605,10 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2506
2605
|
|
|
2507
2606
|
|
|
2508
2607
|
|
|
2608
|
+
|
|
2609
|
+
|
|
2610
|
+
|
|
2611
|
+
|
|
2509
2612
|
|
|
2510
2613
|
|
|
2511
2614
|
|
|
@@ -2567,6 +2670,10 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2567
2670
|
|
|
2568
2671
|
|
|
2569
2672
|
|
|
2673
|
+
|
|
2674
|
+
|
|
2675
|
+
|
|
2676
|
+
|
|
2570
2677
|
|
|
2571
2678
|
|
|
2572
2679
|
|
|
@@ -2615,6 +2722,10 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2615
2722
|
|
|
2616
2723
|
|
|
2617
2724
|
|
|
2725
|
+
|
|
2726
|
+
|
|
2727
|
+
|
|
2728
|
+
|
|
2618
2729
|
|
|
2619
2730
|
|
|
2620
2731
|
|
|
@@ -2672,6 +2783,10 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2672
2783
|
|
|
2673
2784
|
|
|
2674
2785
|
|
|
2786
|
+
|
|
2787
|
+
|
|
2788
|
+
|
|
2789
|
+
|
|
2675
2790
|
|
|
2676
2791
|
|
|
2677
2792
|
|
|
@@ -2756,6 +2871,10 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2756
2871
|
|
|
2757
2872
|
|
|
2758
2873
|
|
|
2874
|
+
|
|
2875
|
+
|
|
2876
|
+
|
|
2877
|
+
|
|
2759
2878
|
|
|
2760
2879
|
|
|
2761
2880
|
|
|
@@ -2817,6 +2936,10 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
2817
2936
|
|
|
2818
2937
|
|
|
2819
2938
|
|
|
2939
|
+
|
|
2940
|
+
|
|
2941
|
+
|
|
2942
|
+
|
|
2820
2943
|
|
|
2821
2944
|
|
|
2822
2945
|
|
|
@@ -3294,6 +3417,10 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
3294
3417
|
|
|
3295
3418
|
|
|
3296
3419
|
|
|
3420
|
+
|
|
3421
|
+
|
|
3422
|
+
|
|
3423
|
+
|
|
3297
3424
|
|
|
3298
3425
|
|
|
3299
3426
|
|
|
@@ -3346,6 +3473,10 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
3346
3473
|
|
|
3347
3474
|
|
|
3348
3475
|
|
|
3476
|
+
|
|
3477
|
+
|
|
3478
|
+
|
|
3479
|
+
|
|
3349
3480
|
|
|
3350
3481
|
|
|
3351
3482
|
|
|
@@ -3402,6 +3533,10 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
3402
3533
|
|
|
3403
3534
|
|
|
3404
3535
|
|
|
3536
|
+
|
|
3537
|
+
|
|
3538
|
+
|
|
3539
|
+
|
|
3405
3540
|
|
|
3406
3541
|
|
|
3407
3542
|
|
|
@@ -3483,6 +3618,10 @@ var _BinaryTree = class _BinaryTree extends IterableEntryBase {
|
|
|
3483
3618
|
|
|
3484
3619
|
|
|
3485
3620
|
|
|
3621
|
+
|
|
3622
|
+
|
|
3623
|
+
|
|
3624
|
+
|
|
3486
3625
|
|
|
3487
3626
|
|
|
3488
3627
|
|