data-structure-typed 1.37.3 → 1.37.4
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/CHANGELOG.md +1 -1
- package/dist/data-structures/binary-tree/avl-tree.d.ts +42 -34
- package/dist/data-structures/binary-tree/avl-tree.js +42 -34
- package/dist/data-structures/binary-tree/avl-tree.js.map +1 -1
- package/dist/data-structures/binary-tree/binary-tree.d.ts +265 -168
- package/dist/data-structures/binary-tree/binary-tree.js +257 -170
- package/dist/data-structures/binary-tree/binary-tree.js.map +1 -1
- package/dist/data-structures/binary-tree/bst.d.ts +104 -59
- package/dist/data-structures/binary-tree/bst.js +105 -60
- package/dist/data-structures/binary-tree/bst.js.map +1 -1
- package/dist/data-structures/binary-tree/tree-multiset.d.ts +47 -39
- package/dist/data-structures/binary-tree/tree-multiset.js +47 -39
- package/dist/data-structures/binary-tree/tree-multiset.js.map +1 -1
- package/lib/data-structures/binary-tree/avl-tree.d.ts +42 -34
- package/lib/data-structures/binary-tree/avl-tree.js +42 -34
- package/lib/data-structures/binary-tree/binary-tree.d.ts +265 -168
- package/lib/data-structures/binary-tree/binary-tree.js +257 -170
- package/lib/data-structures/binary-tree/bst.d.ts +104 -59
- package/lib/data-structures/binary-tree/bst.js +105 -60
- package/lib/data-structures/binary-tree/tree-multiset.d.ts +47 -39
- package/lib/data-structures/binary-tree/tree-multiset.js +47 -39
- package/package.json +5 -5
- package/src/data-structures/binary-tree/avl-tree.ts +42 -34
- package/src/data-structures/binary-tree/binary-tree.ts +270 -174
- package/src/data-structures/binary-tree/bst.ts +108 -66
- package/src/data-structures/binary-tree/tree-multiset.ts +47 -39
- package/umd/bundle.min.js +1 -1
- package/umd/bundle.min.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,7 +8,7 @@ All notable changes to this project will be documented in this file.
|
|
|
8
8
|
- [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
|
|
9
9
|
- [`auto-changelog`](https://github.com/CookPete/auto-changelog)
|
|
10
10
|
|
|
11
|
-
## [v1.37.
|
|
11
|
+
## [v1.37.4](https://github.com/zrwusa/data-structure-typed/compare/v1.35.0...main) (upcoming)
|
|
12
12
|
|
|
13
13
|
### Changes
|
|
14
14
|
|
|
@@ -21,72 +21,80 @@ export declare class AVLTree<N extends AVLTreeNode<N['val'], N> = AVLTreeNode> e
|
|
|
21
21
|
*/
|
|
22
22
|
constructor(options?: AVLTreeOptions);
|
|
23
23
|
/**
|
|
24
|
-
* The
|
|
25
|
-
* @param {N} srcNode - The source node that
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
24
|
+
* The function swaps the key, value, and height properties between two nodes in a binary tree.
|
|
25
|
+
* @param {N} srcNode - The `srcNode` parameter represents the source node that needs to be swapped
|
|
26
|
+
* with the `destNode`.
|
|
27
|
+
* @param {N} destNode - The `destNode` parameter represents the destination node where the values
|
|
28
|
+
* from the source node (`srcNode`) will be swapped to.
|
|
29
|
+
* @returns The method is returning the `destNode` after swapping its properties with the `srcNode`.
|
|
29
30
|
*/
|
|
30
31
|
protected _swap(srcNode: N, destNode: N): N;
|
|
31
32
|
/**
|
|
32
|
-
* The function creates a new AVL tree node with the
|
|
33
|
-
* @param {BinaryTreeNodeKey} key - The
|
|
34
|
-
*
|
|
35
|
-
* @param [val] - The `val`
|
|
36
|
-
*
|
|
33
|
+
* The function creates a new AVL tree node with the specified key and value.
|
|
34
|
+
* @param {BinaryTreeNodeKey} key - The key parameter is the key value that will be associated with
|
|
35
|
+
* the new node. It is used to determine the position of the node in the binary search tree.
|
|
36
|
+
* @param [val] - The parameter `val` is an optional value that can be assigned to the node. It is of
|
|
37
|
+
* type `N['val']`, which means it can be any value that is assignable to the `val` property of the
|
|
38
|
+
* node type `N`.
|
|
37
39
|
* @returns a new AVLTreeNode object with the specified key and value.
|
|
38
40
|
*/
|
|
39
41
|
createNode(key: BinaryTreeNodeKey, val?: N['val']): N;
|
|
40
42
|
/**
|
|
41
|
-
* The function overrides the add method of a binary tree node and balances the tree after inserting
|
|
42
|
-
*
|
|
43
|
-
* @param
|
|
44
|
-
* `
|
|
45
|
-
* @
|
|
43
|
+
* The function overrides the add method of a binary tree node and balances the tree after inserting
|
|
44
|
+
* a new node.
|
|
45
|
+
* @param {BinaryTreeNodeKey | N | null} keyOrNode - The `keyOrNode` parameter can accept either a
|
|
46
|
+
* `BinaryTreeNodeKey` or a `N` (which represents a node in the binary tree) or `null`.
|
|
47
|
+
* @param [val] - The `val` parameter is the value that you want to assign to the new node that you
|
|
48
|
+
* are adding to the binary search tree.
|
|
49
|
+
* @returns The method is returning the inserted node (`N`), `null`, or `undefined`.
|
|
46
50
|
*/
|
|
47
51
|
add(keyOrNode: BinaryTreeNodeKey | N | null, val?: N['val']): N | null | undefined;
|
|
48
52
|
/**
|
|
49
|
-
* The function overrides the delete method of a binary tree and
|
|
53
|
+
* The function overrides the delete method of a binary tree and balances the tree after deleting a
|
|
54
|
+
* node if necessary.
|
|
55
|
+
* @param {N | BinaryTreeNodeKey} nodeOrKey - The `nodeOrKey` parameter can be either a node object
|
|
56
|
+
* (`N`) or a key value (`BinaryTreeNodeKey`).
|
|
50
57
|
* @returns The method is returning an array of `BinaryTreeDeletedResult<N>` objects.
|
|
51
|
-
* @param nodeOrKey - The `nodeOrKey` parameter is either a node or a key that needs to be deleted from the binary tree.
|
|
52
58
|
*/
|
|
53
59
|
delete(nodeOrKey: N | BinaryTreeNodeKey): BinaryTreeDeletedResult<N>[];
|
|
54
60
|
/**
|
|
55
|
-
* The balance factor of a
|
|
56
|
-
*
|
|
57
|
-
* @
|
|
58
|
-
*
|
|
61
|
+
* The function calculates the balance factor of a node in a binary tree.
|
|
62
|
+
* @param {N} node - The parameter "node" represents a node in a binary tree data structure.
|
|
63
|
+
* @returns the balance factor of a given node. The balance factor is calculated by subtracting the
|
|
64
|
+
* height of the left subtree from the height of the right subtree.
|
|
59
65
|
*/
|
|
60
66
|
protected _balanceFactor(node: N): number;
|
|
61
67
|
/**
|
|
62
|
-
* The function updates the height of a node in
|
|
63
|
-
*
|
|
68
|
+
* The function updates the height of a node in a binary tree based on the heights of its left and
|
|
69
|
+
* right children.
|
|
70
|
+
* @param {N} node - The parameter "node" represents a node in a binary tree data structure.
|
|
64
71
|
*/
|
|
65
72
|
protected _updateHeight(node: N): void;
|
|
66
73
|
/**
|
|
67
|
-
* The `_balancePath` function
|
|
68
|
-
*
|
|
69
|
-
* @param node - The `node` parameter
|
|
74
|
+
* The `_balancePath` function is used to update the heights of nodes and perform rotation operations
|
|
75
|
+
* to restore balance in an AVL tree after inserting a node.
|
|
76
|
+
* @param {N} node - The `node` parameter in the `_balancePath` function represents the node in the
|
|
77
|
+
* AVL tree that needs to be balanced.
|
|
70
78
|
*/
|
|
71
79
|
protected _balancePath(node: N): void;
|
|
72
80
|
/**
|
|
73
|
-
* The `_balanceLL`
|
|
74
|
-
* @param A -
|
|
81
|
+
* The function `_balanceLL` performs a left-left rotation to balance a binary tree.
|
|
82
|
+
* @param {N} A - A is a node in a binary tree.
|
|
75
83
|
*/
|
|
76
84
|
protected _balanceLL(A: N): void;
|
|
77
85
|
/**
|
|
78
|
-
* The `_balanceLR` function performs a left-right rotation to balance
|
|
79
|
-
* @param A - A is
|
|
86
|
+
* The `_balanceLR` function performs a left-right rotation to balance a binary tree.
|
|
87
|
+
* @param {N} A - A is a node in a binary tree.
|
|
80
88
|
*/
|
|
81
89
|
protected _balanceLR(A: N): void;
|
|
82
90
|
/**
|
|
83
|
-
* The `_balanceRR`
|
|
84
|
-
* @param A -
|
|
91
|
+
* The function `_balanceRR` performs a right-right rotation to balance a binary tree.
|
|
92
|
+
* @param {N} A - A is a node in a binary tree.
|
|
85
93
|
*/
|
|
86
94
|
protected _balanceRR(A: N): void;
|
|
87
95
|
/**
|
|
88
|
-
* The `_balanceRL`
|
|
89
|
-
* @param A - A is
|
|
96
|
+
* The function `_balanceRL` performs a right-left rotation to balance a binary tree.
|
|
97
|
+
* @param {N} A - A is a node in a binary tree.
|
|
90
98
|
*/
|
|
91
99
|
protected _balanceRL(A: N): void;
|
|
92
100
|
}
|
|
@@ -27,11 +27,12 @@ class AVLTree extends bst_1.BST {
|
|
|
27
27
|
super(options);
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
|
-
* The
|
|
31
|
-
* @param {N} srcNode - The source node that
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
30
|
+
* The function swaps the key, value, and height properties between two nodes in a binary tree.
|
|
31
|
+
* @param {N} srcNode - The `srcNode` parameter represents the source node that needs to be swapped
|
|
32
|
+
* with the `destNode`.
|
|
33
|
+
* @param {N} destNode - The `destNode` parameter represents the destination node where the values
|
|
34
|
+
* from the source node (`srcNode`) will be swapped to.
|
|
35
|
+
* @returns The method is returning the `destNode` after swapping its properties with the `srcNode`.
|
|
35
36
|
*/
|
|
36
37
|
_swap(srcNode, destNode) {
|
|
37
38
|
const { key, val, height } = destNode;
|
|
@@ -48,22 +49,25 @@ class AVLTree extends bst_1.BST {
|
|
|
48
49
|
return destNode;
|
|
49
50
|
}
|
|
50
51
|
/**
|
|
51
|
-
* The function creates a new AVL tree node with the
|
|
52
|
-
* @param {BinaryTreeNodeKey} key - The
|
|
53
|
-
*
|
|
54
|
-
* @param [val] - The `val`
|
|
55
|
-
*
|
|
52
|
+
* The function creates a new AVL tree node with the specified key and value.
|
|
53
|
+
* @param {BinaryTreeNodeKey} key - The key parameter is the key value that will be associated with
|
|
54
|
+
* the new node. It is used to determine the position of the node in the binary search tree.
|
|
55
|
+
* @param [val] - The parameter `val` is an optional value that can be assigned to the node. It is of
|
|
56
|
+
* type `N['val']`, which means it can be any value that is assignable to the `val` property of the
|
|
57
|
+
* node type `N`.
|
|
56
58
|
* @returns a new AVLTreeNode object with the specified key and value.
|
|
57
59
|
*/
|
|
58
60
|
createNode(key, val) {
|
|
59
61
|
return new AVLTreeNode(key, val);
|
|
60
62
|
}
|
|
61
63
|
/**
|
|
62
|
-
* The function overrides the add method of a binary tree node and balances the tree after inserting
|
|
63
|
-
*
|
|
64
|
-
* @param
|
|
65
|
-
* `
|
|
66
|
-
* @
|
|
64
|
+
* The function overrides the add method of a binary tree node and balances the tree after inserting
|
|
65
|
+
* a new node.
|
|
66
|
+
* @param {BinaryTreeNodeKey | N | null} keyOrNode - The `keyOrNode` parameter can accept either a
|
|
67
|
+
* `BinaryTreeNodeKey` or a `N` (which represents a node in the binary tree) or `null`.
|
|
68
|
+
* @param [val] - The `val` parameter is the value that you want to assign to the new node that you
|
|
69
|
+
* are adding to the binary search tree.
|
|
70
|
+
* @returns The method is returning the inserted node (`N`), `null`, or `undefined`.
|
|
67
71
|
*/
|
|
68
72
|
add(keyOrNode, val) {
|
|
69
73
|
// TODO support node as a param
|
|
@@ -73,9 +77,11 @@ class AVLTree extends bst_1.BST {
|
|
|
73
77
|
return inserted;
|
|
74
78
|
}
|
|
75
79
|
/**
|
|
76
|
-
* The function overrides the delete method of a binary tree and
|
|
80
|
+
* The function overrides the delete method of a binary tree and balances the tree after deleting a
|
|
81
|
+
* node if necessary.
|
|
82
|
+
* @param {N | BinaryTreeNodeKey} nodeOrKey - The `nodeOrKey` parameter can be either a node object
|
|
83
|
+
* (`N`) or a key value (`BinaryTreeNodeKey`).
|
|
77
84
|
* @returns The method is returning an array of `BinaryTreeDeletedResult<N>` objects.
|
|
78
|
-
* @param nodeOrKey - The `nodeOrKey` parameter is either a node or a key that needs to be deleted from the binary tree.
|
|
79
85
|
*/
|
|
80
86
|
delete(nodeOrKey) {
|
|
81
87
|
const deletedResults = super.delete(nodeOrKey);
|
|
@@ -87,10 +93,10 @@ class AVLTree extends bst_1.BST {
|
|
|
87
93
|
return deletedResults;
|
|
88
94
|
}
|
|
89
95
|
/**
|
|
90
|
-
* The balance factor of a
|
|
91
|
-
*
|
|
92
|
-
* @
|
|
93
|
-
*
|
|
96
|
+
* The function calculates the balance factor of a node in a binary tree.
|
|
97
|
+
* @param {N} node - The parameter "node" represents a node in a binary tree data structure.
|
|
98
|
+
* @returns the balance factor of a given node. The balance factor is calculated by subtracting the
|
|
99
|
+
* height of the left subtree from the height of the right subtree.
|
|
94
100
|
*/
|
|
95
101
|
_balanceFactor(node) {
|
|
96
102
|
if (!node.right)
|
|
@@ -103,8 +109,9 @@ class AVLTree extends bst_1.BST {
|
|
|
103
109
|
return node.right.height - node.left.height;
|
|
104
110
|
}
|
|
105
111
|
/**
|
|
106
|
-
* The function updates the height of a node in
|
|
107
|
-
*
|
|
112
|
+
* The function updates the height of a node in a binary tree based on the heights of its left and
|
|
113
|
+
* right children.
|
|
114
|
+
* @param {N} node - The parameter "node" represents a node in a binary tree data structure.
|
|
108
115
|
*/
|
|
109
116
|
_updateHeight(node) {
|
|
110
117
|
if (!node.left && !node.right)
|
|
@@ -119,9 +126,10 @@ class AVLTree extends bst_1.BST {
|
|
|
119
126
|
node.height = 1 + Math.max(node.right.height, node.left.height);
|
|
120
127
|
}
|
|
121
128
|
/**
|
|
122
|
-
* The `_balancePath` function
|
|
123
|
-
*
|
|
124
|
-
* @param node - The `node` parameter
|
|
129
|
+
* The `_balancePath` function is used to update the heights of nodes and perform rotation operations
|
|
130
|
+
* to restore balance in an AVL tree after inserting a node.
|
|
131
|
+
* @param {N} node - The `node` parameter in the `_balancePath` function represents the node in the
|
|
132
|
+
* AVL tree that needs to be balanced.
|
|
125
133
|
*/
|
|
126
134
|
_balancePath(node) {
|
|
127
135
|
const path = this.getPathToRoot(node, false); // first O(log n) + O(log n)
|
|
@@ -163,8 +171,8 @@ class AVLTree extends bst_1.BST {
|
|
|
163
171
|
}
|
|
164
172
|
}
|
|
165
173
|
/**
|
|
166
|
-
* The `_balanceLL`
|
|
167
|
-
* @param A -
|
|
174
|
+
* The function `_balanceLL` performs a left-left rotation to balance a binary tree.
|
|
175
|
+
* @param {N} A - A is a node in a binary tree.
|
|
168
176
|
*/
|
|
169
177
|
_balanceLL(A) {
|
|
170
178
|
const parentOfA = A.parent;
|
|
@@ -197,8 +205,8 @@ class AVLTree extends bst_1.BST {
|
|
|
197
205
|
this._updateHeight(B);
|
|
198
206
|
}
|
|
199
207
|
/**
|
|
200
|
-
* The `_balanceLR` function performs a left-right rotation to balance
|
|
201
|
-
* @param A - A is
|
|
208
|
+
* The `_balanceLR` function performs a left-right rotation to balance a binary tree.
|
|
209
|
+
* @param {N} A - A is a node in a binary tree.
|
|
202
210
|
*/
|
|
203
211
|
_balanceLR(A) {
|
|
204
212
|
const parentOfA = A.parent;
|
|
@@ -246,8 +254,8 @@ class AVLTree extends bst_1.BST {
|
|
|
246
254
|
C && this._updateHeight(C);
|
|
247
255
|
}
|
|
248
256
|
/**
|
|
249
|
-
* The `_balanceRR`
|
|
250
|
-
* @param A -
|
|
257
|
+
* The function `_balanceRR` performs a right-right rotation to balance a binary tree.
|
|
258
|
+
* @param {N} A - A is a node in a binary tree.
|
|
251
259
|
*/
|
|
252
260
|
_balanceRR(A) {
|
|
253
261
|
const parentOfA = A.parent;
|
|
@@ -281,8 +289,8 @@ class AVLTree extends bst_1.BST {
|
|
|
281
289
|
B && this._updateHeight(B);
|
|
282
290
|
}
|
|
283
291
|
/**
|
|
284
|
-
* The `_balanceRL`
|
|
285
|
-
* @param A - A is
|
|
292
|
+
* The function `_balanceRL` performs a right-left rotation to balance a binary tree.
|
|
293
|
+
* @param {N} A - A is a node in a binary tree.
|
|
286
294
|
*/
|
|
287
295
|
_balanceRL(A) {
|
|
288
296
|
const parentOfA = A.parent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avl-tree.js","sourceRoot":"","sources":["../../../src/data-structures/binary-tree/avl-tree.ts"],"names":[],"mappings":";;;AAAA;;;;;;GAMG;AACH,+BAAmC;AAInC,MAAa,WAAmF,SAAQ,aAGvG;IAGC,YAAY,GAAsB,EAAE,GAAO;QACzC,KAAK,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QAChB,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;IAClB,CAAC;CACF;AAVD,kCAUC;AAED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