data-structure-typed 1.37.2 → 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 +3 -1
- package/dist/data-structures/binary-tree/avl-tree.d.ts +44 -38
- package/dist/data-structures/binary-tree/avl-tree.js +46 -40
- package/dist/data-structures/binary-tree/avl-tree.js.map +1 -1
- package/dist/data-structures/binary-tree/binary-tree.d.ts +305 -192
- package/dist/data-structures/binary-tree/binary-tree.js +304 -201
- package/dist/data-structures/binary-tree/binary-tree.js.map +1 -1
- package/dist/data-structures/binary-tree/bst.d.ts +111 -64
- package/dist/data-structures/binary-tree/bst.js +132 -85
- package/dist/data-structures/binary-tree/bst.js.map +1 -1
- package/dist/data-structures/binary-tree/tree-multiset.d.ts +49 -41
- package/dist/data-structures/binary-tree/tree-multiset.js +49 -41
- package/dist/data-structures/binary-tree/tree-multiset.js.map +1 -1
- package/dist/types/data-structures/binary-tree.d.ts +2 -2
- package/dist/types/data-structures/binary-tree.js +6 -6
- package/dist/types/data-structures/binary-tree.js.map +1 -1
- package/lib/data-structures/binary-tree/avl-tree.d.ts +44 -38
- package/lib/data-structures/binary-tree/avl-tree.js +46 -40
- package/lib/data-structures/binary-tree/binary-tree.d.ts +305 -192
- package/lib/data-structures/binary-tree/binary-tree.js +305 -202
- package/lib/data-structures/binary-tree/bst.d.ts +111 -64
- package/lib/data-structures/binary-tree/bst.js +133 -86
- package/lib/data-structures/binary-tree/tree-multiset.d.ts +49 -41
- package/lib/data-structures/binary-tree/tree-multiset.js +50 -42
- package/lib/types/data-structures/binary-tree.d.ts +2 -2
- package/lib/types/data-structures/binary-tree.js +5 -5
- package/package.json +6 -6
- package/src/data-structures/binary-tree/avl-tree.ts +46 -40
- package/src/data-structures/binary-tree/binary-tree.ts +328 -207
- package/src/data-structures/binary-tree/bst.ts +135 -88
- package/src/data-structures/binary-tree/tree-multiset.ts +50 -42
- package/src/types/data-structures/binary-tree.ts +2 -2
- package/test/config.ts +1 -0
- package/test/integration/avl-tree.test.ts +7 -8
- package/test/integration/bst.test.ts +17 -16
- package/test/unit/data-structures/binary-tree/binary-tree.test.ts +50 -0
- package/test/unit/data-structures/binary-tree/bst.test.ts +8 -1
- package/test/unit/data-structures/binary-tree/tree-multiset.test.ts +2 -1
- package/test/unit/data-structures/linked-list/linked-list.test.ts +1 -1
- package/test/utils/big-o.ts +2 -1
- package/umd/bundle.min.js +1 -1
- package/umd/bundle.min.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,10 +8,12 @@ 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
|
|
|
15
|
+
- Optimization [`#23`](https://github.com/zrwusa/data-structure-typed/pull/23)
|
|
16
|
+
- Optimization [`#20`](https://github.com/zrwusa/data-structure-typed/pull/20)
|
|
15
17
|
- [binary-tree, graph] Replace all code that uses Arrays as makeshift Q… [`#18`](https://github.com/zrwusa/data-structure-typed/pull/18)
|
|
16
18
|
- 1. No need for dfsIterative; integrate it directly into the dfs metho… [`#17`](https://github.com/zrwusa/data-structure-typed/pull/17)
|
|
17
19
|
- [heap] fibonacci heap implemented. [test] big O estimate. [project] n… [`#15`](https://github.com/zrwusa/data-structure-typed/pull/15)
|
|
@@ -21,74 +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
|
-
add(
|
|
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
|
|
50
|
-
*
|
|
51
|
-
* @param {BinaryTreeNodeKey}
|
|
52
|
-
*
|
|
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`).
|
|
53
57
|
* @returns The method is returning an array of `BinaryTreeDeletedResult<N>` objects.
|
|
54
58
|
*/
|
|
55
|
-
delete(
|
|
59
|
+
delete(nodeOrKey: N | BinaryTreeNodeKey): BinaryTreeDeletedResult<N>[];
|
|
56
60
|
/**
|
|
57
|
-
* The balance factor of a
|
|
58
|
-
*
|
|
59
|
-
* @
|
|
60
|
-
*
|
|
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.
|
|
61
65
|
*/
|
|
62
66
|
protected _balanceFactor(node: N): number;
|
|
63
67
|
/**
|
|
64
|
-
* The function updates the height of a node in
|
|
65
|
-
*
|
|
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.
|
|
66
71
|
*/
|
|
67
72
|
protected _updateHeight(node: N): void;
|
|
68
73
|
/**
|
|
69
|
-
* The `_balancePath` function
|
|
70
|
-
*
|
|
71
|
-
* @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.
|
|
72
78
|
*/
|
|
73
79
|
protected _balancePath(node: N): void;
|
|
74
80
|
/**
|
|
75
|
-
* The `_balanceLL`
|
|
76
|
-
* @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.
|
|
77
83
|
*/
|
|
78
84
|
protected _balanceLL(A: N): void;
|
|
79
85
|
/**
|
|
80
|
-
* The `_balanceLR` function performs a left-right rotation to balance
|
|
81
|
-
* @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.
|
|
82
88
|
*/
|
|
83
89
|
protected _balanceLR(A: N): void;
|
|
84
90
|
/**
|
|
85
|
-
* The `_balanceRR`
|
|
86
|
-
* @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.
|
|
87
93
|
*/
|
|
88
94
|
protected _balanceRR(A: N): void;
|
|
89
95
|
/**
|
|
90
|
-
* The `_balanceRL`
|
|
91
|
-
* @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.
|
|
92
98
|
*/
|
|
93
99
|
protected _balanceRL(A: N): void;
|
|
94
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,39 +49,42 @@ 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
|
-
add(
|
|
72
|
+
add(keyOrNode, val) {
|
|
69
73
|
// TODO support node as a param
|
|
70
|
-
const inserted = super.add(
|
|
74
|
+
const inserted = super.add(keyOrNode, val);
|
|
71
75
|
if (inserted)
|
|
72
76
|
this._balancePath(inserted);
|
|
73
77
|
return inserted;
|
|
74
78
|
}
|
|
75
79
|
/**
|
|
76
|
-
* The function overrides the delete method of a binary tree and
|
|
77
|
-
*
|
|
78
|
-
* @param {BinaryTreeNodeKey}
|
|
79
|
-
*
|
|
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`).
|
|
80
84
|
* @returns The method is returning an array of `BinaryTreeDeletedResult<N>` objects.
|
|
81
85
|
*/
|
|
82
|
-
delete(
|
|
83
|
-
const deletedResults = super.delete(
|
|
86
|
+
delete(nodeOrKey) {
|
|
87
|
+
const deletedResults = super.delete(nodeOrKey);
|
|
84
88
|
for (const { needBalanced } of deletedResults) {
|
|
85
89
|
if (needBalanced) {
|
|
86
90
|
this._balancePath(needBalanced);
|
|
@@ -89,10 +93,10 @@ class AVLTree extends bst_1.BST {
|
|
|
89
93
|
return deletedResults;
|
|
90
94
|
}
|
|
91
95
|
/**
|
|
92
|
-
* The balance factor of a
|
|
93
|
-
*
|
|
94
|
-
* @
|
|
95
|
-
*
|
|
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.
|
|
96
100
|
*/
|
|
97
101
|
_balanceFactor(node) {
|
|
98
102
|
if (!node.right)
|
|
@@ -105,8 +109,9 @@ class AVLTree extends bst_1.BST {
|
|
|
105
109
|
return node.right.height - node.left.height;
|
|
106
110
|
}
|
|
107
111
|
/**
|
|
108
|
-
* The function updates the height of a node in
|
|
109
|
-
*
|
|
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.
|
|
110
115
|
*/
|
|
111
116
|
_updateHeight(node) {
|
|
112
117
|
if (!node.left && !node.right)
|
|
@@ -121,9 +126,10 @@ class AVLTree extends bst_1.BST {
|
|
|
121
126
|
node.height = 1 + Math.max(node.right.height, node.left.height);
|
|
122
127
|
}
|
|
123
128
|
/**
|
|
124
|
-
* The `_balancePath` function
|
|
125
|
-
*
|
|
126
|
-
* @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.
|
|
127
133
|
*/
|
|
128
134
|
_balancePath(node) {
|
|
129
135
|
const path = this.getPathToRoot(node, false); // first O(log n) + O(log n)
|
|
@@ -165,8 +171,8 @@ class AVLTree extends bst_1.BST {
|
|
|
165
171
|
}
|
|
166
172
|
}
|
|
167
173
|
/**
|
|
168
|
-
* The `_balanceLL`
|
|
169
|
-
* @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.
|
|
170
176
|
*/
|
|
171
177
|
_balanceLL(A) {
|
|
172
178
|
const parentOfA = A.parent;
|
|
@@ -199,8 +205,8 @@ class AVLTree extends bst_1.BST {
|
|
|
199
205
|
this._updateHeight(B);
|
|
200
206
|
}
|
|
201
207
|
/**
|
|
202
|
-
* The `_balanceLR` function performs a left-right rotation to balance
|
|
203
|
-
* @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.
|
|
204
210
|
*/
|
|
205
211
|
_balanceLR(A) {
|
|
206
212
|
const parentOfA = A.parent;
|
|
@@ -248,8 +254,8 @@ class AVLTree extends bst_1.BST {
|
|
|
248
254
|
C && this._updateHeight(C);
|
|
249
255
|
}
|
|
250
256
|
/**
|
|
251
|
-
* The `_balanceRR`
|
|
252
|
-
* @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.
|
|
253
259
|
*/
|
|
254
260
|
_balanceRR(A) {
|
|
255
261
|
const parentOfA = A.parent;
|
|
@@ -283,8 +289,8 @@ class AVLTree extends bst_1.BST {
|
|
|
283
289
|
B && this._updateHeight(B);
|
|
284
290
|
}
|
|
285
291
|
/**
|
|
286
|
-
* The `_balanceRL`
|
|
287
|
-
* @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.
|
|
288
294
|
*/
|
|
289
295
|
_balanceRL(A) {
|
|
290
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,MAAa,OAA0D,SAAQ,SAAM;IACnF;;;;;OAKG;IACH,YAAY,OAAwB;QAClC,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"avl-tree.js","sourceRoot":"","sources":["../../../src/data-structures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