data-structure-typed 1.52.0 → 1.52.1

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.
Files changed (80) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/README.md +128 -41
  3. package/dist/cjs/data-structures/binary-tree/avl-tree-multi-map.d.ts +11 -11
  4. package/dist/cjs/data-structures/binary-tree/avl-tree-multi-map.js +6 -6
  5. package/dist/cjs/data-structures/binary-tree/avl-tree-multi-map.js.map +1 -1
  6. package/dist/cjs/data-structures/binary-tree/avl-tree.d.ts +11 -11
  7. package/dist/cjs/data-structures/binary-tree/avl-tree.js +6 -6
  8. package/dist/cjs/data-structures/binary-tree/avl-tree.js.map +1 -1
  9. package/dist/cjs/data-structures/binary-tree/binary-tree.d.ts +97 -97
  10. package/dist/cjs/data-structures/binary-tree/binary-tree.js +50 -50
  11. package/dist/cjs/data-structures/binary-tree/binary-tree.js.map +1 -1
  12. package/dist/cjs/data-structures/binary-tree/bst.d.ts +35 -35
  13. package/dist/cjs/data-structures/binary-tree/bst.js +15 -15
  14. package/dist/cjs/data-structures/binary-tree/bst.js.map +1 -1
  15. package/dist/cjs/data-structures/binary-tree/rb-tree.d.ts +8 -8
  16. package/dist/cjs/data-structures/binary-tree/rb-tree.js +6 -6
  17. package/dist/cjs/data-structures/binary-tree/rb-tree.js.map +1 -1
  18. package/dist/cjs/data-structures/binary-tree/tree-multi-map.d.ts +10 -10
  19. package/dist/cjs/data-structures/binary-tree/tree-multi-map.js +5 -5
  20. package/dist/cjs/data-structures/binary-tree/tree-multi-map.js.map +1 -1
  21. package/dist/cjs/data-structures/graph/directed-graph.js +2 -1
  22. package/dist/cjs/data-structures/graph/directed-graph.js.map +1 -1
  23. package/dist/cjs/data-structures/queue/deque.d.ts +7 -0
  24. package/dist/cjs/data-structures/queue/deque.js +16 -1
  25. package/dist/cjs/data-structures/queue/deque.js.map +1 -1
  26. package/dist/cjs/data-structures/queue/queue.d.ts +0 -1
  27. package/dist/cjs/data-structures/queue/queue.js +0 -1
  28. package/dist/cjs/data-structures/queue/queue.js.map +1 -1
  29. package/dist/cjs/interfaces/binary-tree.d.ts +3 -3
  30. package/dist/cjs/types/common.d.ts +1 -22
  31. package/dist/cjs/types/data-structures/binary-tree/binary-tree.d.ts +18 -1
  32. package/dist/cjs/types/data-structures/binary-tree/bst.d.ts +3 -0
  33. package/dist/cjs/types/data-structures/queue/deque.d.ts +1 -0
  34. package/dist/cjs/utils/number.js +1 -2
  35. package/dist/cjs/utils/number.js.map +1 -1
  36. package/dist/cjs/utils/utils.js +2 -2
  37. package/dist/cjs/utils/utils.js.map +1 -1
  38. package/dist/mjs/data-structures/binary-tree/avl-tree-multi-map.d.ts +11 -11
  39. package/dist/mjs/data-structures/binary-tree/avl-tree-multi-map.js +6 -6
  40. package/dist/mjs/data-structures/binary-tree/avl-tree.d.ts +11 -11
  41. package/dist/mjs/data-structures/binary-tree/avl-tree.js +6 -6
  42. package/dist/mjs/data-structures/binary-tree/binary-tree.d.ts +97 -97
  43. package/dist/mjs/data-structures/binary-tree/binary-tree.js +50 -50
  44. package/dist/mjs/data-structures/binary-tree/bst.d.ts +35 -35
  45. package/dist/mjs/data-structures/binary-tree/bst.js +15 -15
  46. package/dist/mjs/data-structures/binary-tree/rb-tree.d.ts +8 -8
  47. package/dist/mjs/data-structures/binary-tree/rb-tree.js +6 -6
  48. package/dist/mjs/data-structures/binary-tree/tree-multi-map.d.ts +10 -10
  49. package/dist/mjs/data-structures/binary-tree/tree-multi-map.js +5 -5
  50. package/dist/mjs/data-structures/graph/directed-graph.js +2 -1
  51. package/dist/mjs/data-structures/queue/deque.d.ts +7 -0
  52. package/dist/mjs/data-structures/queue/deque.js +16 -1
  53. package/dist/mjs/data-structures/queue/queue.d.ts +0 -1
  54. package/dist/mjs/data-structures/queue/queue.js +0 -1
  55. package/dist/mjs/interfaces/binary-tree.d.ts +3 -3
  56. package/dist/mjs/types/common.d.ts +1 -22
  57. package/dist/mjs/types/data-structures/binary-tree/binary-tree.d.ts +18 -1
  58. package/dist/mjs/types/data-structures/binary-tree/bst.d.ts +3 -0
  59. package/dist/mjs/types/data-structures/queue/deque.d.ts +1 -0
  60. package/dist/umd/data-structure-typed.js +105 -91
  61. package/dist/umd/data-structure-typed.min.js +2 -2
  62. package/dist/umd/data-structure-typed.min.js.map +1 -1
  63. package/package.json +7 -7
  64. package/src/data-structures/binary-tree/avl-tree-multi-map.ts +12 -12
  65. package/src/data-structures/binary-tree/avl-tree.ts +11 -11
  66. package/src/data-structures/binary-tree/binary-tree.ts +151 -147
  67. package/src/data-structures/binary-tree/bst.ts +44 -41
  68. package/src/data-structures/binary-tree/rb-tree.ts +10 -10
  69. package/src/data-structures/binary-tree/tree-multi-map.ts +10 -10
  70. package/src/data-structures/graph/directed-graph.ts +2 -1
  71. package/src/data-structures/queue/deque.ts +15 -1
  72. package/src/data-structures/queue/queue.ts +0 -1
  73. package/src/interfaces/binary-tree.ts +3 -3
  74. package/src/types/common.ts +2 -24
  75. package/src/types/data-structures/binary-tree/binary-tree.ts +21 -1
  76. package/src/types/data-structures/binary-tree/bst.ts +7 -0
  77. package/src/types/data-structures/queue/deque.ts +4 -1
  78. package/test/unit/data-structures/graph/directed-graph.test.ts +28 -0
  79. package/test/unit/data-structures/heap/heap.test.ts +20 -0
  80. package/test/unit/data-structures/queue/deque.test.ts +19 -0
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.52.0](https://github.com/zrwusa/data-structure-typed/compare/v1.51.5...main) (upcoming)
11
+ ## [v1.52.1](https://github.com/zrwusa/data-structure-typed/compare/v1.51.5...main) (upcoming)
12
12
 
13
13
  ## [v1.51.5](https://github.com/zrwusa/data-structure-typed/compare/v1.35.0...v1.51.5) (18 January 2024)
14
14
 
package/README.md CHANGED
@@ -124,6 +124,93 @@ Performance surpasses that of native JS/TS
124
124
  </tbody>
125
125
  </table>
126
126
 
127
+ ### Plain language explanations
128
+
129
+ <table>
130
+ <tr>
131
+ <th>Data Structure</th>
132
+ <th>Plain Language Definition</th>
133
+ <th>Diagram</th>
134
+ </tr>
135
+ <tr>
136
+ <td>Linked List (Singly Linked List)</td>
137
+ <td>A line of bunnies, where each bunny holds the tail of the bunny in front of it (each bunny only knows the name of the bunny behind it). You want to find a bunny named Pablo, and you have to start searching from the first bunny. If it's not Pablo, you continue following that bunny's tail to the next one. So, you might need to search n times to find Pablo (O(n) time complexity). If you want to insert a bunny named Remi between Pablo and Vicky, it's very simple. You just need to let Vicky release Pablo's tail, let Remi hold Pablo's tail, and then let Vicky hold Remi's tail (O(1) time complexity).</td>
138
+ <td><img alt="singly linked list" src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/singly-linked-list.png"></td>
139
+ </tr>
140
+ <tr>
141
+ <td>Array</td>
142
+ <td>A line of numbered bunnies. If you want to find the bunny named Pablo, you can directly shout out Pablo's number 0680 (finding the element directly through array indexing, O(1) time complexity). However, if you don't know Pablo's number, you still need to search one by one (O(n) time complexity). Moreover, if you want to add a bunny named Vicky behind Pablo, you will need to renumber all the bunnies after Vicky (O(n) time complexity).</td>
143
+ <td><img alt="array" src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/array.png"></td>
144
+ </tr>
145
+ <tr>
146
+ <td>Queue</td>
147
+ <td>A line of numbered bunnies with a sticky note on the first bunny. For this line with a sticky note on the first bunny, whenever we want to remove a bunny from the front of the line, we only need to move the sticky note to the face of the next bunny without actually removing the bunny to avoid renumbering all the bunnies behind (removing from the front is also O(1) time complexity). For the tail of the line, we don't need to worry because each new bunny added to the tail is directly given a new number (O(1) time complexity) without needing to renumber all the previous bunnies.</td>
148
+ <td><img alt="queue" src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/queue.jpg"></td>
149
+ </tr>
150
+ <tr>
151
+ <td>Deque</td>
152
+ <td>A line of grouped, numbered bunnies with a sticky note on the first bunny. For this line, we manage it by groups. Each time we remove a bunny from the front of the line, we only move the sticky note to the next bunny. This way, we don't need to renumber all the bunnies behind the first bunny each time a bunny is removed. Only when all members of a group are removed do we reassign numbers and regroup. The tail is handled similarly. This is a strategy of delaying and batching operations to offset the drawbacks of the Array data structure that requires moving all elements behind when inserting or deleting elements in the middle.</td>
153
+ <td><img alt="deque" src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/deque.png"></td>
154
+ </tr>
155
+ <tr>
156
+ <td>Doubly Linked List</td>
157
+ <td>A line of bunnies where each bunny holds the tail of the bunny in front (each bunny knows the names of the two adjacent bunnies). This provides the Singly Linked List the ability to search forward, and that's all. For example, if you directly come to the bunny Remi in the line and ask her where Vicky is, she will say the one holding my tail behind me, and if you ask her where Pablo is, she will say right in front.</td>
158
+ <td><img alt="doubly linked list" src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/doubly-linked-list.png"></td>
159
+ </tr>
160
+ <tr>
161
+ <td>Stack</td>
162
+ <td>A line of bunnies in a dead-end tunnel, where bunnies can only be removed from the tunnel entrance (end), and new bunnies can only be added at the entrance (end) as well.</td>
163
+ <td><img alt="stack" src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/stack.jpg"></td>
164
+ </tr>
165
+ <tr>
166
+ <td>Binary Tree</td>
167
+ <td>As the name suggests, it's a tree where each node has at most two children. When you add consecutive data such as [4, 2, 6, 1, 3, 5, 7], it will be a complete binary tree. When you add data like [4, 2, 6, null, 1, 3, null, 5, null, 7], you can specify whether any left or right child node is null, and the shape of the tree is fully controllable.</td>
168
+ <td><img alt="binary tree" src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/binary-tree.png"></td>
169
+ </tr>
170
+ <tr>
171
+ <td>Binary Search Tree (BST)</td>
172
+ <td>A tree-like rabbit colony composed of doubly linked lists where each rabbit has at most two tails. These rabbits are disciplined and obedient, arranged in their positions according to a certain order. The most important data structure in a binary tree (the core is that the time complexity for insertion, deletion, modification, and search is O(log n)). The data stored in a BST is structured and ordered, not in strict order like 1, 2, 3, 4, 5, but maintaining that all nodes in the left subtree are less than the node, and all nodes in the right subtree are greater than the node. This order provides O(log n) time complexity for insertion, deletion, modification, and search. Reducing O(n) to O(log n) is the most common algorithm complexity optimization in the computer field, an exponential improvement in efficiency. It's also the most efficient way to organize unordered data into ordered data (most sorting algorithms only maintain O(n log n)). Of course, the binary search trees we provide support organizing data in both ascending and descending order. Remember that basic BSTs do not have self-balancing capabilities, and if you sequentially add sorted data to this data structure, it will degrade into a list, thus losing the O(log n) capability. Of course, our addMany method is specially handled to prevent degradation. However, for practical applications, please use Red-black Tree or AVL Tree as much as possible, as they inherently have self-balancing functions.</td>
173
+ <td><img alt="binary search tree" src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/binary-search-tree.png"></td>
174
+ </tr>
175
+ <tr>
176
+ <td>Red-black Tree</td>
177
+ <td>A tree-like rabbit colony composed of doubly linked lists, where each rabbit has at most two tails. These rabbits are not only obedient but also intelligent, automatically arranging their positions in a certain order. A self-balancing binary search tree. Each node is marked with a red-black label. Ensuring that no path is more than twice as long as any other (maintaining a certain balance to improve the speed of search, addition, and deletion).</td>
178
+ <td><img alt="red-black tree" src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/red-black tree.png"></td>
179
+ </tr>
180
+ <tr>
181
+ <td>AVL Tree</td>
182
+ <td>A tree-like rabbit colony composed of doubly linked lists, where each rabbit has at most two tails. These rabbits are not only obedient but also intelligent, automatically arranging their positions in a certain order, and they follow very strict rules. A self-balancing binary search tree. Each node is marked with a balance factor, representing the height difference between its left and right subtrees. The absolute value of the balance factor does not exceed 1 (maintaining stricter balance, which makes search efficiency higher than Red-black Tree, but insertion and deletion operations will be more complex and relatively less efficient).</td>
183
+ <td><img alt="avl tree" src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/avl-tree.png"></td>
184
+ </tr>
185
+ <tr>
186
+ <td>Heap</td>
187
+ <td>A special type of complete binary tree, often stored in an array, where the children nodes of the node at index i are at indices 2i+1 and 2i+2. Naturally, the parent node of any node is at ⌊(i−1)/2⌋.</td>
188
+ <td><img alt="heap" src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/heap.jpg"></td>
189
+ </tr>
190
+ <tr>
191
+ <td>Priority Queue</td>
192
+ <td>It's actually a Heap.</td>
193
+ <td><img alt="priority queue" src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/heap.jpg"></td>
194
+ </tr>
195
+ <tr>
196
+ <td>Graph</td>
197
+ <td>The base class for Directed Graph and Undirected Graph, providing some common methods.</td>
198
+ <td><img alt="graph" src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/graph.png"></td>
199
+ </tr>
200
+ <tr>
201
+ <td>Directed Graph</td>
202
+ <td>A network-like bunny group where each bunny can have up to n tails (Singly Linked List).</td>
203
+ <td><img alt="directed graph" src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/directed-graph.png"></td>
204
+ </tr>
205
+ <tr>
206
+ <td>Undirected Graph</td>
207
+ <td>A network-like bunny group where each bunny can have up to n tails (Doubly Linked List).</td>
208
+ <td><img alt="undirected graph" src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/undirected-graph.png"></td>
209
+ </tr>
210
+ </table>
211
+
212
+
213
+
127
214
  ### Conciseness and uniformity
128
215
  In [java.utils](), you need to memorize a table for all sequential data structures(Queue, Deque, LinkedList),
129
216
 
@@ -186,127 +273,127 @@ We provide data structures that are not available in JS/TS
186
273
  <td>Binary Tree</td>
187
274
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
188
275
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
189
- <td><a href="https://data-structure-typed-docs.vercel.app/classes/BinaryTree.html"><span>View</span></a></td>
190
- <td><a href="https://www.npmjs.com/package/binary-tree-typed"><span>View</span></a></td>
276
+ <td><a href="https://data-structure-typed-docs.vercel.app/classes/BinaryTree.html"><span>Docs</span></a></td>
277
+ <td><a href="https://www.npmjs.com/package/binary-tree-typed"><span>NPM</span></a></td>
191
278
  <td><img alt="NPM Downloads" src="https://img.shields.io/npm/dm/binary-tree-typed"></td>
192
279
  </tr>
193
280
  <tr>
194
281
  <td>Binary Search Tree (BST)</td>
195
282
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
196
283
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
197
- <td><a href="https://data-structure-typed-docs.vercel.app/classes/BST.html"><span>View</span></a></td>
198
- <td><a href="https://www.npmjs.com/package/bst-typed"><span>View</span></a></td>
284
+ <td><a href="https://data-structure-typed-docs.vercel.app/classes/BST.html"><span>Docs</span></a></td>
285
+ <td><a href="https://www.npmjs.com/package/bst-typed"><span>NPM</span></a></td>
199
286
  <td><img alt="NPM Downloads" src="https://img.shields.io/npm/dm/bst-typed"></td>
200
287
  </tr>
201
288
  <tr>
202
289
  <td>AVL Tree</td>
203
290
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
204
291
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
205
- <td><a href="https://data-structure-typed-docs.vercel.app/classes/AVLTree.html"><span>View</span></a></td>
206
- <td><a href="https://www.npmjs.com/package/avl-tree-typed"><span>View</span></a></td>
292
+ <td><a href="https://data-structure-typed-docs.vercel.app/classes/AVLTree.html"><span>Docs</span></a></td>
293
+ <td><a href="https://www.npmjs.com/package/avl-tree-typed"><span>NPM</span></a></td>
207
294
  <td><img alt="NPM Downloads" src="https://img.shields.io/npm/dm/avl-tree-typed"></td>
208
295
  </tr>
209
296
  <tr>
210
297
  <td>Red Black Tree</td>
211
298
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
212
299
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
213
- <td><a href="https://data-structure-typed-docs.vercel.app/classes/RedBlackTree.html"><span>View</span></a></td>
214
- <td><a href="https://www.npmjs.com/package/red-black-tree-typed"><span>View</span></a></td>
300
+ <td><a href="https://data-structure-typed-docs.vercel.app/classes/RedBlackTree.html"><span>Docs</span></a></td>
301
+ <td><a href="https://www.npmjs.com/package/red-black-tree-typed"><span>NPM</span></a></td>
215
302
  <td><img alt="NPM Downloads" src="https://img.shields.io/npm/dm/red-black-tree-typed"></td>
216
303
  </tr>
217
304
  <tr>
218
305
  <td>Tree Multimap</td>
219
306
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
220
307
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
221
- <td><a href="https://data-structure-typed-docs.vercel.app/classes/TreeMultiMap.html"><span>View</span></a></td>
222
- <td><a href="https://www.npmjs.com/package/tree-multimap-typed"><span>View</span></a></td>
308
+ <td><a href="https://data-structure-typed-docs.vercel.app/classes/TreeMultiMap.html"><span>Docs</span></a></td>
309
+ <td><a href="https://www.npmjs.com/package/tree-multimap-typed"><span>NPM</span></a></td>
223
310
  <td><img alt="NPM Downloads" src="https://img.shields.io/npm/dm/tree-multimap-typed"></td>
224
311
  </tr>
225
312
  <tr>
226
313
  <td>Heap</td>
227
314
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
228
315
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
229
- <td><a href="https://data-structure-typed-docs.vercel.app/classes/Heap.html"><span>View</span></a></td>
230
- <td><a href="https://www.npmjs.com/package/heap-typed"><span>View</span></a></td>
316
+ <td><a href="https://data-structure-typed-docs.vercel.app/classes/Heap.html"><span>Docs</span></a></td>
317
+ <td><a href="https://www.npmjs.com/package/heap-typed"><span>NPM</span></a></td>
231
318
  <td><img alt="NPM Downloads" src="https://img.shields.io/npm/dm/heap-typed"></td>
232
319
  </tr>
233
320
  <tr>
234
321
  <td>Priority Queue</td>
235
322
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
236
323
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
237
- <td><a href="https://data-structure-typed-docs.vercel.app/classes/PriorityQueue.html"><span>View</span></a></td>
238
- <td><a href="https://www.npmjs.com/package/priority-queue-typed"><span>View</span></a></td>
324
+ <td><a href="https://data-structure-typed-docs.vercel.app/classes/PriorityQueue.html"><span>Docs</span></a></td>
325
+ <td><a href="https://www.npmjs.com/package/priority-queue-typed"><span>NPM</span></a></td>
239
326
  <td><img alt="NPM Downloads" src="https://img.shields.io/npm/dm/priority-queue-typed"></td>
240
327
  </tr>
241
328
  <tr>
242
329
  <td>Max Priority Queue</td>
243
330
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
244
331
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
245
- <td><a href="https://data-structure-typed-docs.vercel.app/classes/MaxPriorityQueue.html"><span>View</span></a></td>
246
- <td><a href="https://www.npmjs.com/package/max-priority-queue-typed"><span>View</span></a></td>
332
+ <td><a href="https://data-structure-typed-docs.vercel.app/classes/MaxPriorityQueue.html"><span>Docs</span></a></td>
333
+ <td><a href="https://www.npmjs.com/package/max-priority-queue-typed"><span>NPM</span></a></td>
247
334
  <td><img alt="NPM Downloads" src="https://img.shields.io/npm/dm/max-priority-queue-typed"></td>
248
335
  </tr>
249
336
  <tr>
250
337
  <td>Min Priority Queue</td>
251
338
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
252
339
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
253
- <td><a href="https://data-structure-typed-docs.vercel.app/classes/MinPriorityQueue.html"><span>View</span></a></td>
254
- <td><a href="https://www.npmjs.com/package/min-priority-queue-typed"><span>View</span></a></td>
340
+ <td><a href="https://data-structure-typed-docs.vercel.app/classes/MinPriorityQueue.html"><span>Docs</span></a></td>
341
+ <td><a href="https://www.npmjs.com/package/min-priority-queue-typed"><span>NPM</span></a></td>
255
342
  <td><img alt="NPM Downloads" src="https://img.shields.io/npm/dm/min-priority-queue-typed"></td>
256
343
  </tr>
257
344
  <tr>
258
345
  <td>Trie</td>
259
346
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
260
347
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
261
- <td><a href="https://data-structure-typed-docs.vercel.app/classes/Trie.html"><span>View</span></a></td>
262
- <td><a href="https://www.npmjs.com/package/trie-typed"><span>View</span></a></td>
348
+ <td><a href="https://data-structure-typed-docs.vercel.app/classes/Trie.html"><span>Docs</span></a></td>
349
+ <td><a href="https://www.npmjs.com/package/trie-typed"><span>NPM</span></a></td>
263
350
  <td><img alt="NPM Downloads" src="https://img.shields.io/npm/dm/trie-typed"></td>
264
351
  </tr>
265
352
  <tr>
266
353
  <td>Graph</td>
267
354
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
268
355
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
269
- <td><a href="https://data-structure-typed-docs.vercel.app/classes/AbstractGraph.html"><span>View</span></a></td>
270
- <td><a href="https://www.npmjs.com/package/graph-typed"><span>View</span></a></td>
356
+ <td><a href="https://data-structure-typed-docs.vercel.app/classes/AbstractGraph.html"><span>Docs</span></a></td>
357
+ <td><a href="https://www.npmjs.com/package/graph-typed"><span>NPM</span></a></td>
271
358
  <td><img alt="NPM Downloads" src="https://img.shields.io/npm/dm/graph-typed"></td>
272
359
  </tr>
273
360
  <tr>
274
361
  <td>Directed Graph</td>
275
362
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
276
363
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
277
- <td><a href="https://data-structure-typed-docs.vercel.app/classes/DirectedGraph.html"><span>View</span></a></td>
278
- <td><a href="https://www.npmjs.com/package/directed-graph-typed"><span>View</span></a></td>
364
+ <td><a href="https://data-structure-typed-docs.vercel.app/classes/DirectedGraph.html"><span>Docs</span></a></td>
365
+ <td><a href="https://www.npmjs.com/package/directed-graph-typed"><span>NPM</span></a></td>
279
366
  <td><img alt="NPM Downloads" src="https://img.shields.io/npm/dm/directed-graph-typed"></td>
280
367
  </tr>
281
368
  <tr>
282
369
  <td>Undirected Graph</td>
283
370
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
284
371
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
285
- <td><a href="https://data-structure-typed-docs.vercel.app/classes/UndirectedGraph.html"><span>View</span></a></td>
286
- <td><a href="https://www.npmjs.com/package/undirected-graph-typed"><span>View</span></a></td>
372
+ <td><a href="https://data-structure-typed-docs.vercel.app/classes/UndirectedGraph.html"><span>Docs</span></a></td>
373
+ <td><a href="https://www.npmjs.com/package/undirected-graph-typed"><span>NPM</span></a></td>
287
374
  <td><img alt="NPM Downloads" src="https://img.shields.io/npm/dm/undirected-graph-typed"></td>
288
375
  </tr>
289
376
  <tr>
290
377
  <td>Queue</td>
291
378
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
292
379
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
293
- <td><a href="https://data-structure-typed-docs.vercel.app/classes/Queue.html"><span>View</span></a></td>
294
- <td><a href="https://www.npmjs.com/package/queue-typed"><span>View</span></a></td>
380
+ <td><a href="https://data-structure-typed-docs.vercel.app/classes/Queue.html"><span>Docs</span></a></td>
381
+ <td><a href="https://www.npmjs.com/package/queue-typed"><span>NPM</span></a></td>
295
382
  <td><img alt="NPM Downloads" src="https://img.shields.io/npm/dm/queue-typed"></td>
296
383
  </tr>
297
384
  <tr>
298
385
  <td>Deque</td>
299
386
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
300
387
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
301
- <td><a href="https://data-structure-typed-docs.vercel.app/classes/Deque.html"><span>View</span></a></td>
302
- <td><a href="https://www.npmjs.com/package/deque-typed"><span>View</span></a></td>
388
+ <td><a href="https://data-structure-typed-docs.vercel.app/classes/Deque.html"><span>Docs</span></a></td>
389
+ <td><a href="https://www.npmjs.com/package/deque-typed"><span>NPM</span></a></td>
303
390
  <td><img alt="NPM Downloads" src="https://img.shields.io/npm/dm/deque-typed"></td>
304
391
  </tr>
305
392
  <tr>
306
393
  <td>Hash Map</td>
307
394
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
308
395
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
309
- <td><a href="https://data-structure-typed-docs.vercel.app/classes/HashMap.html"><span>View</span></a></td>
396
+ <td><a href="https://data-structure-typed-docs.vercel.app/classes/HashMap.html"><span>Docs</span></a></td>
310
397
  <td><a href="https://www.npmjs.com/package/hashmap-typed"><span></span></a></td>
311
398
  <td></td>
312
399
  </tr>
@@ -314,39 +401,39 @@ We provide data structures that are not available in JS/TS
314
401
  <td>Linked List</td>
315
402
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
316
403
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
317
- <td><a href="https://data-structure-typed-docs.vercel.app/classes/SinglyLinkedList.html"><span>View</span></a></td>
318
- <td><a href="https://www.npmjs.com/package/linked-list-typed"><span>View</span></a></td>
404
+ <td><a href="https://data-structure-typed-docs.vercel.app/classes/SinglyLinkedList.html"><span>Docs</span></a></td>
405
+ <td><a href="https://www.npmjs.com/package/linked-list-typed"><span>NPM</span></a></td>
319
406
  <td><img alt="NPM Downloads" src="https://img.shields.io/npm/dm/linked-list-typed"></td>
320
407
  </tr>
321
408
  <tr>
322
409
  <td>Singly Linked List</td>
323
410
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
324
411
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
325
- <td><a href="https://data-structure-typed-docs.vercel.app/classes/SinglyLinkedList.html"><span>View</span></a></td>
326
- <td><a href="https://www.npmjs.com/package/singly-linked-list-typed"><span>View</span></a></td>
412
+ <td><a href="https://data-structure-typed-docs.vercel.app/classes/SinglyLinkedList.html"><span>Docs</span></a></td>
413
+ <td><a href="https://www.npmjs.com/package/singly-linked-list-typed"><span>NPM</span></a></td>
327
414
  <td><img alt="NPM Downloads" src="https://img.shields.io/npm/dm/singly-linked-list-typed"></td>
328
415
  </tr>
329
416
  <tr>
330
417
  <td>Doubly Linked List</td>
331
418
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
332
419
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
333
- <td><a href="https://data-structure-typed-docs.vercel.app/classes/DoublyLinkedList.html"><span>View</span></a></td>
334
- <td><a href="https://www.npmjs.com/package/doubly-linked-list-typed"><span>View</span></a></td>
420
+ <td><a href="https://data-structure-typed-docs.vercel.app/classes/DoublyLinkedList.html"><span>Docs</span></a></td>
421
+ <td><a href="https://www.npmjs.com/package/doubly-linked-list-typed"><span>NPM</span></a></td>
335
422
  <td><img alt="NPM Downloads" src="https://img.shields.io/npm/dm/doubly-linked-list-typed"></td>
336
423
  </tr>
337
424
  <tr>
338
425
  <td>Stack</td>
339
426
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
340
427
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
341
- <td><a href="https://data-structure-typed-docs.vercel.app/classes/Stack.html"><span>View</span></a></td>
342
- <td><a href="https://www.npmjs.com/package/stack-typed"><span>View</span></a></td>
428
+ <td><a href="https://data-structure-typed-docs.vercel.app/classes/Stack.html"><span>Docs</span></a></td>
429
+ <td><a href="https://www.npmjs.com/package/stack-typed"><span>NPM</span></a></td>
343
430
  <td><img alt="NPM Downloads" src="https://img.shields.io/npm/dm/stack-typed"></td>
344
431
  </tr>
345
432
  <tr>
346
433
  <td>Segment Tree</td>
347
434
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
348
435
  <td></td>
349
- <td><a href="https://data-structure-typed-docs.vercel.app/classes/SegmentTree.html"><span>View</span></a></td>
436
+ <td><a href="https://data-structure-typed-docs.vercel.app/classes/SegmentTree.html"><span>Docs</span></a></td>
350
437
  <td><a href="https://www.npmjs.com/package/segment-tree-typed"><span></span></a></td>
351
438
  <td></td>
352
439
  </tr>
@@ -354,7 +441,7 @@ We provide data structures that are not available in JS/TS
354
441
  <td>Binary Indexed Tree</td>
355
442
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
356
443
  <td></td>
357
- <td><a href="https://data-structure-typed-docs.vercel.app/classes/BinaryIndexedTree.html"><span>View</span></a></td>
444
+ <td><a href="https://data-structure-typed-docs.vercel.app/classes/BinaryIndexedTree.html"><span>Docs</span></a></td>
358
445
  <td><a href="https://www.npmjs.com/package/binary-indexed-tree-typed"><span></span></a></td>
359
446
  <td></td>
360
447
  </tr>
@@ -5,7 +5,7 @@
5
5
  * @copyright Copyright (c) 2022 Tyler Zeng <zrwusa@gmail.com>
6
6
  * @license MIT License
7
7
  */
8
- import type { AVLTreeMultiMapNested, AVLTreeMultiMapNodeNested, AVLTreeMultiMapOptions, BinaryTreeDeleteResult, BSTNKeyOrNode, BTNCallback, IterationType, KeyOrNodeOrEntry } from '../../types';
8
+ import type { AVLTreeMultiMapNested, AVLTreeMultiMapNodeNested, AVLTreeMultiMapOptions, BinaryTreeDeleteResult, BSTNKeyOrNode, BTNCallback, BTNKeyOrNodeOrEntry, IterationType } from '../../types';
9
9
  import { BTNEntry } from '../../types';
10
10
  import { IBinaryTree } from '../../interfaces';
11
11
  import { AVLTree, AVLTreeNode } from './avl-tree';
@@ -46,7 +46,7 @@ export declare class AVLTreeMultiMap<K = any, V = any, R = BTNEntry<K, V>, NODE
46
46
  * behavior of the AVLTreeMultiMap. It can include properties such as `compareKeys` and
47
47
  * `compareValues` functions to define custom comparison logic for keys and values, respectively.
48
48
  */
49
- constructor(keysOrNodesOrEntriesOrRawElements?: Iterable<R | KeyOrNodeOrEntry<K, V, NODE>>, options?: AVLTreeMultiMapOptions<K, V, R>);
49
+ constructor(keysOrNodesOrEntriesOrRawElements?: Iterable<R | BTNKeyOrNodeOrEntry<K, V, NODE>>, options?: AVLTreeMultiMapOptions<K, V, R>);
50
50
  protected _count: number;
51
51
  /**
52
52
  * The function calculates the sum of the count property of all nodes in a tree using depth-first
@@ -89,17 +89,17 @@ export declare class AVLTreeMultiMap<K = any, V = any, R = BTNEntry<K, V>, NODE
89
89
  createTree(options?: AVLTreeMultiMapOptions<K, V, R>): TREE;
90
90
  /**
91
91
  * The function checks if the input is an instance of AVLTreeMultiMapNode.
92
- * @param {R | KeyOrNodeOrEntry<K, V, NODE>} keyOrNodeOrEntryOrRawElement - The parameter
93
- * `keyOrNodeOrEntryOrRawElement` can be of type `R` or `KeyOrNodeOrEntry<K, V, NODE>`.
92
+ * @param {R | BTNKeyOrNodeOrEntry<K, V, NODE>} keyOrNodeOrEntryOrRawElement - The parameter
93
+ * `keyOrNodeOrEntryOrRawElement` can be of type `R` or `BTNKeyOrNodeOrEntry<K, V, NODE>`.
94
94
  * @returns a boolean value indicating whether the input parameter `keyOrNodeOrEntryOrRawElement` is
95
95
  * an instance of the `AVLTreeMultiMapNode` class.
96
96
  */
97
- isNode(keyOrNodeOrEntryOrRawElement: R | KeyOrNodeOrEntry<K, V, NODE>): keyOrNodeOrEntryOrRawElement is NODE;
97
+ isNode(keyOrNodeOrEntryOrRawElement: R | BTNKeyOrNodeOrEntry<K, V, NODE>): keyOrNodeOrEntryOrRawElement is NODE;
98
98
  /**
99
99
  * The function `keyValueOrEntryOrRawElementToNode` converts a key, value, entry, or raw element into
100
100
  * a node object.
101
- * @param {R | KeyOrNodeOrEntry<K, V, NODE>} keyOrNodeOrEntryOrRawElement - The
102
- * `keyOrNodeOrEntryOrRawElement` parameter can be of type `R` or `KeyOrNodeOrEntry<K, V, NODE>`.
101
+ * @param {R | BTNKeyOrNodeOrEntry<K, V, NODE>} keyOrNodeOrEntryOrRawElement - The
102
+ * `keyOrNodeOrEntryOrRawElement` parameter can be of type `R` or `BTNKeyOrNodeOrEntry<K, V, NODE>`.
103
103
  * @param {V} [value] - The `value` parameter is an optional value that can be passed to the
104
104
  * `override` function. It represents the value associated with the key in the data structure. If no
105
105
  * value is provided, it will default to `undefined`.
@@ -107,7 +107,7 @@ export declare class AVLTreeMultiMap<K = any, V = any, R = BTNEntry<K, V>, NODE
107
107
  * times the key-value pair should be added to the data structure. If not provided, it defaults to 1.
108
108
  * @returns either a NODE object or undefined.
109
109
  */
110
- keyValueOrEntryOrRawElementToNode(keyOrNodeOrEntryOrRawElement: R | KeyOrNodeOrEntry<K, V, NODE>, value?: V, count?: number): NODE | undefined;
110
+ keyValueOrEntryOrRawElementToNode(keyOrNodeOrEntryOrRawElement: R | BTNKeyOrNodeOrEntry<K, V, NODE>, value?: V, count?: number): NODE | undefined;
111
111
  /**
112
112
  * Time Complexity: O(log n)
113
113
  * Space Complexity: O(1)
@@ -118,9 +118,9 @@ export declare class AVLTreeMultiMap<K = any, V = any, R = BTNEntry<K, V>, NODE
118
118
  *
119
119
  * The function overrides the add method of a TypeScript class to add a new node to a data structure
120
120
  * and update the count.
121
- * @param {R | KeyOrNodeOrEntry<K, V, NODE>} keyOrNodeOrEntryOrRawElement - The
121
+ * @param {R | BTNKeyOrNodeOrEntry<K, V, NODE>} keyOrNodeOrEntryOrRawElement - The
122
122
  * `keyOrNodeOrEntryOrRawElement` parameter can accept a value of type `R`, which can be any type. It
123
- * can also accept a value of type `KeyOrNodeOrEntry<K, V, NODE>`, which represents a key, node,
123
+ * can also accept a value of type `BTNKeyOrNodeOrEntry<K, V, NODE>`, which represents a key, node,
124
124
  * entry, or raw element
125
125
  * @param {V} [value] - The `value` parameter represents the value associated with the key in the
126
126
  * data structure. It is an optional parameter, so it can be omitted if not needed.
@@ -129,7 +129,7 @@ export declare class AVLTreeMultiMap<K = any, V = any, R = BTNEntry<K, V>, NODE
129
129
  * be added once. However, you can specify a different value for `count` if you want to add
130
130
  * @returns a boolean value.
131
131
  */
132
- add(keyOrNodeOrEntryOrRawElement: R | KeyOrNodeOrEntry<K, V, NODE>, value?: V, count?: number): boolean;
132
+ add(keyOrNodeOrEntryOrRawElement: R | BTNKeyOrNodeOrEntry<K, V, NODE>, value?: V, count?: number): boolean;
133
133
  /**
134
134
  * Time Complexity: O(log n)
135
135
  * Space Complexity: O(1)
@@ -104,8 +104,8 @@ class AVLTreeMultiMap extends avl_tree_1.AVLTree {
104
104
  }
105
105
  /**
106
106
  * The function checks if the input is an instance of AVLTreeMultiMapNode.
107
- * @param {R | KeyOrNodeOrEntry<K, V, NODE>} keyOrNodeOrEntryOrRawElement - The parameter
108
- * `keyOrNodeOrEntryOrRawElement` can be of type `R` or `KeyOrNodeOrEntry<K, V, NODE>`.
107
+ * @param {R | BTNKeyOrNodeOrEntry<K, V, NODE>} keyOrNodeOrEntryOrRawElement - The parameter
108
+ * `keyOrNodeOrEntryOrRawElement` can be of type `R` or `BTNKeyOrNodeOrEntry<K, V, NODE>`.
109
109
  * @returns a boolean value indicating whether the input parameter `keyOrNodeOrEntryOrRawElement` is
110
110
  * an instance of the `AVLTreeMultiMapNode` class.
111
111
  */
@@ -115,8 +115,8 @@ class AVLTreeMultiMap extends avl_tree_1.AVLTree {
115
115
  /**
116
116
  * The function `keyValueOrEntryOrRawElementToNode` converts a key, value, entry, or raw element into
117
117
  * a node object.
118
- * @param {R | KeyOrNodeOrEntry<K, V, NODE>} keyOrNodeOrEntryOrRawElement - The
119
- * `keyOrNodeOrEntryOrRawElement` parameter can be of type `R` or `KeyOrNodeOrEntry<K, V, NODE>`.
118
+ * @param {R | BTNKeyOrNodeOrEntry<K, V, NODE>} keyOrNodeOrEntryOrRawElement - The
119
+ * `keyOrNodeOrEntryOrRawElement` parameter can be of type `R` or `BTNKeyOrNodeOrEntry<K, V, NODE>`.
120
120
  * @param {V} [value] - The `value` parameter is an optional value that can be passed to the
121
121
  * `override` function. It represents the value associated with the key in the data structure. If no
122
122
  * value is provided, it will default to `undefined`.
@@ -155,9 +155,9 @@ class AVLTreeMultiMap extends avl_tree_1.AVLTree {
155
155
  *
156
156
  * The function overrides the add method of a TypeScript class to add a new node to a data structure
157
157
  * and update the count.
158
- * @param {R | KeyOrNodeOrEntry<K, V, NODE>} keyOrNodeOrEntryOrRawElement - The
158
+ * @param {R | BTNKeyOrNodeOrEntry<K, V, NODE>} keyOrNodeOrEntryOrRawElement - The
159
159
  * `keyOrNodeOrEntryOrRawElement` parameter can accept a value of type `R`, which can be any type. It
160
- * can also accept a value of type `KeyOrNodeOrEntry<K, V, NODE>`, which represents a key, node,
160
+ * can also accept a value of type `BTNKeyOrNodeOrEntry<K, V, NODE>`, which represents a key, node,
161
161
  * entry, or raw element
162
162
  * @param {V} [value] - The `value` parameter represents the value associated with the key in the
163
163
  * data structure. It is an optional parameter, so it can be omitted if not needed.
@@ -1 +1 @@
1
- {"version":3,"file":"avl-tree-multi-map.js","sourceRoot":"","sources":["../../../../src/data-structures/binary-tree/avl-tree-multi-map.ts"],"names":[],"mappings":";;;AAmBA,yCAAkD;AAElD,MAAa,mBAIX,SAAQ,sBAAuB;IAC/B;;;;;;;;;OASG;IACH,YAAY,GAAM,EAAE,KAAS,EAAE,KAAK,GAAG,CAAC;QACtC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAIV,WAAM,GAAW,CAAC,CAAC;QAH3B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAID;;;OAGG;IACH,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED;;;;OAIG;IACH,IAAI,KAAK,CAAC,KAAa;QACrB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACtB,CAAC;CACF;AAtCD,kDAsCC;AAED;;GAEG;AACH,MAAa,eAaX,SAAQ,kBAA4B;IAEpC;;;;;;;OAOG;IACH,YACE,oCAAgF,EAAE,EAClF,OAAyC;QAEzC,KAAK,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;QAIX,WAAM,GAAG,CAAC,CAAC;QAHnB,IAAI,iCAAiC;YAAE,IAAI,CAAC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O,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QAC9C,OAAO,KAAK,CAAC,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC9C,CAAC;CACF;AA/ZD,0CA+ZC"}
@@ -6,7 +6,7 @@
6
6
  * @license MIT License
7
7
  */
8
8
  import { BST, BSTNode } from './bst';
9
- import type { AVLTreeNested, AVLTreeNodeNested, AVLTreeOptions, BinaryTreeDeleteResult, BSTNKeyOrNode, BTNCallback, KeyOrNodeOrEntry } from '../../types';
9
+ import type { AVLTreeNested, AVLTreeNodeNested, AVLTreeOptions, BinaryTreeDeleteResult, BSTNKeyOrNode, BTNCallback, BTNKeyOrNodeOrEntry } from '../../types';
10
10
  import { BTNEntry } from '../../types';
11
11
  import { IBinaryTree } from '../../interfaces';
12
12
  export declare class AVLTreeNode<K = any, V = any, NODE extends AVLTreeNode<K, V, NODE> = AVLTreeNodeNested<K, V>> extends BSTNode<K, V, NODE> {
@@ -53,7 +53,7 @@ export declare class AVLTree<K = any, V = any, R = BTNEntry<K, V>, NODE extends
53
53
  * keys), `allowDuplicates` (a boolean indicating whether duplicate keys are allowed), and
54
54
  * `nodeBuilder` (
55
55
  */
56
- constructor(keysOrNodesOrEntriesOrRawElements?: Iterable<R | KeyOrNodeOrEntry<K, V, NODE>>, options?: AVLTreeOptions<K, V, R>);
56
+ constructor(keysOrNodesOrEntriesOrRawElements?: Iterable<R | BTNKeyOrNodeOrEntry<K, V, NODE>>, options?: AVLTreeOptions<K, V, R>);
57
57
  /**
58
58
  * The function creates a new AVL tree node with the given key and value.
59
59
  * @param {K} key - The key parameter is of type K, which represents the key of the node being
@@ -74,12 +74,12 @@ export declare class AVLTree<K = any, V = any, R = BTNEntry<K, V>, NODE extends
74
74
  createTree(options?: AVLTreeOptions<K, V, R>): TREE;
75
75
  /**
76
76
  * The function checks if the input is an instance of AVLTreeNode.
77
- * @param {R | KeyOrNodeOrEntry<K, V, NODE>} keyOrNodeOrEntryOrRawElement - The parameter
78
- * `keyOrNodeOrEntryOrRawElement` can be of type `R` or `KeyOrNodeOrEntry<K, V, NODE>`.
77
+ * @param {R | BTNKeyOrNodeOrEntry<K, V, NODE>} keyOrNodeOrEntryOrRawElement - The parameter
78
+ * `keyOrNodeOrEntryOrRawElement` can be of type `R` or `BTNKeyOrNodeOrEntry<K, V, NODE>`.
79
79
  * @returns a boolean value indicating whether the input parameter `keyOrNodeOrEntryOrRawElement` is
80
80
  * an instance of the `AVLTreeNode` class.
81
81
  */
82
- isNode(keyOrNodeOrEntryOrRawElement: R | KeyOrNodeOrEntry<K, V, NODE>): keyOrNodeOrEntryOrRawElement is NODE;
82
+ isNode(keyOrNodeOrEntryOrRawElement: R | BTNKeyOrNodeOrEntry<K, V, NODE>): keyOrNodeOrEntryOrRawElement is NODE;
83
83
  /**
84
84
  * Time Complexity: O(log n)
85
85
  * Space Complexity: O(1)
@@ -91,14 +91,14 @@ export declare class AVLTree<K = any, V = any, R = BTNEntry<K, V>, NODE extends
91
91
  *
92
92
  * The function overrides the add method of a class and inserts a key-value pair into a data
93
93
  * structure, then balances the path.
94
- * @param {R | KeyOrNodeOrEntry<K, V, NODE>} keyOrNodeOrEntryOrRawElement - The parameter
95
- * `keyOrNodeOrEntryOrRawElement` can accept values of type `R`, `KeyOrNodeOrEntry<K, V, NODE>`, or
94
+ * @param {R | BTNKeyOrNodeOrEntry<K, V, NODE>} keyOrNodeOrEntryOrRawElement - The parameter
95
+ * `keyOrNodeOrEntryOrRawElement` can accept values of type `R`, `BTNKeyOrNodeOrEntry<K, V, NODE>`, or
96
96
  * `RawElement`.
97
97
  * @param {V} [value] - The `value` parameter is an optional value that you want to associate with
98
98
  * the key or node being added to the data structure.
99
99
  * @returns The method is returning a boolean value.
100
100
  */
101
- add(keyOrNodeOrEntryOrRawElement: R | KeyOrNodeOrEntry<K, V, NODE>, value?: V): boolean;
101
+ add(keyOrNodeOrEntryOrRawElement: R | BTNKeyOrNodeOrEntry<K, V, NODE>, value?: V): boolean;
102
102
  /**
103
103
  * Time Complexity: O(log n)
104
104
  * Space Complexity: O(1)
@@ -222,10 +222,10 @@ export declare class AVLTree<K = any, V = any, R = BTNEntry<K, V>, NODE extends
222
222
  *
223
223
  * The `_balancePath` function is used to update the heights of nodes and perform rotation operations
224
224
  * to restore balance in an AVL tree after inserting a node.
225
- * @param {R | KeyOrNodeOrEntry<K, V, NODE>} node - The `node` parameter can be of type `R` or
226
- * `KeyOrNodeOrEntry<K, V, NODE>`.
225
+ * @param {R | BTNKeyOrNodeOrEntry<K, V, NODE>} node - The `node` parameter can be of type `R` or
226
+ * `BTNKeyOrNodeOrEntry<K, V, NODE>`.
227
227
  */
228
- protected _balancePath(node: R | KeyOrNodeOrEntry<K, V, NODE>): void;
228
+ protected _balancePath(node: R | BTNKeyOrNodeOrEntry<K, V, NODE>): void;
229
229
  /**
230
230
  * Time Complexity: O(1)
231
231
  * Space Complexity: O(1)
@@ -89,8 +89,8 @@ class AVLTree extends bst_1.BST {
89
89
  }
90
90
  /**
91
91
  * The function checks if the input is an instance of AVLTreeNode.
92
- * @param {R | KeyOrNodeOrEntry<K, V, NODE>} keyOrNodeOrEntryOrRawElement - The parameter
93
- * `keyOrNodeOrEntryOrRawElement` can be of type `R` or `KeyOrNodeOrEntry<K, V, NODE>`.
92
+ * @param {R | BTNKeyOrNodeOrEntry<K, V, NODE>} keyOrNodeOrEntryOrRawElement - The parameter
93
+ * `keyOrNodeOrEntryOrRawElement` can be of type `R` or `BTNKeyOrNodeOrEntry<K, V, NODE>`.
94
94
  * @returns a boolean value indicating whether the input parameter `keyOrNodeOrEntryOrRawElement` is
95
95
  * an instance of the `AVLTreeNode` class.
96
96
  */
@@ -108,8 +108,8 @@ class AVLTree extends bst_1.BST {
108
108
  *
109
109
  * The function overrides the add method of a class and inserts a key-value pair into a data
110
110
  * structure, then balances the path.
111
- * @param {R | KeyOrNodeOrEntry<K, V, NODE>} keyOrNodeOrEntryOrRawElement - The parameter
112
- * `keyOrNodeOrEntryOrRawElement` can accept values of type `R`, `KeyOrNodeOrEntry<K, V, NODE>`, or
111
+ * @param {R | BTNKeyOrNodeOrEntry<K, V, NODE>} keyOrNodeOrEntryOrRawElement - The parameter
112
+ * `keyOrNodeOrEntryOrRawElement` can accept values of type `R`, `BTNKeyOrNodeOrEntry<K, V, NODE>`, or
113
113
  * `RawElement`.
114
114
  * @param {V} [value] - The `value` parameter is an optional value that you want to associate with
115
115
  * the key or node being added to the data structure.
@@ -439,8 +439,8 @@ class AVLTree extends bst_1.BST {
439
439
  *
440
440
  * The `_balancePath` function is used to update the heights of nodes and perform rotation operations
441
441
  * to restore balance in an AVL tree after inserting a node.
442
- * @param {R | KeyOrNodeOrEntry<K, V, NODE>} node - The `node` parameter can be of type `R` or
443
- * `KeyOrNodeOrEntry<K, V, NODE>`.
442
+ * @param {R | BTNKeyOrNodeOrEntry<K, V, NODE>} node - The `node` parameter can be of type `R` or
443
+ * `BTNKeyOrNodeOrEntry<K, V, NODE>`.
444
444
  */
445
445
  _balancePath(node) {
446
446
  node = this.ensureNode(node);