data-structure-typed 1.50.2 → 1.50.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.
Files changed (203) hide show
  1. package/.github/ISSUE_TEMPLATE/bug_report.md +0 -13
  2. package/CHANGELOG.md +1 -1
  3. package/README.md +23 -21
  4. package/README_zh-CN.md +7 -7
  5. package/SPECIFICATION.md +56 -0
  6. package/SPONSOR-zh-CN.md +90 -0
  7. package/SPONSOR.md +54 -0
  8. package/benchmark/report.html +13 -13
  9. package/benchmark/report.json +149 -155
  10. package/dist/cjs/data-structures/base/iterable-base.d.ts +6 -0
  11. package/dist/cjs/data-structures/base/iterable-base.js.map +1 -1
  12. package/dist/cjs/data-structures/binary-tree/{tree-multimap.d.ts → avl-tree-multi-map.d.ts} +43 -10
  13. package/dist/cjs/data-structures/binary-tree/{tree-multimap.js → avl-tree-multi-map.js} +50 -12
  14. package/dist/cjs/data-structures/binary-tree/avl-tree-multi-map.js.map +1 -0
  15. package/dist/cjs/data-structures/binary-tree/avl-tree.d.ts +29 -1
  16. package/dist/cjs/data-structures/binary-tree/avl-tree.js +33 -1
  17. package/dist/cjs/data-structures/binary-tree/avl-tree.js.map +1 -1
  18. package/dist/cjs/data-structures/binary-tree/binary-indexed-tree.d.ts +22 -0
  19. package/dist/cjs/data-structures/binary-tree/binary-indexed-tree.js +22 -0
  20. package/dist/cjs/data-structures/binary-tree/binary-indexed-tree.js.map +1 -1
  21. package/dist/cjs/data-structures/binary-tree/binary-tree.d.ts +1 -1
  22. package/dist/cjs/data-structures/binary-tree/binary-tree.js +1 -1
  23. package/dist/cjs/data-structures/binary-tree/bst.d.ts +46 -13
  24. package/dist/cjs/data-structures/binary-tree/bst.js +51 -20
  25. package/dist/cjs/data-structures/binary-tree/bst.js.map +1 -1
  26. package/dist/cjs/data-structures/binary-tree/index.d.ts +2 -1
  27. package/dist/cjs/data-structures/binary-tree/index.js +2 -1
  28. package/dist/cjs/data-structures/binary-tree/index.js.map +1 -1
  29. package/dist/cjs/data-structures/binary-tree/rb-tree.d.ts +54 -2
  30. package/dist/cjs/data-structures/binary-tree/rb-tree.js +90 -24
  31. package/dist/cjs/data-structures/binary-tree/rb-tree.js.map +1 -1
  32. package/dist/cjs/data-structures/binary-tree/segment-tree.d.ts +99 -6
  33. package/dist/cjs/data-structures/binary-tree/segment-tree.js +127 -10
  34. package/dist/cjs/data-structures/binary-tree/segment-tree.js.map +1 -1
  35. package/dist/cjs/data-structures/binary-tree/tree-multi-map.d.ts +200 -0
  36. package/dist/cjs/data-structures/binary-tree/tree-multi-map.js +400 -0
  37. package/dist/cjs/data-structures/binary-tree/tree-multi-map.js.map +1 -0
  38. package/dist/cjs/data-structures/graph/abstract-graph.d.ts +0 -78
  39. package/dist/cjs/data-structures/graph/abstract-graph.js +0 -189
  40. package/dist/cjs/data-structures/graph/abstract-graph.js.map +1 -1
  41. package/dist/cjs/data-structures/graph/directed-graph.d.ts +59 -0
  42. package/dist/cjs/data-structures/graph/directed-graph.js +105 -0
  43. package/dist/cjs/data-structures/graph/directed-graph.js.map +1 -1
  44. package/dist/cjs/data-structures/graph/undirected-graph.d.ts +60 -7
  45. package/dist/cjs/data-structures/graph/undirected-graph.js +126 -18
  46. package/dist/cjs/data-structures/graph/undirected-graph.js.map +1 -1
  47. package/dist/cjs/data-structures/hash/hash-map.d.ts +143 -23
  48. package/dist/cjs/data-structures/hash/hash-map.js +196 -62
  49. package/dist/cjs/data-structures/hash/hash-map.js.map +1 -1
  50. package/dist/cjs/data-structures/heap/heap.d.ts +29 -19
  51. package/dist/cjs/data-structures/heap/heap.js +29 -20
  52. package/dist/cjs/data-structures/heap/heap.js.map +1 -1
  53. package/dist/cjs/data-structures/linked-list/doubly-linked-list.d.ts +71 -25
  54. package/dist/cjs/data-structures/linked-list/doubly-linked-list.js +83 -25
  55. package/dist/cjs/data-structures/linked-list/doubly-linked-list.js.map +1 -1
  56. package/dist/cjs/data-structures/linked-list/singly-linked-list.d.ts +26 -3
  57. package/dist/cjs/data-structures/linked-list/singly-linked-list.js +34 -3
  58. package/dist/cjs/data-structures/linked-list/singly-linked-list.js.map +1 -1
  59. package/dist/cjs/data-structures/linked-list/skip-linked-list.d.ts +2 -2
  60. package/dist/cjs/data-structures/linked-list/skip-linked-list.js +2 -2
  61. package/dist/cjs/data-structures/matrix/matrix.d.ts +1 -1
  62. package/dist/cjs/data-structures/matrix/matrix.js +1 -1
  63. package/dist/cjs/data-structures/priority-queue/max-priority-queue.d.ts +10 -0
  64. package/dist/cjs/data-structures/priority-queue/max-priority-queue.js +10 -0
  65. package/dist/cjs/data-structures/priority-queue/max-priority-queue.js.map +1 -1
  66. package/dist/cjs/data-structures/priority-queue/min-priority-queue.d.ts +11 -0
  67. package/dist/cjs/data-structures/priority-queue/min-priority-queue.js +11 -0
  68. package/dist/cjs/data-structures/priority-queue/min-priority-queue.js.map +1 -1
  69. package/dist/cjs/data-structures/priority-queue/priority-queue.d.ts +8 -0
  70. package/dist/cjs/data-structures/priority-queue/priority-queue.js +8 -0
  71. package/dist/cjs/data-structures/priority-queue/priority-queue.js.map +1 -1
  72. package/dist/cjs/data-structures/queue/deque.d.ts +95 -21
  73. package/dist/cjs/data-structures/queue/deque.js +100 -16
  74. package/dist/cjs/data-structures/queue/deque.js.map +1 -1
  75. package/dist/cjs/data-structures/queue/queue.d.ts +65 -45
  76. package/dist/cjs/data-structures/queue/queue.js +65 -45
  77. package/dist/cjs/data-structures/queue/queue.js.map +1 -1
  78. package/dist/cjs/data-structures/stack/stack.d.ts +36 -22
  79. package/dist/cjs/data-structures/stack/stack.js +36 -22
  80. package/dist/cjs/data-structures/stack/stack.js.map +1 -1
  81. package/dist/cjs/data-structures/tree/tree.d.ts +57 -3
  82. package/dist/cjs/data-structures/tree/tree.js +77 -11
  83. package/dist/cjs/data-structures/tree/tree.js.map +1 -1
  84. package/dist/cjs/data-structures/trie/trie.d.ts +100 -36
  85. package/dist/cjs/data-structures/trie/trie.js +115 -36
  86. package/dist/cjs/data-structures/trie/trie.js.map +1 -1
  87. package/dist/cjs/types/data-structures/binary-tree/avl-tree-multi-map.d.ts +5 -0
  88. package/dist/cjs/types/data-structures/binary-tree/avl-tree-multi-map.js +3 -0
  89. package/dist/cjs/types/data-structures/binary-tree/avl-tree-multi-map.js.map +1 -0
  90. package/dist/cjs/types/data-structures/binary-tree/index.d.ts +2 -1
  91. package/dist/cjs/types/data-structures/binary-tree/index.js +2 -1
  92. package/dist/cjs/types/data-structures/binary-tree/index.js.map +1 -1
  93. package/dist/cjs/types/data-structures/binary-tree/tree-multi-map.d.ts +5 -0
  94. package/dist/cjs/types/data-structures/binary-tree/{tree-multimap.js → tree-multi-map.js} +1 -1
  95. package/dist/cjs/types/data-structures/binary-tree/tree-multi-map.js.map +1 -0
  96. package/dist/mjs/data-structures/base/iterable-base.d.ts +6 -0
  97. package/dist/mjs/data-structures/binary-tree/{tree-multimap.d.ts → avl-tree-multi-map.d.ts} +43 -10
  98. package/dist/mjs/data-structures/binary-tree/{tree-multimap.js → avl-tree-multi-map.js} +46 -9
  99. package/dist/mjs/data-structures/binary-tree/avl-tree.d.ts +29 -1
  100. package/dist/mjs/data-structures/binary-tree/avl-tree.js +34 -2
  101. package/dist/mjs/data-structures/binary-tree/binary-indexed-tree.d.ts +22 -0
  102. package/dist/mjs/data-structures/binary-tree/binary-indexed-tree.js +22 -0
  103. package/dist/mjs/data-structures/binary-tree/binary-tree.d.ts +1 -1
  104. package/dist/mjs/data-structures/binary-tree/binary-tree.js +1 -1
  105. package/dist/mjs/data-structures/binary-tree/bst.d.ts +46 -13
  106. package/dist/mjs/data-structures/binary-tree/bst.js +51 -20
  107. package/dist/mjs/data-structures/binary-tree/index.d.ts +2 -1
  108. package/dist/mjs/data-structures/binary-tree/index.js +2 -1
  109. package/dist/mjs/data-structures/binary-tree/rb-tree.d.ts +54 -2
  110. package/dist/mjs/data-structures/binary-tree/rb-tree.js +91 -25
  111. package/dist/mjs/data-structures/binary-tree/segment-tree.d.ts +99 -6
  112. package/dist/mjs/data-structures/binary-tree/segment-tree.js +127 -10
  113. package/dist/mjs/data-structures/binary-tree/tree-multi-map.d.ts +200 -0
  114. package/dist/mjs/data-structures/binary-tree/tree-multi-map.js +397 -0
  115. package/dist/mjs/data-structures/graph/abstract-graph.d.ts +0 -78
  116. package/dist/mjs/data-structures/graph/abstract-graph.js +0 -188
  117. package/dist/mjs/data-structures/graph/directed-graph.d.ts +59 -0
  118. package/dist/mjs/data-structures/graph/directed-graph.js +105 -0
  119. package/dist/mjs/data-structures/graph/undirected-graph.d.ts +60 -7
  120. package/dist/mjs/data-structures/graph/undirected-graph.js +127 -19
  121. package/dist/mjs/data-structures/hash/hash-map.d.ts +143 -23
  122. package/dist/mjs/data-structures/hash/hash-map.js +204 -70
  123. package/dist/mjs/data-structures/heap/heap.d.ts +29 -19
  124. package/dist/mjs/data-structures/heap/heap.js +29 -20
  125. package/dist/mjs/data-structures/linked-list/doubly-linked-list.d.ts +71 -25
  126. package/dist/mjs/data-structures/linked-list/doubly-linked-list.js +86 -28
  127. package/dist/mjs/data-structures/linked-list/singly-linked-list.d.ts +26 -3
  128. package/dist/mjs/data-structures/linked-list/singly-linked-list.js +36 -5
  129. package/dist/mjs/data-structures/linked-list/skip-linked-list.d.ts +2 -2
  130. package/dist/mjs/data-structures/linked-list/skip-linked-list.js +2 -2
  131. package/dist/mjs/data-structures/matrix/matrix.d.ts +1 -1
  132. package/dist/mjs/data-structures/matrix/matrix.js +1 -1
  133. package/dist/mjs/data-structures/priority-queue/max-priority-queue.d.ts +10 -0
  134. package/dist/mjs/data-structures/priority-queue/max-priority-queue.js +10 -0
  135. package/dist/mjs/data-structures/priority-queue/min-priority-queue.d.ts +11 -0
  136. package/dist/mjs/data-structures/priority-queue/min-priority-queue.js +11 -0
  137. package/dist/mjs/data-structures/priority-queue/priority-queue.d.ts +8 -0
  138. package/dist/mjs/data-structures/priority-queue/priority-queue.js +8 -0
  139. package/dist/mjs/data-structures/queue/deque.d.ts +95 -21
  140. package/dist/mjs/data-structures/queue/deque.js +105 -21
  141. package/dist/mjs/data-structures/queue/queue.d.ts +65 -45
  142. package/dist/mjs/data-structures/queue/queue.js +65 -45
  143. package/dist/mjs/data-structures/stack/stack.d.ts +36 -22
  144. package/dist/mjs/data-structures/stack/stack.js +36 -22
  145. package/dist/mjs/data-structures/tree/tree.d.ts +57 -3
  146. package/dist/mjs/data-structures/tree/tree.js +80 -14
  147. package/dist/mjs/data-structures/trie/trie.d.ts +100 -36
  148. package/dist/mjs/data-structures/trie/trie.js +118 -39
  149. package/dist/mjs/types/data-structures/binary-tree/avl-tree-multi-map.d.ts +5 -0
  150. package/dist/mjs/types/data-structures/binary-tree/index.d.ts +2 -1
  151. package/dist/mjs/types/data-structures/binary-tree/index.js +2 -1
  152. package/dist/mjs/types/data-structures/binary-tree/tree-multi-map.d.ts +5 -0
  153. package/dist/mjs/types/data-structures/binary-tree/tree-multi-map.js +1 -0
  154. package/dist/umd/data-structure-typed.js +1876 -656
  155. package/dist/umd/data-structure-typed.min.js +2 -2
  156. package/dist/umd/data-structure-typed.min.js.map +1 -1
  157. package/package.json +59 -58
  158. package/src/data-structures/base/iterable-base.ts +12 -0
  159. package/src/data-structures/binary-tree/{tree-multimap.ts → avl-tree-multi-map.ts} +59 -20
  160. package/src/data-structures/binary-tree/avl-tree.ts +37 -3
  161. package/src/data-structures/binary-tree/binary-indexed-tree.ts +22 -0
  162. package/src/data-structures/binary-tree/binary-tree.ts +1 -1
  163. package/src/data-structures/binary-tree/bst.ts +51 -19
  164. package/src/data-structures/binary-tree/index.ts +2 -1
  165. package/src/data-structures/binary-tree/rb-tree.ts +99 -28
  166. package/src/data-structures/binary-tree/segment-tree.ts +145 -11
  167. package/src/data-structures/binary-tree/tree-multi-map.ts +463 -0
  168. package/src/data-structures/graph/abstract-graph.ts +0 -211
  169. package/src/data-structures/graph/directed-graph.ts +122 -0
  170. package/src/data-structures/graph/undirected-graph.ts +143 -19
  171. package/src/data-structures/hash/hash-map.ts +228 -76
  172. package/src/data-structures/heap/heap.ts +31 -20
  173. package/src/data-structures/linked-list/doubly-linked-list.ts +96 -29
  174. package/src/data-structures/linked-list/singly-linked-list.ts +42 -6
  175. package/src/data-structures/linked-list/skip-linked-list.ts +2 -2
  176. package/src/data-structures/matrix/matrix.ts +1 -1
  177. package/src/data-structures/priority-queue/max-priority-queue.ts +10 -0
  178. package/src/data-structures/priority-queue/min-priority-queue.ts +11 -0
  179. package/src/data-structures/priority-queue/priority-queue.ts +8 -0
  180. package/src/data-structures/queue/deque.ts +118 -22
  181. package/src/data-structures/queue/queue.ts +68 -45
  182. package/src/data-structures/stack/stack.ts +39 -23
  183. package/src/data-structures/tree/tree.ts +89 -15
  184. package/src/data-structures/trie/trie.ts +131 -40
  185. package/src/types/data-structures/binary-tree/avl-tree-multi-map.ts +8 -0
  186. package/src/types/data-structures/binary-tree/index.ts +2 -1
  187. package/src/types/data-structures/binary-tree/tree-multi-map.ts +8 -0
  188. package/test/integration/index.html +2 -2
  189. package/test/performance/data-structures/graph/directed-graph.test.ts +1 -1
  190. package/test/unit/data-structures/binary-tree/{tree-multimap.test.ts → avl-tree-multi-map.test.ts} +55 -55
  191. package/test/unit/data-structures/binary-tree/overall.test.ts +24 -25
  192. package/test/unit/data-structures/binary-tree/tree-multi-map.test.ts +706 -0
  193. package/test/unit/data-structures/graph/abstract-graph.test.ts +3 -0
  194. package/test/unit/data-structures/graph/directed-graph.test.ts +189 -253
  195. package/test/unit/data-structures/graph/undirected-graph.test.ts +263 -18
  196. package/test/unit/data-structures/queue/queue.test.ts +2 -0
  197. package/test/unit/unrestricted-interconversion.test.ts +3 -3
  198. package/dist/cjs/data-structures/binary-tree/tree-multimap.js.map +0 -1
  199. package/dist/cjs/types/data-structures/binary-tree/tree-multimap.d.ts +0 -5
  200. package/dist/cjs/types/data-structures/binary-tree/tree-multimap.js.map +0 -1
  201. package/dist/mjs/types/data-structures/binary-tree/tree-multimap.d.ts +0 -5
  202. package/src/types/data-structures/binary-tree/tree-multimap.ts +0 -8
  203. /package/dist/mjs/types/data-structures/binary-tree/{tree-multimap.js → avl-tree-multi-map.js} +0 -0
@@ -12,10 +12,46 @@ import { IterableElementBase } from '../base';
12
12
  * and a flag indicating whether it's the end of a word.
13
13
  */
14
14
  export declare class TrieNode {
15
- key: string;
16
- children: Map<string, TrieNode>;
17
- isEnd: boolean;
18
15
  constructor(key: string);
16
+ protected _key: string;
17
+ /**
18
+ * The function returns the value of the protected variable _key.
19
+ * @returns The value of the `_key` property, which is a string.
20
+ */
21
+ get key(): string;
22
+ /**
23
+ * The above function sets the value of a protected variable called "key".
24
+ * @param {string} value - The value parameter is a string that represents the value to be assigned
25
+ * to the key.
26
+ */
27
+ set key(value: string);
28
+ protected _children: Map<string, TrieNode>;
29
+ /**
30
+ * The function returns the children of a TrieNode as a Map.
31
+ * @returns The `children` property of the TrieNode object, which is a Map containing string keys and
32
+ * TrieNode values.
33
+ */
34
+ get children(): Map<string, TrieNode>;
35
+ /**
36
+ * The function sets the value of the `_children` property of a TrieNode object.
37
+ * @param value - The value parameter is a Map object that represents the children of a TrieNode. The
38
+ * keys of the map are strings, which represent the characters that are associated with each child
39
+ * TrieNode. The values of the map are TrieNode objects, which represent the child nodes of the
40
+ * current TrieNode.
41
+ */
42
+ set children(value: Map<string, TrieNode>);
43
+ protected _isEnd: boolean;
44
+ /**
45
+ * The function returns a boolean value indicating whether a certain condition is met.
46
+ * @returns The method is returning a boolean value, specifically the value of the variable `_isEnd`.
47
+ */
48
+ get isEnd(): boolean;
49
+ /**
50
+ * The function sets the value of the "_isEnd" property.
51
+ * @param {boolean} value - The value parameter is a boolean value that indicates whether the current
52
+ * state is the end state or not.
53
+ */
54
+ set isEnd(value: boolean);
19
55
  }
20
56
  /**
21
57
  * 1. Node Structure: Each node in a Trie represents a string (or a part of a string). The root node typically represents an empty string.
@@ -46,9 +82,8 @@ export declare class Trie extends IterableElementBase<string, Trie> {
46
82
  get size(): number;
47
83
  protected _caseSensitive: boolean;
48
84
  /**
49
- * The caseSensitive function is a getter that returns the value of the private _caseSensitive property.
50
- *
51
- * @return The value of the _casesensitive private variable
85
+ * The caseSensitive function is a getter that returns the value of the protected _caseSensitive property.
86
+ * @return The value of the _caseSensitive protected variable
52
87
  */
53
88
  get caseSensitive(): boolean;
54
89
  protected _root: TrieNode;
@@ -58,12 +93,12 @@ export declare class Trie extends IterableElementBase<string, Trie> {
58
93
  */
59
94
  get root(): TrieNode;
60
95
  /**
61
- * Time Complexity: O(M), where M is the length of the word being added.
62
- * Space Complexity: O(M) - Each character in the word adds a TrieNode.
96
+ * Time Complexity: O(l), where l is the length of the word being added.
97
+ * Space Complexity: O(l) - Each character in the word adds a TrieNode.
63
98
  */
64
99
  /**
65
- * Time Complexity: O(M), where M is the length of the word being added.
66
- * Space Complexity: O(M) - Each character in the word adds a TrieNode.
100
+ * Time Complexity: O(l), where l is the length of the word being added.
101
+ * Space Complexity: O(l) - Each character in the word adds a TrieNode.
67
102
  *
68
103
  * Add a word to the Trie structure.
69
104
  * @param {string} word - The word to add.
@@ -71,11 +106,11 @@ export declare class Trie extends IterableElementBase<string, Trie> {
71
106
  */
72
107
  add(word: string): boolean;
73
108
  /**
74
- * Time Complexity: O(M), where M is the length of the input word.
109
+ * Time Complexity: O(l), where l is the length of the input word.
75
110
  * Space Complexity: O(1) - Constant space.
76
111
  */
77
112
  /**
78
- * Time Complexity: O(M), where M is the length of the input word.
113
+ * Time Complexity: O(l), where l is the length of the input word.
79
114
  * Space Complexity: O(1) - Constant space.
80
115
  *
81
116
  * Check if the Trie contains a given word.
@@ -84,17 +119,35 @@ export declare class Trie extends IterableElementBase<string, Trie> {
84
119
  */
85
120
  has(word: string): boolean;
86
121
  /**
122
+ * Time Complexity: O(1)
123
+ * Space Complexity: O(1)
124
+ */
125
+ /**
126
+ * Time Complexity: O(1)
127
+ * Space Complexity: O(1)
128
+ *
87
129
  * The isEmpty function checks if the size of the queue is 0.
88
130
  * @return True if the size of the queue is 0
89
131
  */
90
132
  isEmpty(): boolean;
91
133
  /**
92
- * Time Complexity: O(M), where M is the length of the word being deleted.
93
- * Space Complexity: O(M) - Due to the recursive DFS approach.
134
+ * Time Complexity: O(1)
135
+ * Space Complexity: O(1)
136
+ */
137
+ /**
138
+ * Time Complexity: O(1)
139
+ * Space Complexity: O(1)
140
+ *
141
+ * The clear function resets the size of the Trie to 0 and creates a new root TrieNode.
142
+ */
143
+ clear(): void;
144
+ /**
145
+ * Time Complexity: O(l), where l is the length of the word being deleted.
146
+ * Space Complexity: O(n) - Due to the recursive DFS approach.
94
147
  */
95
148
  /**
96
- * Time Complexity: O(M), where M is the length of the word being deleted.
97
- * Space Complexity: O(M) - Due to the recursive DFS approach.
149
+ * Time Complexity: O(l), where l is the length of the word being deleted.
150
+ * Space Complexity: O(n) - Due to the recursive DFS approach.
98
151
  *
99
152
  * Remove a word from the Trie structure.
100
153
  * @param{string} word - The word to delete.
@@ -102,21 +155,21 @@ export declare class Trie extends IterableElementBase<string, Trie> {
102
155
  */
103
156
  delete(word: string): boolean;
104
157
  /**
105
- * Time Complexity: O(N), where N is the total number of nodes in the trie.
158
+ * Time Complexity: O(n), where n is the total number of nodes in the trie.
106
159
  * Space Complexity: O(1) - Constant space.
107
160
  */
108
161
  /**
109
- * Time Complexity: O(N), where N is the total number of nodes in the trie.
162
+ * Time Complexity: O(n), where n is the total number of nodes in the trie.
110
163
  * Space Complexity: O(1) - Constant space.
111
164
  *
112
165
  */
113
166
  getHeight(): number;
114
167
  /**
115
- * Time Complexity: O(M), where M is the length of the input prefix.
168
+ * Time Complexity: O(l), where l is the length of the input prefix.
116
169
  * Space Complexity: O(1) - Constant space.
117
170
  */
118
171
  /**
119
- * Time Complexity: O(M), where M is the length of the input prefix.
172
+ * Time Complexity: O(l), where l is the length of the input prefix.
120
173
  * Space Complexity: O(1) - Constant space.
121
174
  *
122
175
  * Check if a given input string has an absolute prefix in the Trie, meaning it's not a complete word.
@@ -125,11 +178,11 @@ export declare class Trie extends IterableElementBase<string, Trie> {
125
178
  */
126
179
  hasPurePrefix(input: string): boolean;
127
180
  /**
128
- * Time Complexity: O(M), where M is the length of the input prefix.
181
+ * Time Complexity: O(l), where l is the length of the input prefix.
129
182
  * Space Complexity: O(1) - Constant space.
130
183
  */
131
184
  /**
132
- * Time Complexity: O(M), where M is the length of the input prefix.
185
+ * Time Complexity: O(l), where l is the length of the input prefix.
133
186
  * Space Complexity: O(1) - Constant space.
134
187
  *
135
188
  * Check if a given input string is a prefix of any existing word in the Trie, whether as an absolute prefix or a complete word.
@@ -138,12 +191,12 @@ export declare class Trie extends IterableElementBase<string, Trie> {
138
191
  */
139
192
  hasPrefix(input: string): boolean;
140
193
  /**
141
- * Time Complexity: O(N), where N is the total number of nodes in the trie.
142
- * Space Complexity: O(M), where M is the length of the input prefix.
194
+ * Time Complexity: O(n), where n is the total number of nodes in the trie.
195
+ * Space Complexity: O(l), where l is the length of the input prefix.
143
196
  */
144
197
  /**
145
- * Time Complexity: O(N), where N is the total number of nodes in the trie.
146
- * Space Complexity: O(M), where M is the length of the input prefix.
198
+ * Time Complexity: O(n), where n is the total number of nodes in the trie.
199
+ * Space Complexity: O(l), where l is the length of the input prefix.
147
200
  *
148
201
  * Check if the input string is a common prefix in the Trie, meaning it's a prefix shared by all words in the Trie.
149
202
  * @param {string} input - The input string representing the common prefix to check for.
@@ -151,24 +204,24 @@ export declare class Trie extends IterableElementBase<string, Trie> {
151
204
  */
152
205
  hasCommonPrefix(input: string): boolean;
153
206
  /**
154
- * Time Complexity: O(N), where N is the total number of nodes in the trie.
155
- * Space Complexity: O(M), where M is the length of the longest common prefix.
207
+ * Time Complexity: O(n), where n is the total number of nodes in the trie.
208
+ * Space Complexity: O(l), where l is the length of the longest common prefix.
156
209
  */
157
210
  /**
158
- * Time Complexity: O(N), where N is the total number of nodes in the trie.
159
- * Space Complexity: O(M), where M is the length of the longest common prefix.
211
+ * Time Complexity: O(n), where n is the total number of nodes in the trie.
212
+ * Space Complexity: O(l), where l is the length of the longest common prefix.
160
213
  *
161
214
  * Get the longest common prefix among all the words stored in the Trie.
162
215
  * @returns {string} The longest common prefix found in the Trie.
163
216
  */
164
217
  getLongestCommonPrefix(): string;
165
218
  /**
166
- * Time Complexity: O(K * L), where K is the number of words retrieved, and L is the average length of the words.
167
- * Space Complexity: O(K * L) - The space required for the output array.
219
+ * Time Complexity: O(w * l), where w is the number of words retrieved, and l is the average length of the words.
220
+ * Space Complexity: O(w * l) - The space required for the output array.
168
221
  */
169
222
  /**
170
- * Time Complexity: O(K * L), where K is the number of words retrieved, and L is the average length of the words.
171
- * Space Complexity: O(K * L) - The space required for the output array.
223
+ * Time Complexity: O(w * l), where w is the number of words retrieved, and l is the average length of the words.
224
+ * Space Complexity: O(w * l) - The space required for the output array.
172
225
  *
173
226
  * The `getAll` function returns an array of all words in a Trie data structure that start with a given prefix.
174
227
  * @param {string} prefix - The `prefix` parameter is a string that represents the prefix that we want to search for in the
@@ -228,13 +281,24 @@ export declare class Trie extends IterableElementBase<string, Trie> {
228
281
  * @returns The `map` function is returning a new Trie object.
229
282
  */
230
283
  map(callback: ElementCallback<string, string>, thisArg?: any): Trie;
284
+ /**
285
+ * Time Complexity: O(n)
286
+ * Space Complexity: O(n)
287
+ */
288
+ /**
289
+ * Time Complexity: O(n)
290
+ * Space Complexity: O(n)
291
+ *
292
+ * The function `_getIterator` returns an iterable iterator that performs a depth-first search on a
293
+ * trie data structure and yields all the paths to the end nodes.
294
+ */
231
295
  protected _getIterator(): IterableIterator<string>;
232
296
  /**
233
- * Time Complexity: O(M), where M is the length of the input string.
297
+ * Time Complexity: O(l), where l is the length of the input string.
234
298
  * Space Complexity: O(1) - Constant space.
235
299
  */
236
300
  /**
237
- * Time Complexity: O(M), where M is the length of the input string.
301
+ * Time Complexity: O(l), where l is the length of the input string.
238
302
  * Space Complexity: O(1) - Constant space.
239
303
  *
240
304
  * @param str
@@ -4,13 +4,61 @@ import { IterableElementBase } from '../base';
4
4
  * and a flag indicating whether it's the end of a word.
5
5
  */
6
6
  export class TrieNode {
7
- key;
8
- children;
9
- isEnd;
10
7
  constructor(key) {
11
- this.key = key;
12
- this.isEnd = false;
13
- this.children = new Map();
8
+ this._key = key;
9
+ this._isEnd = false;
10
+ this._children = new Map();
11
+ }
12
+ _key;
13
+ /**
14
+ * The function returns the value of the protected variable _key.
15
+ * @returns The value of the `_key` property, which is a string.
16
+ */
17
+ get key() {
18
+ return this._key;
19
+ }
20
+ /**
21
+ * The above function sets the value of a protected variable called "key".
22
+ * @param {string} value - The value parameter is a string that represents the value to be assigned
23
+ * to the key.
24
+ */
25
+ set key(value) {
26
+ this._key = value;
27
+ }
28
+ _children;
29
+ /**
30
+ * The function returns the children of a TrieNode as a Map.
31
+ * @returns The `children` property of the TrieNode object, which is a Map containing string keys and
32
+ * TrieNode values.
33
+ */
34
+ get children() {
35
+ return this._children;
36
+ }
37
+ /**
38
+ * The function sets the value of the `_children` property of a TrieNode object.
39
+ * @param value - The value parameter is a Map object that represents the children of a TrieNode. The
40
+ * keys of the map are strings, which represent the characters that are associated with each child
41
+ * TrieNode. The values of the map are TrieNode objects, which represent the child nodes of the
42
+ * current TrieNode.
43
+ */
44
+ set children(value) {
45
+ this._children = value;
46
+ }
47
+ _isEnd;
48
+ /**
49
+ * The function returns a boolean value indicating whether a certain condition is met.
50
+ * @returns The method is returning a boolean value, specifically the value of the variable `_isEnd`.
51
+ */
52
+ get isEnd() {
53
+ return this._isEnd;
54
+ }
55
+ /**
56
+ * The function sets the value of the "_isEnd" property.
57
+ * @param {boolean} value - The value parameter is a boolean value that indicates whether the current
58
+ * state is the end state or not.
59
+ */
60
+ set isEnd(value) {
61
+ this._isEnd = value;
14
62
  }
15
63
  }
16
64
  /**
@@ -55,9 +103,8 @@ export class Trie extends IterableElementBase {
55
103
  }
56
104
  _caseSensitive = true;
57
105
  /**
58
- * The caseSensitive function is a getter that returns the value of the private _caseSensitive property.
59
- *
60
- * @return The value of the _casesensitive private variable
106
+ * The caseSensitive function is a getter that returns the value of the protected _caseSensitive property.
107
+ * @return The value of the _caseSensitive protected variable
61
108
  */
62
109
  get caseSensitive() {
63
110
  return this._caseSensitive;
@@ -71,12 +118,12 @@ export class Trie extends IterableElementBase {
71
118
  return this._root;
72
119
  }
73
120
  /**
74
- * Time Complexity: O(M), where M is the length of the word being added.
75
- * Space Complexity: O(M) - Each character in the word adds a TrieNode.
121
+ * Time Complexity: O(l), where l is the length of the word being added.
122
+ * Space Complexity: O(l) - Each character in the word adds a TrieNode.
76
123
  */
77
124
  /**
78
- * Time Complexity: O(M), where M is the length of the word being added.
79
- * Space Complexity: O(M) - Each character in the word adds a TrieNode.
125
+ * Time Complexity: O(l), where l is the length of the word being added.
126
+ * Space Complexity: O(l) - Each character in the word adds a TrieNode.
80
127
  *
81
128
  * Add a word to the Trie structure.
82
129
  * @param {string} word - The word to add.
@@ -102,11 +149,11 @@ export class Trie extends IterableElementBase {
102
149
  return isNewWord;
103
150
  }
104
151
  /**
105
- * Time Complexity: O(M), where M is the length of the input word.
152
+ * Time Complexity: O(l), where l is the length of the input word.
106
153
  * Space Complexity: O(1) - Constant space.
107
154
  */
108
155
  /**
109
- * Time Complexity: O(M), where M is the length of the input word.
156
+ * Time Complexity: O(l), where l is the length of the input word.
110
157
  * Space Complexity: O(1) - Constant space.
111
158
  *
112
159
  * Check if the Trie contains a given word.
@@ -125,6 +172,13 @@ export class Trie extends IterableElementBase {
125
172
  return cur.isEnd;
126
173
  }
127
174
  /**
175
+ * Time Complexity: O(1)
176
+ * Space Complexity: O(1)
177
+ */
178
+ /**
179
+ * Time Complexity: O(1)
180
+ * Space Complexity: O(1)
181
+ *
128
182
  * The isEmpty function checks if the size of the queue is 0.
129
183
  * @return True if the size of the queue is 0
130
184
  */
@@ -132,12 +186,26 @@ export class Trie extends IterableElementBase {
132
186
  return this.size === 0;
133
187
  }
134
188
  /**
135
- * Time Complexity: O(M), where M is the length of the word being deleted.
136
- * Space Complexity: O(M) - Due to the recursive DFS approach.
189
+ * Time Complexity: O(1)
190
+ * Space Complexity: O(1)
191
+ */
192
+ /**
193
+ * Time Complexity: O(1)
194
+ * Space Complexity: O(1)
195
+ *
196
+ * The clear function resets the size of the Trie to 0 and creates a new root TrieNode.
197
+ */
198
+ clear() {
199
+ this._size = 0;
200
+ this._root = new TrieNode('');
201
+ }
202
+ /**
203
+ * Time Complexity: O(l), where l is the length of the word being deleted.
204
+ * Space Complexity: O(n) - Due to the recursive DFS approach.
137
205
  */
138
206
  /**
139
- * Time Complexity: O(M), where M is the length of the word being deleted.
140
- * Space Complexity: O(M) - Due to the recursive DFS approach.
207
+ * Time Complexity: O(l), where l is the length of the word being deleted.
208
+ * Space Complexity: O(n) - Due to the recursive DFS approach.
141
209
  *
142
210
  * Remove a word from the Trie structure.
143
211
  * @param{string} word - The word to delete.
@@ -179,11 +247,11 @@ export class Trie extends IterableElementBase {
179
247
  return isDeleted;
180
248
  }
181
249
  /**
182
- * Time Complexity: O(N), where N is the total number of nodes in the trie.
250
+ * Time Complexity: O(n), where n is the total number of nodes in the trie.
183
251
  * Space Complexity: O(1) - Constant space.
184
252
  */
185
253
  /**
186
- * Time Complexity: O(N), where N is the total number of nodes in the trie.
254
+ * Time Complexity: O(n), where n is the total number of nodes in the trie.
187
255
  * Space Complexity: O(1) - Constant space.
188
256
  *
189
257
  */
@@ -207,11 +275,11 @@ export class Trie extends IterableElementBase {
207
275
  return maxDepth;
208
276
  }
209
277
  /**
210
- * Time Complexity: O(M), where M is the length of the input prefix.
278
+ * Time Complexity: O(l), where l is the length of the input prefix.
211
279
  * Space Complexity: O(1) - Constant space.
212
280
  */
213
281
  /**
214
- * Time Complexity: O(M), where M is the length of the input prefix.
282
+ * Time Complexity: O(l), where l is the length of the input prefix.
215
283
  * Space Complexity: O(1) - Constant space.
216
284
  *
217
285
  * Check if a given input string has an absolute prefix in the Trie, meaning it's not a complete word.
@@ -230,11 +298,11 @@ export class Trie extends IterableElementBase {
230
298
  return !cur.isEnd;
231
299
  }
232
300
  /**
233
- * Time Complexity: O(M), where M is the length of the input prefix.
301
+ * Time Complexity: O(l), where l is the length of the input prefix.
234
302
  * Space Complexity: O(1) - Constant space.
235
303
  */
236
304
  /**
237
- * Time Complexity: O(M), where M is the length of the input prefix.
305
+ * Time Complexity: O(l), where l is the length of the input prefix.
238
306
  * Space Complexity: O(1) - Constant space.
239
307
  *
240
308
  * Check if a given input string is a prefix of any existing word in the Trie, whether as an absolute prefix or a complete word.
@@ -253,12 +321,12 @@ export class Trie extends IterableElementBase {
253
321
  return true;
254
322
  }
255
323
  /**
256
- * Time Complexity: O(N), where N is the total number of nodes in the trie.
257
- * Space Complexity: O(M), where M is the length of the input prefix.
324
+ * Time Complexity: O(n), where n is the total number of nodes in the trie.
325
+ * Space Complexity: O(l), where l is the length of the input prefix.
258
326
  */
259
327
  /**
260
- * Time Complexity: O(N), where N is the total number of nodes in the trie.
261
- * Space Complexity: O(M), where M is the length of the input prefix.
328
+ * Time Complexity: O(n), where n is the total number of nodes in the trie.
329
+ * Space Complexity: O(l), where l is the length of the input prefix.
262
330
  *
263
331
  * Check if the input string is a common prefix in the Trie, meaning it's a prefix shared by all words in the Trie.
264
332
  * @param {string} input - The input string representing the common prefix to check for.
@@ -282,12 +350,12 @@ export class Trie extends IterableElementBase {
282
350
  return commonPre === input;
283
351
  }
284
352
  /**
285
- * Time Complexity: O(N), where N is the total number of nodes in the trie.
286
- * Space Complexity: O(M), where M is the length of the longest common prefix.
353
+ * Time Complexity: O(n), where n is the total number of nodes in the trie.
354
+ * Space Complexity: O(l), where l is the length of the longest common prefix.
287
355
  */
288
356
  /**
289
- * Time Complexity: O(N), where N is the total number of nodes in the trie.
290
- * Space Complexity: O(M), where M is the length of the longest common prefix.
357
+ * Time Complexity: O(n), where n is the total number of nodes in the trie.
358
+ * Space Complexity: O(l), where l is the length of the longest common prefix.
291
359
  *
292
360
  * Get the longest common prefix among all the words stored in the Trie.
293
361
  * @returns {string} The longest common prefix found in the Trie.
@@ -307,12 +375,12 @@ export class Trie extends IterableElementBase {
307
375
  return commonPre;
308
376
  }
309
377
  /**
310
- * Time Complexity: O(K * L), where K is the number of words retrieved, and L is the average length of the words.
311
- * Space Complexity: O(K * L) - The space required for the output array.
378
+ * Time Complexity: O(w * l), where w is the number of words retrieved, and l is the average length of the words.
379
+ * Space Complexity: O(w * l) - The space required for the output array.
312
380
  */
313
381
  /**
314
- * Time Complexity: O(K * L), where K is the number of words retrieved, and L is the average length of the words.
315
- * Space Complexity: O(K * L) - The space required for the output array.
382
+ * Time Complexity: O(w * l), where w is the number of words retrieved, and l is the average length of the words.
383
+ * Space Complexity: O(w * l) - The space required for the output array.
316
384
  *
317
385
  * The `getAll` function returns an array of all words in a Trie data structure that start with a given prefix.
318
386
  * @param {string} prefix - The `prefix` parameter is a string that represents the prefix that we want to search for in the
@@ -421,6 +489,17 @@ export class Trie extends IterableElementBase {
421
489
  }
422
490
  return newTrie;
423
491
  }
492
+ /**
493
+ * Time Complexity: O(n)
494
+ * Space Complexity: O(n)
495
+ */
496
+ /**
497
+ * Time Complexity: O(n)
498
+ * Space Complexity: O(n)
499
+ *
500
+ * The function `_getIterator` returns an iterable iterator that performs a depth-first search on a
501
+ * trie data structure and yields all the paths to the end nodes.
502
+ */
424
503
  *_getIterator() {
425
504
  function* _dfs(node, path) {
426
505
  if (node.isEnd) {
@@ -433,11 +512,11 @@ export class Trie extends IterableElementBase {
433
512
  yield* _dfs(this.root, '');
434
513
  }
435
514
  /**
436
- * Time Complexity: O(M), where M is the length of the input string.
515
+ * Time Complexity: O(l), where l is the length of the input string.
437
516
  * Space Complexity: O(1) - Constant space.
438
517
  */
439
518
  /**
440
- * Time Complexity: O(M), where M is the length of the input string.
519
+ * Time Complexity: O(l), where l is the length of the input string.
441
520
  * Space Complexity: O(1) - Constant space.
442
521
  *
443
522
  * @param str
@@ -0,0 +1,5 @@
1
+ import { AVLTreeMultiMap, AVLTreeMultiMapNode } from '../../../data-structures';
2
+ import type { AVLTreeOptions } from './avl-tree';
3
+ export type AVLTreeMultiMapNodeNested<K, V> = AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, AVLTreeMultiMapNode<K, V, any>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>;
4
+ export type AVLTreeMultiMapNested<K, V, N extends AVLTreeMultiMapNode<K, V, N>> = AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, AVLTreeMultiMap<K, V, N, any>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>;
5
+ export type AVLTreeMultiMapOptions<K> = AVLTreeOptions<K> & {};
@@ -2,5 +2,6 @@ export * from './binary-tree';
2
2
  export * from './bst';
3
3
  export * from './avl-tree';
4
4
  export * from './segment-tree';
5
- export * from './tree-multimap';
5
+ export * from './avl-tree-multi-map';
6
6
  export * from './rb-tree';
7
+ export * from './tree-multi-map';
@@ -2,5 +2,6 @@ export * from './binary-tree';
2
2
  export * from './bst';
3
3
  export * from './avl-tree';
4
4
  export * from './segment-tree';
5
- export * from './tree-multimap';
5
+ export * from './avl-tree-multi-map';
6
6
  export * from './rb-tree';
7
+ export * from './tree-multi-map';
@@ -0,0 +1,5 @@
1
+ import { TreeMultiMap, TreeMultiMapNode } from '../../../data-structures';
2
+ import type { RBTreeOptions } from './rb-tree';
3
+ export type TreeMultiMapNodeNested<K, V> = TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, TreeMultiMapNode<K, V, any>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>;
4
+ export type TreeMultiMapNested<K, V, N extends TreeMultiMapNode<K, V, N>> = TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, TreeMultiMap<K, V, N, any>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>;
5
+ export type TreeMultiMapOptions<K> = RBTreeOptions<K> & {};