binary-tree-typed 2.5.1 → 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 +340 -107
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs-legacy/index.cjs +339 -106
- package/dist/cjs-legacy/index.cjs.map +1 -1
- package/dist/esm/index.mjs +340 -108
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm-legacy/index.mjs +339 -107
- package/dist/esm-legacy/index.mjs.map +1 -1
- package/dist/types/common/error.d.ts +9 -0
- package/dist/types/common/index.d.ts +1 -1
- package/dist/types/data-structures/binary-tree/avl-tree.d.ts +86 -2
- package/dist/types/data-structures/binary-tree/binary-indexed-tree.d.ts +98 -0
- package/dist/types/data-structures/binary-tree/binary-tree.d.ts +189 -13
- package/dist/types/data-structures/binary-tree/bst.d.ts +270 -3
- package/dist/types/data-structures/binary-tree/red-black-tree.d.ts +136 -8
- package/dist/types/data-structures/binary-tree/segment-tree.d.ts +42 -0
- package/dist/types/data-structures/binary-tree/tree-map.d.ts +1089 -161
- package/dist/types/data-structures/binary-tree/tree-multi-map.d.ts +1243 -350
- package/dist/types/data-structures/binary-tree/tree-multi-set.d.ts +980 -255
- package/dist/types/data-structures/binary-tree/tree-set.d.ts +1174 -284
- package/dist/types/data-structures/graph/directed-graph.d.ts +70 -0
- package/dist/types/data-structures/graph/undirected-graph.d.ts +63 -0
- package/dist/types/data-structures/hash/hash-map.d.ts +84 -6
- package/dist/types/data-structures/heap/heap.d.ts +140 -12
- package/dist/types/data-structures/linked-list/doubly-linked-list.d.ts +126 -0
- package/dist/types/data-structures/linked-list/singly-linked-list.d.ts +106 -1
- package/dist/types/data-structures/linked-list/skip-linked-list.d.ts +126 -0
- package/dist/types/data-structures/matrix/matrix.d.ts +56 -0
- package/dist/types/data-structures/queue/deque.d.ts +127 -0
- package/dist/types/data-structures/queue/queue.d.ts +97 -0
- package/dist/types/data-structures/stack/stack.d.ts +72 -2
- package/dist/types/data-structures/trie/trie.d.ts +84 -0
- package/dist/types/interfaces/binary-tree.d.ts +2 -3
- package/dist/types/types/data-structures/binary-tree/bst.d.ts +1 -0
- package/dist/types/types/data-structures/binary-tree/tree-map.d.ts +5 -0
- package/dist/types/types/data-structures/binary-tree/tree-multi-set.d.ts +4 -0
- package/dist/types/types/data-structures/binary-tree/tree-set.d.ts +4 -0
- package/dist/umd/binary-tree-typed.js +337 -105
- 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/common/error.ts +19 -1
- package/src/common/index.ts +1 -1
- package/src/data-structures/base/iterable-element-base.ts +3 -2
- package/src/data-structures/binary-tree/avl-tree.ts +99 -5
- package/src/data-structures/binary-tree/binary-indexed-tree.ts +102 -4
- package/src/data-structures/binary-tree/binary-tree.ts +239 -78
- package/src/data-structures/binary-tree/bst.ts +542 -13
- package/src/data-structures/binary-tree/red-black-tree.ts +155 -15
- package/src/data-structures/binary-tree/segment-tree.ts +42 -0
- package/src/data-structures/binary-tree/tree-map.ts +1223 -261
- package/src/data-structures/binary-tree/tree-multi-map.ts +939 -30
- package/src/data-structures/binary-tree/tree-multi-set.ts +746 -10
- package/src/data-structures/binary-tree/tree-set.ts +1018 -99
- package/src/data-structures/graph/abstract-graph.ts +2 -2
- package/src/data-structures/graph/directed-graph.ts +71 -1
- package/src/data-structures/graph/undirected-graph.ts +64 -1
- package/src/data-structures/hash/hash-map.ts +102 -16
- package/src/data-structures/heap/heap.ts +153 -23
- package/src/data-structures/heap/max-heap.ts +2 -2
- package/src/data-structures/linked-list/doubly-linked-list.ts +139 -0
- package/src/data-structures/linked-list/singly-linked-list.ts +106 -1
- package/src/data-structures/linked-list/skip-linked-list.ts +131 -5
- package/src/data-structures/matrix/matrix.ts +65 -9
- package/src/data-structures/priority-queue/max-priority-queue.ts +2 -2
- package/src/data-structures/queue/deque.ts +130 -0
- package/src/data-structures/queue/queue.ts +109 -0
- package/src/data-structures/stack/stack.ts +75 -5
- package/src/data-structures/trie/trie.ts +86 -2
- package/src/interfaces/binary-tree.ts +1 -9
- package/src/types/data-structures/binary-tree/bst.ts +1 -0
- package/src/types/data-structures/binary-tree/tree-map.ts +6 -0
- package/src/types/data-structures/binary-tree/tree-multi-set.ts +5 -0
- package/src/types/data-structures/binary-tree/tree-set.ts +5 -0
|
@@ -28,7 +28,7 @@ import { IBinaryTree } from '../../interfaces';
|
|
|
28
28
|
import { isComparable, makeTrampoline, makeTrampolineThunk } from '../../utils';
|
|
29
29
|
import { Queue } from '../queue';
|
|
30
30
|
import { IterableEntryBase } from '../base';
|
|
31
|
-
import { DFSOperation, ERR, Range } from '../../common';
|
|
31
|
+
import { DFSOperation, ERR, raise, Range } from '../../common';
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* @template K - The type of the key.
|
|
@@ -293,7 +293,7 @@ export class BinaryTree<K = any, V = any, R = any>
|
|
|
293
293
|
if (isMapMode !== undefined) this._isMapMode = isMapMode;
|
|
294
294
|
if (isDuplicate !== undefined) this._isDuplicate = isDuplicate;
|
|
295
295
|
if (typeof toEntryFn === 'function') this._toEntryFn = toEntryFn;
|
|
296
|
-
else if (toEntryFn)
|
|
296
|
+
else if (toEntryFn) raise(TypeError, ERR.notAFunction('toEntryFn', 'BinaryTree'));
|
|
297
297
|
}
|
|
298
298
|
|
|
299
299
|
if (keysNodesEntriesOrRaws) this.setMany(keysNodesEntriesOrRaws);
|
|
@@ -562,7 +562,7 @@ export class BinaryTree<K = any, V = any, R = any>
|
|
|
562
562
|
|
|
563
563
|
/**
|
|
564
564
|
* Adds a new node to the tree.
|
|
565
|
-
* @remarks Time O(
|
|
565
|
+
* @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).
|
|
566
566
|
*
|
|
567
567
|
* @param keyNodeOrEntry - The key, node, or entry to add.
|
|
568
568
|
* @returns True if the addition was successful, false otherwise.
|
|
@@ -585,6 +585,13 @@ export class BinaryTree<K = any, V = any, R = any>
|
|
|
585
585
|
|
|
586
586
|
|
|
587
587
|
|
|
588
|
+
|
|
589
|
+
|
|
590
|
+
|
|
591
|
+
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
|
|
588
595
|
|
|
589
596
|
|
|
590
597
|
|
|
@@ -610,7 +617,7 @@ export class BinaryTree<K = any, V = any, R = any>
|
|
|
610
617
|
|
|
611
618
|
/**
|
|
612
619
|
* Adds or updates a new node to the tree.
|
|
613
|
-
* @remarks Time O(
|
|
620
|
+
* @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).
|
|
614
621
|
*
|
|
615
622
|
* @param keyNodeOrEntry - The key, node, or entry to set or update.
|
|
616
623
|
* @param [value] - The value, if providing just a key.
|
|
@@ -639,6 +646,13 @@ export class BinaryTree<K = any, V = any, R = any>
|
|
|
639
646
|
|
|
640
647
|
|
|
641
648
|
|
|
649
|
+
|
|
650
|
+
|
|
651
|
+
|
|
652
|
+
|
|
653
|
+
|
|
654
|
+
|
|
655
|
+
|
|
642
656
|
|
|
643
657
|
|
|
644
658
|
|
|
@@ -755,6 +769,13 @@ export class BinaryTree<K = any, V = any, R = any>
|
|
|
755
769
|
|
|
756
770
|
|
|
757
771
|
|
|
772
|
+
|
|
773
|
+
|
|
774
|
+
|
|
775
|
+
|
|
776
|
+
|
|
777
|
+
|
|
778
|
+
|
|
758
779
|
|
|
759
780
|
|
|
760
781
|
|
|
@@ -799,6 +820,13 @@ export class BinaryTree<K = any, V = any, R = any>
|
|
|
799
820
|
|
|
800
821
|
|
|
801
822
|
|
|
823
|
+
|
|
824
|
+
|
|
825
|
+
|
|
826
|
+
|
|
827
|
+
|
|
828
|
+
|
|
829
|
+
|
|
802
830
|
|
|
803
831
|
|
|
804
832
|
|
|
@@ -869,6 +897,13 @@ export class BinaryTree<K = any, V = any, R = any>
|
|
|
869
897
|
|
|
870
898
|
|
|
871
899
|
|
|
900
|
+
|
|
901
|
+
|
|
902
|
+
|
|
903
|
+
|
|
904
|
+
|
|
905
|
+
|
|
906
|
+
|
|
872
907
|
|
|
873
908
|
|
|
874
909
|
|
|
@@ -889,68 +924,14 @@ export class BinaryTree<K = any, V = any, R = any>
|
|
|
889
924
|
}
|
|
890
925
|
|
|
891
926
|
/**
|
|
892
|
-
*
|
|
893
|
-
* @remarks Time O(N)
|
|
894
|
-
*
|
|
895
|
-
* @param keysNodesEntriesOrRaws - An iterable of items to set.
|
|
896
|
-
* @param [values] - An optional parallel iterable of values.
|
|
897
|
-
*/
|
|
898
|
-
refill(
|
|
899
|
-
keysNodesEntriesOrRaws: Iterable<
|
|
900
|
-
K | BinaryTreeNode<K, V> | [K | null | undefined, V | undefined] | null | undefined | R
|
|
901
|
-
>,
|
|
902
|
-
values?: Iterable<V | undefined>
|
|
903
|
-
): void {
|
|
904
|
-
this.clear();
|
|
905
|
-
this.setMany(keysNodesEntriesOrRaws, values);
|
|
906
|
-
}
|
|
907
|
-
|
|
908
|
-
/**
|
|
909
|
-
* Deletes a node from the tree.
|
|
910
|
-
* @remarks Time O(log N), For BST, Red-Black Tree, and AVL Tree subclasses, the worst-case time is O(log N). This implementation finds the node, and if it has two children, swaps it with the rightmost node of its left subtree (in-order predecessor) before deleting. Time O(N) in the worst case. O(N) to find the node (`getNode`) and O(H) (which is O(N) worst-case) to find the rightmost node. Space O(1) (if `getNode` is iterative, which it is).
|
|
927
|
+
* Deletes a node from the tree (internal, returns balancing metadata).
|
|
928
|
+
* @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).
|
|
929
|
+
* @internal Used by AVL/BST subclasses that need balancing metadata after deletion.
|
|
911
930
|
*
|
|
912
931
|
* @param keyNodeEntryRawOrPredicate - The node to delete.
|
|
913
|
-
* @returns An array containing deletion results
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
* @example
|
|
947
|
-
* // Remove a node
|
|
948
|
-
* const tree = new BinaryTree<number>([1, 2, 3, 4, 5]);
|
|
949
|
-
* tree.delete(3);
|
|
950
|
-
* console.log(tree.has(3)); // false;
|
|
951
|
-
* console.log(tree.size); // 4;
|
|
932
|
+
* @returns An array containing deletion results with balancing metadata.
|
|
952
933
|
*/
|
|
953
|
-
|
|
934
|
+
protected _deleteInternal(
|
|
954
935
|
keyNodeEntryRawOrPredicate: BTNRep<K, V, BinaryTreeNode<K, V>> | NodePredicate<BinaryTreeNode<K, V> | null>
|
|
955
936
|
): BinaryTreeDeleteResult<BinaryTreeNode<K, V>>[] {
|
|
956
937
|
const deletedResult: BinaryTreeDeleteResult<BinaryTreeNode<K, V>>[] = [];
|
|
@@ -964,26 +945,19 @@ export class BinaryTree<K = any, V = any, R = any>
|
|
|
964
945
|
let orgCurrent: BinaryTreeNode<K, V> | undefined = curr;
|
|
965
946
|
|
|
966
947
|
if (!curr.left && !curr.right && !parent) {
|
|
967
|
-
// Deleting the root with no children
|
|
968
948
|
this._setRoot(undefined);
|
|
969
949
|
} else if (curr.left) {
|
|
970
|
-
// Node has a left child (or two children)
|
|
971
|
-
// Find the rightmost node in the left subtree
|
|
972
950
|
const leftSubTreeRightMost = this.getRightMost(node => node, curr.left);
|
|
973
951
|
if (leftSubTreeRightMost) {
|
|
974
952
|
const parentOfLeftSubTreeMax = leftSubTreeRightMost.parent;
|
|
975
|
-
// Swap properties
|
|
976
953
|
orgCurrent = this._swapProperties(curr, leftSubTreeRightMost);
|
|
977
954
|
|
|
978
|
-
// Map mode store tracks key -> node reference; after swapping keys we must re-index both nodes.
|
|
979
955
|
if (this._isMapMode) {
|
|
980
956
|
this._store.set(curr.key, curr);
|
|
981
957
|
this._store.set(leftSubTreeRightMost.key, leftSubTreeRightMost);
|
|
982
958
|
}
|
|
983
959
|
|
|
984
|
-
// `orgCurrent` is now the node to be physically deleted (which was the rightmost)
|
|
985
960
|
if (parentOfLeftSubTreeMax) {
|
|
986
|
-
// Unlink the rightmost node
|
|
987
961
|
if (parentOfLeftSubTreeMax.right === leftSubTreeRightMost)
|
|
988
962
|
parentOfLeftSubTreeMax.right = leftSubTreeRightMost.left;
|
|
989
963
|
else parentOfLeftSubTreeMax.left = leftSubTreeRightMost.left;
|
|
@@ -991,8 +965,6 @@ export class BinaryTree<K = any, V = any, R = any>
|
|
|
991
965
|
}
|
|
992
966
|
}
|
|
993
967
|
} else if (parent) {
|
|
994
|
-
// Node has no left child, but has a parent
|
|
995
|
-
// Promote the right child (which could be null)
|
|
996
968
|
const { familyPosition: fp } = curr;
|
|
997
969
|
if (fp === 'LEFT' || fp === 'ROOT_LEFT') {
|
|
998
970
|
parent.left = curr.right;
|
|
@@ -1001,8 +973,6 @@ export class BinaryTree<K = any, V = any, R = any>
|
|
|
1001
973
|
}
|
|
1002
974
|
needBalanced = parent;
|
|
1003
975
|
} else {
|
|
1004
|
-
// Deleting the root, which has no left child
|
|
1005
|
-
// Promote the right child as the new root
|
|
1006
976
|
this._setRoot(curr.right);
|
|
1007
977
|
curr.right = undefined;
|
|
1008
978
|
}
|
|
@@ -1014,6 +984,64 @@ export class BinaryTree<K = any, V = any, R = any>
|
|
|
1014
984
|
return deletedResult;
|
|
1015
985
|
}
|
|
1016
986
|
|
|
987
|
+
/**
|
|
988
|
+
* Deletes a node from the tree.
|
|
989
|
+
* @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).
|
|
990
|
+
*
|
|
991
|
+
* @param keyNodeEntryRawOrPredicate - The node to delete.
|
|
992
|
+
* @returns True if the node was found and deleted, false otherwise.
|
|
993
|
+
|
|
994
|
+
|
|
995
|
+
|
|
996
|
+
|
|
997
|
+
|
|
998
|
+
|
|
999
|
+
|
|
1000
|
+
|
|
1001
|
+
|
|
1002
|
+
|
|
1003
|
+
|
|
1004
|
+
|
|
1005
|
+
|
|
1006
|
+
|
|
1007
|
+
|
|
1008
|
+
|
|
1009
|
+
|
|
1010
|
+
|
|
1011
|
+
|
|
1012
|
+
|
|
1013
|
+
|
|
1014
|
+
|
|
1015
|
+
|
|
1016
|
+
|
|
1017
|
+
|
|
1018
|
+
|
|
1019
|
+
|
|
1020
|
+
|
|
1021
|
+
|
|
1022
|
+
|
|
1023
|
+
|
|
1024
|
+
|
|
1025
|
+
|
|
1026
|
+
|
|
1027
|
+
|
|
1028
|
+
|
|
1029
|
+
|
|
1030
|
+
|
|
1031
|
+
|
|
1032
|
+
* @example
|
|
1033
|
+
* // Remove a node
|
|
1034
|
+
* const tree = new BinaryTree<number>([1, 2, 3, 4, 5]);
|
|
1035
|
+
* tree.delete(3);
|
|
1036
|
+
* console.log(tree.has(3)); // false;
|
|
1037
|
+
* console.log(tree.size); // 4;
|
|
1038
|
+
*/
|
|
1039
|
+
delete(
|
|
1040
|
+
keyNodeEntryRawOrPredicate: BTNRep<K, V, BinaryTreeNode<K, V>> | NodePredicate<BinaryTreeNode<K, V> | null>
|
|
1041
|
+
): boolean {
|
|
1042
|
+
return this._deleteInternal(keyNodeEntryRawOrPredicate).length > 0;
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1017
1045
|
/**
|
|
1018
1046
|
* Search by predicate
|
|
1019
1047
|
|
|
@@ -1031,6 +1059,13 @@ export class BinaryTree<K = any, V = any, R = any>
|
|
|
1031
1059
|
|
|
1032
1060
|
|
|
1033
1061
|
|
|
1062
|
+
|
|
1063
|
+
|
|
1064
|
+
|
|
1065
|
+
|
|
1066
|
+
|
|
1067
|
+
|
|
1068
|
+
|
|
1034
1069
|
|
|
1035
1070
|
|
|
1036
1071
|
|
|
@@ -1072,7 +1107,7 @@ export class BinaryTree<K = any, V = any, R = any>
|
|
|
1072
1107
|
|
|
1073
1108
|
/**
|
|
1074
1109
|
* Searches the tree for nodes matching a predicate.
|
|
1075
|
-
* @remarks Time O(
|
|
1110
|
+
* @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).
|
|
1076
1111
|
*
|
|
1077
1112
|
* @template C - The type of the callback function.
|
|
1078
1113
|
* @param keyNodeEntryOrPredicate - The key, node, entry, or predicate function to search for.
|
|
@@ -1164,6 +1199,13 @@ export class BinaryTree<K = any, V = any, R = any>
|
|
|
1164
1199
|
|
|
1165
1200
|
|
|
1166
1201
|
|
|
1202
|
+
|
|
1203
|
+
|
|
1204
|
+
|
|
1205
|
+
|
|
1206
|
+
|
|
1207
|
+
|
|
1208
|
+
|
|
1167
1209
|
|
|
1168
1210
|
|
|
1169
1211
|
|
|
@@ -1208,7 +1250,7 @@ export class BinaryTree<K = any, V = any, R = any>
|
|
|
1208
1250
|
|
|
1209
1251
|
/**
|
|
1210
1252
|
* Gets the first node matching a predicate.
|
|
1211
|
-
* @remarks Time O(
|
|
1253
|
+
* @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.
|
|
1212
1254
|
*
|
|
1213
1255
|
* @param keyNodeEntryOrPredicate - The key, node, entry, or predicate function to search for.
|
|
1214
1256
|
* @param [startNode=this._root] - The node to start the search from.
|
|
@@ -1236,6 +1278,13 @@ export class BinaryTree<K = any, V = any, R = any>
|
|
|
1236
1278
|
|
|
1237
1279
|
|
|
1238
1280
|
|
|
1281
|
+
|
|
1282
|
+
|
|
1283
|
+
|
|
1284
|
+
|
|
1285
|
+
|
|
1286
|
+
|
|
1287
|
+
|
|
1239
1288
|
|
|
1240
1289
|
|
|
1241
1290
|
|
|
@@ -1272,7 +1321,7 @@ export class BinaryTree<K = any, V = any, R = any>
|
|
|
1272
1321
|
|
|
1273
1322
|
/**
|
|
1274
1323
|
* Gets the value associated with a key.
|
|
1275
|
-
* @remarks Time O(
|
|
1324
|
+
* @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).
|
|
1276
1325
|
*
|
|
1277
1326
|
* @param keyNodeEntryOrPredicate - The key, node, or entry to get the value for.
|
|
1278
1327
|
* @param [startNode=this._root] - The node to start searching from (if not in Map mode).
|
|
@@ -1302,6 +1351,13 @@ export class BinaryTree<K = any, V = any, R = any>
|
|
|
1302
1351
|
|
|
1303
1352
|
|
|
1304
1353
|
|
|
1354
|
+
|
|
1355
|
+
|
|
1356
|
+
|
|
1357
|
+
|
|
1358
|
+
|
|
1359
|
+
|
|
1360
|
+
|
|
1305
1361
|
|
|
1306
1362
|
|
|
1307
1363
|
|
|
@@ -1331,7 +1387,7 @@ export class BinaryTree<K = any, V = any, R = any>
|
|
|
1331
1387
|
|
|
1332
1388
|
/**
|
|
1333
1389
|
* Checks if a node matching the predicate exists in the tree.
|
|
1334
|
-
* @remarks Time O(
|
|
1390
|
+
* @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.
|
|
1335
1391
|
*
|
|
1336
1392
|
* @param [keyNodeEntryOrPredicate] - The key, node, entry, or predicate to check for.
|
|
1337
1393
|
* @param [startNode] - The node to start the search from.
|
|
@@ -1361,6 +1417,13 @@ export class BinaryTree<K = any, V = any, R = any>
|
|
|
1361
1417
|
|
|
1362
1418
|
|
|
1363
1419
|
|
|
1420
|
+
|
|
1421
|
+
|
|
1422
|
+
|
|
1423
|
+
|
|
1424
|
+
|
|
1425
|
+
|
|
1426
|
+
|
|
1364
1427
|
|
|
1365
1428
|
|
|
1366
1429
|
|
|
@@ -1456,6 +1519,13 @@ export class BinaryTree<K = any, V = any, R = any>
|
|
|
1456
1519
|
|
|
1457
1520
|
|
|
1458
1521
|
|
|
1522
|
+
|
|
1523
|
+
|
|
1524
|
+
|
|
1525
|
+
|
|
1526
|
+
|
|
1527
|
+
|
|
1528
|
+
|
|
1459
1529
|
|
|
1460
1530
|
|
|
1461
1531
|
|
|
@@ -1502,6 +1572,13 @@ export class BinaryTree<K = any, V = any, R = any>
|
|
|
1502
1572
|
|
|
1503
1573
|
|
|
1504
1574
|
|
|
1575
|
+
|
|
1576
|
+
|
|
1577
|
+
|
|
1578
|
+
|
|
1579
|
+
|
|
1580
|
+
|
|
1581
|
+
|
|
1505
1582
|
|
|
1506
1583
|
|
|
1507
1584
|
|
|
@@ -1560,6 +1637,13 @@ export class BinaryTree<K = any, V = any, R = any>
|
|
|
1560
1637
|
|
|
1561
1638
|
|
|
1562
1639
|
|
|
1640
|
+
|
|
1641
|
+
|
|
1642
|
+
|
|
1643
|
+
|
|
1644
|
+
|
|
1645
|
+
|
|
1646
|
+
|
|
1563
1647
|
|
|
1564
1648
|
|
|
1565
1649
|
|
|
@@ -1648,6 +1732,13 @@ export class BinaryTree<K = any, V = any, R = any>
|
|
|
1648
1732
|
|
|
1649
1733
|
|
|
1650
1734
|
|
|
1735
|
+
|
|
1736
|
+
|
|
1737
|
+
|
|
1738
|
+
|
|
1739
|
+
|
|
1740
|
+
|
|
1741
|
+
|
|
1651
1742
|
|
|
1652
1743
|
|
|
1653
1744
|
|
|
@@ -1710,6 +1801,13 @@ export class BinaryTree<K = any, V = any, R = any>
|
|
|
1710
1801
|
|
|
1711
1802
|
|
|
1712
1803
|
|
|
1804
|
+
|
|
1805
|
+
|
|
1806
|
+
|
|
1807
|
+
|
|
1808
|
+
|
|
1809
|
+
|
|
1810
|
+
|
|
1713
1811
|
|
|
1714
1812
|
|
|
1715
1813
|
|
|
@@ -2013,6 +2111,13 @@ export class BinaryTree<K = any, V = any, R = any>
|
|
|
2013
2111
|
|
|
2014
2112
|
|
|
2015
2113
|
|
|
2114
|
+
|
|
2115
|
+
|
|
2116
|
+
|
|
2117
|
+
|
|
2118
|
+
|
|
2119
|
+
|
|
2120
|
+
|
|
2016
2121
|
|
|
2017
2122
|
|
|
2018
2123
|
|
|
@@ -2098,6 +2203,13 @@ export class BinaryTree<K = any, V = any, R = any>
|
|
|
2098
2203
|
|
|
2099
2204
|
|
|
2100
2205
|
|
|
2206
|
+
|
|
2207
|
+
|
|
2208
|
+
|
|
2209
|
+
|
|
2210
|
+
|
|
2211
|
+
|
|
2212
|
+
|
|
2101
2213
|
|
|
2102
2214
|
|
|
2103
2215
|
|
|
@@ -2242,6 +2354,13 @@ export class BinaryTree<K = any, V = any, R = any>
|
|
|
2242
2354
|
|
|
2243
2355
|
|
|
2244
2356
|
|
|
2357
|
+
|
|
2358
|
+
|
|
2359
|
+
|
|
2360
|
+
|
|
2361
|
+
|
|
2362
|
+
|
|
2363
|
+
|
|
2245
2364
|
|
|
2246
2365
|
|
|
2247
2366
|
|
|
@@ -2339,6 +2458,13 @@ export class BinaryTree<K = any, V = any, R = any>
|
|
|
2339
2458
|
|
|
2340
2459
|
|
|
2341
2460
|
|
|
2461
|
+
|
|
2462
|
+
|
|
2463
|
+
|
|
2464
|
+
|
|
2465
|
+
|
|
2466
|
+
|
|
2467
|
+
|
|
2342
2468
|
|
|
2343
2469
|
|
|
2344
2470
|
|
|
@@ -2454,6 +2580,13 @@ export class BinaryTree<K = any, V = any, R = any>
|
|
|
2454
2580
|
|
|
2455
2581
|
|
|
2456
2582
|
|
|
2583
|
+
|
|
2584
|
+
|
|
2585
|
+
|
|
2586
|
+
|
|
2587
|
+
|
|
2588
|
+
|
|
2589
|
+
|
|
2457
2590
|
|
|
2458
2591
|
|
|
2459
2592
|
|
|
@@ -2613,6 +2746,13 @@ export class BinaryTree<K = any, V = any, R = any>
|
|
|
2613
2746
|
|
|
2614
2747
|
|
|
2615
2748
|
|
|
2749
|
+
|
|
2750
|
+
|
|
2751
|
+
|
|
2752
|
+
|
|
2753
|
+
|
|
2754
|
+
|
|
2755
|
+
|
|
2616
2756
|
|
|
2617
2757
|
|
|
2618
2758
|
|
|
@@ -2663,6 +2803,13 @@ export class BinaryTree<K = any, V = any, R = any>
|
|
|
2663
2803
|
|
|
2664
2804
|
|
|
2665
2805
|
|
|
2806
|
+
|
|
2807
|
+
|
|
2808
|
+
|
|
2809
|
+
|
|
2810
|
+
|
|
2811
|
+
|
|
2812
|
+
|
|
2666
2813
|
|
|
2667
2814
|
|
|
2668
2815
|
|
|
@@ -2717,6 +2864,13 @@ export class BinaryTree<K = any, V = any, R = any>
|
|
|
2717
2864
|
|
|
2718
2865
|
|
|
2719
2866
|
|
|
2867
|
+
|
|
2868
|
+
|
|
2869
|
+
|
|
2870
|
+
|
|
2871
|
+
|
|
2872
|
+
|
|
2873
|
+
|
|
2720
2874
|
|
|
2721
2875
|
|
|
2722
2876
|
|
|
@@ -2804,6 +2958,13 @@ export class BinaryTree<K = any, V = any, R = any>
|
|
|
2804
2958
|
|
|
2805
2959
|
|
|
2806
2960
|
|
|
2961
|
+
|
|
2962
|
+
|
|
2963
|
+
|
|
2964
|
+
|
|
2965
|
+
|
|
2966
|
+
|
|
2967
|
+
|
|
2807
2968
|
|
|
2808
2969
|
|
|
2809
2970
|
|