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.
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -13
- package/CHANGELOG.md +1 -1
- package/README.md +23 -21
- package/README_zh-CN.md +7 -7
- package/SPECIFICATION.md +56 -0
- package/SPONSOR-zh-CN.md +90 -0
- package/SPONSOR.md +54 -0
- package/benchmark/report.html +13 -13
- package/benchmark/report.json +149 -155
- package/dist/cjs/data-structures/base/iterable-base.d.ts +6 -0
- package/dist/cjs/data-structures/base/iterable-base.js.map +1 -1
- package/dist/cjs/data-structures/binary-tree/{tree-multimap.d.ts → avl-tree-multi-map.d.ts} +43 -10
- package/dist/cjs/data-structures/binary-tree/{tree-multimap.js → avl-tree-multi-map.js} +50 -12
- package/dist/cjs/data-structures/binary-tree/avl-tree-multi-map.js.map +1 -0
- package/dist/cjs/data-structures/binary-tree/avl-tree.d.ts +29 -1
- package/dist/cjs/data-structures/binary-tree/avl-tree.js +33 -1
- package/dist/cjs/data-structures/binary-tree/avl-tree.js.map +1 -1
- package/dist/cjs/data-structures/binary-tree/binary-indexed-tree.d.ts +22 -0
- package/dist/cjs/data-structures/binary-tree/binary-indexed-tree.js +22 -0
- package/dist/cjs/data-structures/binary-tree/binary-indexed-tree.js.map +1 -1
- package/dist/cjs/data-structures/binary-tree/binary-tree.d.ts +1 -1
- package/dist/cjs/data-structures/binary-tree/binary-tree.js +1 -1
- package/dist/cjs/data-structures/binary-tree/bst.d.ts +46 -13
- package/dist/cjs/data-structures/binary-tree/bst.js +51 -20
- package/dist/cjs/data-structures/binary-tree/bst.js.map +1 -1
- package/dist/cjs/data-structures/binary-tree/index.d.ts +2 -1
- package/dist/cjs/data-structures/binary-tree/index.js +2 -1
- package/dist/cjs/data-structures/binary-tree/index.js.map +1 -1
- package/dist/cjs/data-structures/binary-tree/rb-tree.d.ts +54 -2
- package/dist/cjs/data-structures/binary-tree/rb-tree.js +90 -24
- package/dist/cjs/data-structures/binary-tree/rb-tree.js.map +1 -1
- package/dist/cjs/data-structures/binary-tree/segment-tree.d.ts +99 -6
- package/dist/cjs/data-structures/binary-tree/segment-tree.js +127 -10
- package/dist/cjs/data-structures/binary-tree/segment-tree.js.map +1 -1
- package/dist/cjs/data-structures/binary-tree/tree-multi-map.d.ts +200 -0
- package/dist/cjs/data-structures/binary-tree/tree-multi-map.js +400 -0
- package/dist/cjs/data-structures/binary-tree/tree-multi-map.js.map +1 -0
- package/dist/cjs/data-structures/graph/abstract-graph.d.ts +0 -78
- package/dist/cjs/data-structures/graph/abstract-graph.js +0 -189
- package/dist/cjs/data-structures/graph/abstract-graph.js.map +1 -1
- package/dist/cjs/data-structures/graph/directed-graph.d.ts +59 -0
- package/dist/cjs/data-structures/graph/directed-graph.js +105 -0
- package/dist/cjs/data-structures/graph/directed-graph.js.map +1 -1
- package/dist/cjs/data-structures/graph/undirected-graph.d.ts +60 -7
- package/dist/cjs/data-structures/graph/undirected-graph.js +126 -18
- package/dist/cjs/data-structures/graph/undirected-graph.js.map +1 -1
- package/dist/cjs/data-structures/hash/hash-map.d.ts +143 -23
- package/dist/cjs/data-structures/hash/hash-map.js +196 -62
- package/dist/cjs/data-structures/hash/hash-map.js.map +1 -1
- package/dist/cjs/data-structures/heap/heap.d.ts +29 -19
- package/dist/cjs/data-structures/heap/heap.js +29 -20
- package/dist/cjs/data-structures/heap/heap.js.map +1 -1
- package/dist/cjs/data-structures/linked-list/doubly-linked-list.d.ts +71 -25
- package/dist/cjs/data-structures/linked-list/doubly-linked-list.js +83 -25
- package/dist/cjs/data-structures/linked-list/doubly-linked-list.js.map +1 -1
- package/dist/cjs/data-structures/linked-list/singly-linked-list.d.ts +26 -3
- package/dist/cjs/data-structures/linked-list/singly-linked-list.js +34 -3
- package/dist/cjs/data-structures/linked-list/singly-linked-list.js.map +1 -1
- package/dist/cjs/data-structures/linked-list/skip-linked-list.d.ts +2 -2
- package/dist/cjs/data-structures/linked-list/skip-linked-list.js +2 -2
- package/dist/cjs/data-structures/matrix/matrix.d.ts +1 -1
- package/dist/cjs/data-structures/matrix/matrix.js +1 -1
- package/dist/cjs/data-structures/priority-queue/max-priority-queue.d.ts +10 -0
- package/dist/cjs/data-structures/priority-queue/max-priority-queue.js +10 -0
- package/dist/cjs/data-structures/priority-queue/max-priority-queue.js.map +1 -1
- package/dist/cjs/data-structures/priority-queue/min-priority-queue.d.ts +11 -0
- package/dist/cjs/data-structures/priority-queue/min-priority-queue.js +11 -0
- package/dist/cjs/data-structures/priority-queue/min-priority-queue.js.map +1 -1
- package/dist/cjs/data-structures/priority-queue/priority-queue.d.ts +8 -0
- package/dist/cjs/data-structures/priority-queue/priority-queue.js +8 -0
- package/dist/cjs/data-structures/priority-queue/priority-queue.js.map +1 -1
- package/dist/cjs/data-structures/queue/deque.d.ts +95 -21
- package/dist/cjs/data-structures/queue/deque.js +100 -16
- package/dist/cjs/data-structures/queue/deque.js.map +1 -1
- package/dist/cjs/data-structures/queue/queue.d.ts +65 -45
- package/dist/cjs/data-structures/queue/queue.js +65 -45
- package/dist/cjs/data-structures/queue/queue.js.map +1 -1
- package/dist/cjs/data-structures/stack/stack.d.ts +36 -22
- package/dist/cjs/data-structures/stack/stack.js +36 -22
- package/dist/cjs/data-structures/stack/stack.js.map +1 -1
- package/dist/cjs/data-structures/tree/tree.d.ts +57 -3
- package/dist/cjs/data-structures/tree/tree.js +77 -11
- package/dist/cjs/data-structures/tree/tree.js.map +1 -1
- package/dist/cjs/data-structures/trie/trie.d.ts +100 -36
- package/dist/cjs/data-structures/trie/trie.js +115 -36
- package/dist/cjs/data-structures/trie/trie.js.map +1 -1
- package/dist/cjs/types/data-structures/binary-tree/avl-tree-multi-map.d.ts +5 -0
- package/dist/cjs/types/data-structures/binary-tree/avl-tree-multi-map.js +3 -0
- package/dist/cjs/types/data-structures/binary-tree/avl-tree-multi-map.js.map +1 -0
- package/dist/cjs/types/data-structures/binary-tree/index.d.ts +2 -1
- package/dist/cjs/types/data-structures/binary-tree/index.js +2 -1
- package/dist/cjs/types/data-structures/binary-tree/index.js.map +1 -1
- package/dist/cjs/types/data-structures/binary-tree/tree-multi-map.d.ts +5 -0
- package/dist/cjs/types/data-structures/binary-tree/{tree-multimap.js → tree-multi-map.js} +1 -1
- package/dist/cjs/types/data-structures/binary-tree/tree-multi-map.js.map +1 -0
- package/dist/mjs/data-structures/base/iterable-base.d.ts +6 -0
- package/dist/mjs/data-structures/binary-tree/{tree-multimap.d.ts → avl-tree-multi-map.d.ts} +43 -10
- package/dist/mjs/data-structures/binary-tree/{tree-multimap.js → avl-tree-multi-map.js} +46 -9
- package/dist/mjs/data-structures/binary-tree/avl-tree.d.ts +29 -1
- package/dist/mjs/data-structures/binary-tree/avl-tree.js +34 -2
- package/dist/mjs/data-structures/binary-tree/binary-indexed-tree.d.ts +22 -0
- package/dist/mjs/data-structures/binary-tree/binary-indexed-tree.js +22 -0
- package/dist/mjs/data-structures/binary-tree/binary-tree.d.ts +1 -1
- package/dist/mjs/data-structures/binary-tree/binary-tree.js +1 -1
- package/dist/mjs/data-structures/binary-tree/bst.d.ts +46 -13
- package/dist/mjs/data-structures/binary-tree/bst.js +51 -20
- package/dist/mjs/data-structures/binary-tree/index.d.ts +2 -1
- package/dist/mjs/data-structures/binary-tree/index.js +2 -1
- package/dist/mjs/data-structures/binary-tree/rb-tree.d.ts +54 -2
- package/dist/mjs/data-structures/binary-tree/rb-tree.js +91 -25
- package/dist/mjs/data-structures/binary-tree/segment-tree.d.ts +99 -6
- package/dist/mjs/data-structures/binary-tree/segment-tree.js +127 -10
- package/dist/mjs/data-structures/binary-tree/tree-multi-map.d.ts +200 -0
- package/dist/mjs/data-structures/binary-tree/tree-multi-map.js +397 -0
- package/dist/mjs/data-structures/graph/abstract-graph.d.ts +0 -78
- package/dist/mjs/data-structures/graph/abstract-graph.js +0 -188
- package/dist/mjs/data-structures/graph/directed-graph.d.ts +59 -0
- package/dist/mjs/data-structures/graph/directed-graph.js +105 -0
- package/dist/mjs/data-structures/graph/undirected-graph.d.ts +60 -7
- package/dist/mjs/data-structures/graph/undirected-graph.js +127 -19
- package/dist/mjs/data-structures/hash/hash-map.d.ts +143 -23
- package/dist/mjs/data-structures/hash/hash-map.js +204 -70
- package/dist/mjs/data-structures/heap/heap.d.ts +29 -19
- package/dist/mjs/data-structures/heap/heap.js +29 -20
- package/dist/mjs/data-structures/linked-list/doubly-linked-list.d.ts +71 -25
- package/dist/mjs/data-structures/linked-list/doubly-linked-list.js +86 -28
- package/dist/mjs/data-structures/linked-list/singly-linked-list.d.ts +26 -3
- package/dist/mjs/data-structures/linked-list/singly-linked-list.js +36 -5
- package/dist/mjs/data-structures/linked-list/skip-linked-list.d.ts +2 -2
- package/dist/mjs/data-structures/linked-list/skip-linked-list.js +2 -2
- package/dist/mjs/data-structures/matrix/matrix.d.ts +1 -1
- package/dist/mjs/data-structures/matrix/matrix.js +1 -1
- package/dist/mjs/data-structures/priority-queue/max-priority-queue.d.ts +10 -0
- package/dist/mjs/data-structures/priority-queue/max-priority-queue.js +10 -0
- package/dist/mjs/data-structures/priority-queue/min-priority-queue.d.ts +11 -0
- package/dist/mjs/data-structures/priority-queue/min-priority-queue.js +11 -0
- package/dist/mjs/data-structures/priority-queue/priority-queue.d.ts +8 -0
- package/dist/mjs/data-structures/priority-queue/priority-queue.js +8 -0
- package/dist/mjs/data-structures/queue/deque.d.ts +95 -21
- package/dist/mjs/data-structures/queue/deque.js +105 -21
- package/dist/mjs/data-structures/queue/queue.d.ts +65 -45
- package/dist/mjs/data-structures/queue/queue.js +65 -45
- package/dist/mjs/data-structures/stack/stack.d.ts +36 -22
- package/dist/mjs/data-structures/stack/stack.js +36 -22
- package/dist/mjs/data-structures/tree/tree.d.ts +57 -3
- package/dist/mjs/data-structures/tree/tree.js +80 -14
- package/dist/mjs/data-structures/trie/trie.d.ts +100 -36
- package/dist/mjs/data-structures/trie/trie.js +118 -39
- package/dist/mjs/types/data-structures/binary-tree/avl-tree-multi-map.d.ts +5 -0
- package/dist/mjs/types/data-structures/binary-tree/index.d.ts +2 -1
- package/dist/mjs/types/data-structures/binary-tree/index.js +2 -1
- package/dist/mjs/types/data-structures/binary-tree/tree-multi-map.d.ts +5 -0
- package/dist/mjs/types/data-structures/binary-tree/tree-multi-map.js +1 -0
- package/dist/umd/data-structure-typed.js +1876 -656
- package/dist/umd/data-structure-typed.min.js +2 -2
- package/dist/umd/data-structure-typed.min.js.map +1 -1
- package/package.json +59 -58
- package/src/data-structures/base/iterable-base.ts +12 -0
- package/src/data-structures/binary-tree/{tree-multimap.ts → avl-tree-multi-map.ts} +59 -20
- package/src/data-structures/binary-tree/avl-tree.ts +37 -3
- package/src/data-structures/binary-tree/binary-indexed-tree.ts +22 -0
- package/src/data-structures/binary-tree/binary-tree.ts +1 -1
- package/src/data-structures/binary-tree/bst.ts +51 -19
- package/src/data-structures/binary-tree/index.ts +2 -1
- package/src/data-structures/binary-tree/rb-tree.ts +99 -28
- package/src/data-structures/binary-tree/segment-tree.ts +145 -11
- package/src/data-structures/binary-tree/tree-multi-map.ts +463 -0
- package/src/data-structures/graph/abstract-graph.ts +0 -211
- package/src/data-structures/graph/directed-graph.ts +122 -0
- package/src/data-structures/graph/undirected-graph.ts +143 -19
- package/src/data-structures/hash/hash-map.ts +228 -76
- package/src/data-structures/heap/heap.ts +31 -20
- package/src/data-structures/linked-list/doubly-linked-list.ts +96 -29
- package/src/data-structures/linked-list/singly-linked-list.ts +42 -6
- package/src/data-structures/linked-list/skip-linked-list.ts +2 -2
- package/src/data-structures/matrix/matrix.ts +1 -1
- package/src/data-structures/priority-queue/max-priority-queue.ts +10 -0
- package/src/data-structures/priority-queue/min-priority-queue.ts +11 -0
- package/src/data-structures/priority-queue/priority-queue.ts +8 -0
- package/src/data-structures/queue/deque.ts +118 -22
- package/src/data-structures/queue/queue.ts +68 -45
- package/src/data-structures/stack/stack.ts +39 -23
- package/src/data-structures/tree/tree.ts +89 -15
- package/src/data-structures/trie/trie.ts +131 -40
- package/src/types/data-structures/binary-tree/avl-tree-multi-map.ts +8 -0
- package/src/types/data-structures/binary-tree/index.ts +2 -1
- package/src/types/data-structures/binary-tree/tree-multi-map.ts +8 -0
- package/test/integration/index.html +2 -2
- package/test/performance/data-structures/graph/directed-graph.test.ts +1 -1
- package/test/unit/data-structures/binary-tree/{tree-multimap.test.ts → avl-tree-multi-map.test.ts} +55 -55
- package/test/unit/data-structures/binary-tree/overall.test.ts +24 -25
- package/test/unit/data-structures/binary-tree/tree-multi-map.test.ts +706 -0
- package/test/unit/data-structures/graph/abstract-graph.test.ts +3 -0
- package/test/unit/data-structures/graph/directed-graph.test.ts +189 -253
- package/test/unit/data-structures/graph/undirected-graph.test.ts +263 -18
- package/test/unit/data-structures/queue/queue.test.ts +2 -0
- package/test/unit/unrestricted-interconversion.test.ts +3 -3
- package/dist/cjs/data-structures/binary-tree/tree-multimap.js.map +0 -1
- package/dist/cjs/types/data-structures/binary-tree/tree-multimap.d.ts +0 -5
- package/dist/cjs/types/data-structures/binary-tree/tree-multimap.js.map +0 -1
- package/dist/mjs/types/data-structures/binary-tree/tree-multimap.d.ts +0 -5
- package/src/types/data-structures/binary-tree/tree-multimap.ts +0 -8
- /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
|
|
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(
|
|
62
|
-
* Space Complexity: O(
|
|
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(
|
|
66
|
-
* Space Complexity: O(
|
|
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(
|
|
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(
|
|
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(
|
|
93
|
-
* Space Complexity: O(
|
|
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(
|
|
97
|
-
* Space Complexity: O(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
142
|
-
* Space Complexity: O(
|
|
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(
|
|
146
|
-
* Space Complexity: O(
|
|
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(
|
|
155
|
-
* Space Complexity: O(
|
|
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(
|
|
159
|
-
* Space Complexity: O(
|
|
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(
|
|
167
|
-
* Space Complexity: O(
|
|
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(
|
|
171
|
-
* Space Complexity: O(
|
|
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(
|
|
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(
|
|
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.
|
|
12
|
-
this.
|
|
13
|
-
this.
|
|
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
|
|
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(
|
|
75
|
-
* Space Complexity: O(
|
|
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(
|
|
79
|
-
* Space Complexity: O(
|
|
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(
|
|
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(
|
|
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(
|
|
136
|
-
* Space Complexity: O(
|
|
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(
|
|
140
|
-
* Space Complexity: O(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
257
|
-
* Space Complexity: O(
|
|
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(
|
|
261
|
-
* Space Complexity: O(
|
|
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(
|
|
286
|
-
* Space Complexity: O(
|
|
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(
|
|
290
|
-
* Space Complexity: O(
|
|
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(
|
|
311
|
-
* Space Complexity: O(
|
|
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(
|
|
315
|
-
* Space Complexity: O(
|
|
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(
|
|
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(
|
|
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> & {};
|
|
@@ -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> & {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|