red-black-tree-typed 1.53.7 → 1.54.2

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 (119) hide show
  1. package/LICENSE +2 -2
  2. package/README.md +52 -0
  3. package/dist/common/index.js +5 -0
  4. package/dist/data-structures/base/iterable-entry-base.js +4 -4
  5. package/dist/data-structures/binary-tree/avl-tree-counter.d.ts +213 -0
  6. package/dist/data-structures/binary-tree/avl-tree-counter.js +407 -0
  7. package/dist/data-structures/binary-tree/avl-tree-multi-map.d.ts +71 -170
  8. package/dist/data-structures/binary-tree/avl-tree-multi-map.js +133 -328
  9. package/dist/data-structures/binary-tree/avl-tree.d.ts +103 -69
  10. package/dist/data-structures/binary-tree/avl-tree.js +130 -70
  11. package/dist/data-structures/binary-tree/binary-indexed-tree.d.ts +3 -0
  12. package/dist/data-structures/binary-tree/binary-indexed-tree.js +3 -0
  13. package/dist/data-structures/binary-tree/binary-tree.d.ts +268 -202
  14. package/dist/data-structures/binary-tree/binary-tree.js +311 -263
  15. package/dist/data-structures/binary-tree/bst.d.ts +193 -139
  16. package/dist/data-structures/binary-tree/bst.js +248 -164
  17. package/dist/data-structures/binary-tree/index.d.ts +3 -1
  18. package/dist/data-structures/binary-tree/index.js +3 -1
  19. package/dist/data-structures/binary-tree/red-black-tree.d.ts +286 -0
  20. package/dist/data-structures/binary-tree/{rb-tree.js → red-black-tree.js} +176 -107
  21. package/dist/data-structures/binary-tree/tree-counter.d.ts +212 -0
  22. package/dist/data-structures/binary-tree/tree-counter.js +444 -0
  23. package/dist/data-structures/binary-tree/tree-multi-map.d.ts +78 -170
  24. package/dist/data-structures/binary-tree/tree-multi-map.js +145 -367
  25. package/dist/data-structures/graph/abstract-graph.js +2 -2
  26. package/dist/data-structures/graph/directed-graph.d.ts +3 -0
  27. package/dist/data-structures/graph/directed-graph.js +3 -0
  28. package/dist/data-structures/graph/map-graph.d.ts +3 -0
  29. package/dist/data-structures/graph/map-graph.js +3 -0
  30. package/dist/data-structures/graph/undirected-graph.d.ts +3 -0
  31. package/dist/data-structures/graph/undirected-graph.js +3 -0
  32. package/dist/data-structures/hash/hash-map.d.ts +31 -1
  33. package/dist/data-structures/hash/hash-map.js +35 -5
  34. package/dist/data-structures/heap/heap.d.ts +20 -3
  35. package/dist/data-structures/heap/heap.js +31 -11
  36. package/dist/data-structures/linked-list/doubly-linked-list.d.ts +46 -11
  37. package/dist/data-structures/linked-list/doubly-linked-list.js +68 -21
  38. package/dist/data-structures/linked-list/singly-linked-list.d.ts +47 -11
  39. package/dist/data-structures/linked-list/singly-linked-list.js +73 -26
  40. package/dist/data-structures/linked-list/skip-linked-list.d.ts +3 -0
  41. package/dist/data-structures/linked-list/skip-linked-list.js +3 -0
  42. package/dist/data-structures/matrix/matrix.d.ts +3 -0
  43. package/dist/data-structures/matrix/matrix.js +3 -0
  44. package/dist/data-structures/matrix/navigator.d.ts +3 -0
  45. package/dist/data-structures/matrix/navigator.js +3 -0
  46. package/dist/data-structures/priority-queue/max-priority-queue.d.ts +3 -0
  47. package/dist/data-structures/priority-queue/max-priority-queue.js +3 -0
  48. package/dist/data-structures/priority-queue/min-priority-queue.d.ts +3 -0
  49. package/dist/data-structures/priority-queue/min-priority-queue.js +3 -0
  50. package/dist/data-structures/queue/deque.d.ts +37 -8
  51. package/dist/data-structures/queue/deque.js +73 -29
  52. package/dist/data-structures/queue/queue.d.ts +41 -1
  53. package/dist/data-structures/queue/queue.js +51 -9
  54. package/dist/data-structures/stack/stack.d.ts +27 -10
  55. package/dist/data-structures/stack/stack.js +39 -20
  56. package/dist/data-structures/trie/trie.d.ts +8 -7
  57. package/dist/data-structures/trie/trie.js +8 -7
  58. package/dist/index.d.ts +4 -4
  59. package/dist/index.js +4 -4
  60. package/dist/interfaces/binary-tree.d.ts +8 -8
  61. package/dist/types/data-structures/base/base.d.ts +1 -1
  62. package/dist/types/data-structures/binary-tree/avl-tree-counter.d.ts +2 -0
  63. package/dist/types/data-structures/binary-tree/avl-tree-multi-map.d.ts +1 -4
  64. package/dist/types/data-structures/binary-tree/avl-tree.d.ts +0 -3
  65. package/dist/types/data-structures/binary-tree/binary-tree.d.ts +0 -3
  66. package/dist/types/data-structures/binary-tree/bst.d.ts +4 -4
  67. package/dist/types/data-structures/binary-tree/index.d.ts +3 -1
  68. package/dist/types/data-structures/binary-tree/index.js +3 -1
  69. package/dist/types/data-structures/binary-tree/red-black-tree.d.ts +3 -0
  70. package/dist/types/data-structures/binary-tree/red-black-tree.js +2 -0
  71. package/dist/types/data-structures/binary-tree/tree-counter.d.ts +2 -0
  72. package/dist/types/data-structures/binary-tree/tree-counter.js +2 -0
  73. package/dist/types/data-structures/binary-tree/tree-multi-map.d.ts +2 -5
  74. package/package.json +3 -3
  75. package/src/common/index.ts +7 -1
  76. package/src/data-structures/base/iterable-entry-base.ts +4 -4
  77. package/src/data-structures/binary-tree/avl-tree-counter.ts +463 -0
  78. package/src/data-structures/binary-tree/avl-tree-multi-map.ts +151 -370
  79. package/src/data-structures/binary-tree/avl-tree.ts +162 -105
  80. package/src/data-structures/binary-tree/binary-indexed-tree.ts +3 -0
  81. package/src/data-structures/binary-tree/binary-tree.ts +488 -416
  82. package/src/data-structures/binary-tree/bst.ts +326 -251
  83. package/src/data-structures/binary-tree/index.ts +3 -1
  84. package/src/data-structures/binary-tree/{rb-tree.ts → red-black-tree.ts} +219 -145
  85. package/src/data-structures/binary-tree/tree-counter.ts +504 -0
  86. package/src/data-structures/binary-tree/tree-multi-map.ts +159 -401
  87. package/src/data-structures/graph/abstract-graph.ts +2 -2
  88. package/src/data-structures/graph/directed-graph.ts +3 -0
  89. package/src/data-structures/graph/map-graph.ts +3 -0
  90. package/src/data-structures/graph/undirected-graph.ts +3 -0
  91. package/src/data-structures/hash/hash-map.ts +37 -7
  92. package/src/data-structures/heap/heap.ts +33 -10
  93. package/src/data-structures/linked-list/doubly-linked-list.ts +75 -21
  94. package/src/data-structures/linked-list/singly-linked-list.ts +80 -27
  95. package/src/data-structures/linked-list/skip-linked-list.ts +3 -0
  96. package/src/data-structures/matrix/matrix.ts +3 -0
  97. package/src/data-structures/matrix/navigator.ts +3 -0
  98. package/src/data-structures/priority-queue/max-priority-queue.ts +3 -0
  99. package/src/data-structures/priority-queue/min-priority-queue.ts +3 -0
  100. package/src/data-structures/queue/deque.ts +72 -28
  101. package/src/data-structures/queue/queue.ts +50 -7
  102. package/src/data-structures/stack/stack.ts +39 -20
  103. package/src/data-structures/trie/trie.ts +8 -7
  104. package/src/index.ts +4 -4
  105. package/src/interfaces/binary-tree.ts +10 -21
  106. package/src/types/data-structures/base/base.ts +1 -1
  107. package/src/types/data-structures/binary-tree/avl-tree-counter.ts +3 -0
  108. package/src/types/data-structures/binary-tree/avl-tree-multi-map.ts +1 -6
  109. package/src/types/data-structures/binary-tree/avl-tree.ts +0 -5
  110. package/src/types/data-structures/binary-tree/binary-tree.ts +0 -5
  111. package/src/types/data-structures/binary-tree/bst.ts +6 -6
  112. package/src/types/data-structures/binary-tree/index.ts +3 -1
  113. package/src/types/data-structures/binary-tree/red-black-tree.ts +5 -0
  114. package/src/types/data-structures/binary-tree/tree-counter.ts +3 -0
  115. package/src/types/data-structures/binary-tree/tree-multi-map.ts +2 -7
  116. package/dist/data-structures/binary-tree/rb-tree.d.ts +0 -209
  117. package/dist/types/data-structures/binary-tree/rb-tree.d.ts +0 -6
  118. package/src/types/data-structures/binary-tree/rb-tree.ts +0 -10
  119. /package/dist/types/data-structures/binary-tree/{rb-tree.js → avl-tree-counter.js} +0 -0
@@ -1,209 +0,0 @@
1
- import type { BinaryTreeDeleteResult, BTNRep, CRUD, RBTNColor, RBTreeOptions, RedBlackTreeNested, RedBlackTreeNodeNested } from '../../types';
2
- import { BST, BSTNode } from './bst';
3
- import { IBinaryTree } from '../../interfaces';
4
- export declare class RedBlackTreeNode<K = any, V = any, NODE extends RedBlackTreeNode<K, V, NODE> = RedBlackTreeNodeNested<K, V>> extends BSTNode<K, V, NODE> {
5
- /**
6
- * The constructor function initializes a Red-Black Tree Node with a key, an optional value, and a
7
- * color.
8
- * @param {K} key - The key parameter is of type K and represents the key of the node in the
9
- * Red-Black Tree.
10
- * @param {V} [value] - The `value` parameter is an optional parameter that represents the value
11
- * associated with the key in the Red-Black Tree Node. It is not required and can be omitted when
12
- * creating a new instance of the Red-Black Tree Node.
13
- * @param {RBTNColor} color - The `color` parameter is used to specify the color of the Red-Black
14
- * Tree Node. It is an optional parameter with a default value of `'BLACK'`.
15
- */
16
- constructor(key: K, value?: V, color?: RBTNColor);
17
- protected _color: RBTNColor;
18
- /**
19
- * The function returns the color value of a variable.
20
- * @returns The color value stored in the private variable `_color`.
21
- */
22
- get color(): RBTNColor;
23
- /**
24
- * The function sets the color property to the specified value.
25
- * @param {RBTNColor} value - The value parameter is of type RBTNColor.
26
- */
27
- set color(value: RBTNColor);
28
- }
29
- /**
30
- * 1. Efficient self-balancing, but not completely balanced. Compared with AVLTree, the addition and deletion efficiency is high but the query efficiency is slightly lower.
31
- * 2. It is BST itself. Compared with Heap which is not completely ordered, RedBlackTree is completely ordered.
32
- */
33
- export declare class RedBlackTree<K = any, V = any, R = object, NODE extends RedBlackTreeNode<K, V, NODE> = RedBlackTreeNode<K, V, RedBlackTreeNodeNested<K, V>>, TREE extends RedBlackTree<K, V, R, NODE, TREE> = RedBlackTree<K, V, R, NODE, RedBlackTreeNested<K, V, R, NODE>>> extends BST<K, V, R, NODE, TREE> implements IBinaryTree<K, V, R, NODE, TREE> {
34
- /**
35
- * This is the constructor function for a Red-Black Tree data structure in TypeScript.
36
- * @param keysNodesEntriesOrRaws - The `keysNodesEntriesOrRaws` parameter is an
37
- * iterable object that can contain either keys, nodes, entries, or raw elements. It is used to
38
- * initialize the RBTree with the provided elements.
39
- * @param [options] - The `options` parameter is an optional object that can be passed to the
40
- * constructor. It is of type `RBTreeOptions<K, V, R>`. This object can contain various options for
41
- * configuring the behavior of the Red-Black Tree. The specific properties and their meanings would
42
- * depend on the implementation
43
- */
44
- constructor(keysNodesEntriesOrRaws?: Iterable<R | BTNRep<K, V, NODE>>, options?: RBTreeOptions<K, V, R>);
45
- protected _root: NODE | undefined;
46
- /**
47
- * The function returns the root node of a tree or undefined if there is no root.
48
- * @returns The root node of the tree structure, or undefined if there is no root node.
49
- */
50
- get root(): NODE | undefined;
51
- /**
52
- * The function creates a new Red-Black Tree node with the specified key, value, and color.
53
- * @param {K} key - The key parameter represents the key value of the node being created. It is of
54
- * type K, which is a generic type that can be replaced with any specific type when using the
55
- * function.
56
- * @param {V} [value] - The `value` parameter is an optional parameter that represents the value
57
- * associated with the key in the node. It is not required and can be omitted if you only need to
58
- * create a node with a key.
59
- * @param {RBTNColor} [color=BLACK] - The "color" parameter is used to specify the color of the node
60
- * in a Red-Black Tree. It can have two possible values: "RED" or "BLACK". By default, the color is
61
- * set to "BLACK" if not specified.
62
- * @returns A new instance of a RedBlackTreeNode with the specified key, value, and color is being
63
- * returned.
64
- */
65
- createNode(key: K, value?: V, color?: RBTNColor): NODE;
66
- /**
67
- * The function creates a new Red-Black Tree with the specified options.
68
- * @param [options] - The `options` parameter is an optional object that contains additional
69
- * configuration options for creating the Red-Black Tree. It has the following properties:
70
- * @returns a new instance of a RedBlackTree object.
71
- */
72
- createTree(options?: RBTreeOptions<K, V, R>): TREE;
73
- /**
74
- * Time Complexity: O(1)
75
- * Space Complexity: O(1)
76
- *
77
- * The function checks if the input is an instance of the RedBlackTreeNode class.
78
- * @param {BTNRep<K, V, NODE> | R} keyNodeEntryOrRaw - The parameter
79
- * `keyNodeEntryOrRaw` can be of type `R` or `BTNRep<K, V, NODE>`.
80
- * @returns a boolean value indicating whether the input parameter `keyNodeEntryOrRaw` is
81
- * an instance of the `RedBlackTreeNode` class.
82
- */
83
- isNode(keyNodeEntryOrRaw: BTNRep<K, V, NODE> | R): keyNodeEntryOrRaw is NODE;
84
- /**
85
- * Time Complexity: O(1)
86
- * Space Complexity: O(1)
87
- *
88
- * The "clear" function sets the root node of a data structure to a sentinel value and resets the
89
- * size counter to zero.
90
- */
91
- clear(): void;
92
- /**
93
- * Time Complexity: O(log n)
94
- * Space Complexity: O(1)
95
- *
96
- * The function adds a new node to a binary search tree and returns true if the node was successfully
97
- * added.
98
- * @param {BTNRep<K, V, NODE> | R} keyNodeEntryOrRaw - The parameter
99
- * `keyNodeEntryOrRaw` can accept a value of type `R` or `BTNRep<K, V, NODE>`.
100
- * @param {V} [value] - The `value` parameter is an optional value that you want to associate with
101
- * the key in the data structure. It represents the value that you want to add or update in the data
102
- * structure.
103
- * @returns The method is returning a boolean value. If a new node is successfully added to the tree,
104
- * the method returns true. If the node already exists and its value is updated, the method also
105
- * returns true. If the node cannot be added or updated, the method returns false.
106
- */
107
- add(keyNodeEntryOrRaw: BTNRep<K, V, NODE> | R, value?: V): boolean;
108
- /**
109
- * Time Complexity: O(log n)
110
- * Space Complexity: O(1)
111
- *
112
- * The function overrides the delete method in a binary tree data structure to remove a node based on
113
- * a given predicate and maintain the binary search tree properties.
114
- * @param {BTNRep<K, V, NODE> | R} keyNodeEntryOrRaw - The `keyNodeEntryOrRaw`
115
- * parameter in the `override delete` method is used to specify the condition or key based on which a
116
- * node should be deleted from the binary tree. It can be a key, a node, an entry, or a predicate
117
- * function that determines which node(s) should be deleted.
118
- * @returns The `override delete` method is returning an array of `BinaryTreeDeleteResult<NODE>`
119
- * objects. Each object in the array contains information about the deleted node and whether
120
- * balancing is needed.
121
- */
122
- delete(keyNodeEntryOrRaw: BTNRep<K, V, NODE> | R): BinaryTreeDeleteResult<NODE>[];
123
- /**
124
- * Time Complexity: O(1)
125
- * Space Complexity: O(1)
126
- *
127
- * The function sets the root of a tree-like structure and updates the parent property of the new
128
- * root.
129
- * @param {NODE | undefined} v - v is a parameter of type NODE or undefined.
130
- */
131
- protected _setRoot(v: NODE | undefined): void;
132
- /**
133
- * Time Complexity: O(1)
134
- * Space Complexity: O(1)
135
- *
136
- * The function replaces an old node with a new node while preserving the color of the old node.
137
- * @param {NODE} oldNode - The `oldNode` parameter represents the node that needs to be replaced in
138
- * the data structure.
139
- * @param {NODE} newNode - The `newNode` parameter is of type `NODE`, which represents a node in a
140
- * data structure.
141
- * @returns The method is returning the result of calling the `_replaceNode` method from the
142
- * superclass, with the `oldNode` and `newNode` parameters.
143
- */
144
- protected _replaceNode(oldNode: NODE, newNode: NODE): NODE;
145
- /**
146
- * Time Complexity: O(log n)
147
- * Space Complexity: O(1)
148
- *
149
- * The `_insert` function inserts a node into a binary search tree and performs necessary fix-ups to
150
- * maintain the red-black tree properties.
151
- * @param {NODE} node - The `node` parameter represents the node that needs to be inserted into the
152
- * binary search tree.
153
- * @returns a string value indicating the result of the insertion operation. It can return either
154
- * 'UPDATED' if the node with the same key already exists and was updated, or 'CREATED' if a new node
155
- * was created and inserted into the tree.
156
- */
157
- protected _insert(node: NODE): CRUD;
158
- /**
159
- * Time Complexity: O(1)
160
- * Space Complexity: O(1)
161
- *
162
- * The function `_transplant` is used to replace a node `u` with another node `v` in a binary tree.
163
- * @param {NODE} u - The parameter "u" represents a node in a binary tree.
164
- * @param {NODE | undefined} v - The parameter `v` is of type `NODE | undefined`, which means it can
165
- * either be a `NODE` object or `undefined`.
166
- */
167
- protected _transplant(u: NODE, v: NODE | undefined): void;
168
- /**
169
- * Time Complexity: O(log n)
170
- * Space Complexity: O(1)
171
- *
172
- * The `_insertFixup` function is used to fix the Red-Black Tree after inserting a new node.
173
- * @param {NODE | undefined} z - The parameter `z` represents a node in the Red-Black Tree data
174
- * structure. It can either be a valid node or `undefined`.
175
- */
176
- protected _insertFixup(z: NODE | undefined): void;
177
- /**
178
- * Time Complexity: O(log n)
179
- * Space Complexity: O(1)
180
- *
181
- * The `_deleteFixup` function is used to fix the red-black tree after a node deletion by adjusting
182
- * the colors and performing rotations.
183
- * @param {NODE | undefined} node - The `node` parameter represents a node in a binary tree. It can
184
- * be either a valid node object or `undefined`.
185
- * @returns The function does not return any value. It has a return type of `void`, which means it
186
- * does not return anything.
187
- */
188
- protected _deleteFixup(node: NODE | undefined): void;
189
- /**
190
- * Time Complexity: O(1)
191
- * Space Complexity: O(1)
192
- *
193
- * The `_leftRotate` function performs a left rotation on a given node in a binary tree.
194
- * @param {NODE | undefined} x - The parameter `x` is of type `NODE | undefined`. It represents a
195
- * node in a binary tree or `undefined` if there is no node.
196
- * @returns void, which means it does not return any value.
197
- */
198
- protected _leftRotate(x: NODE | undefined): void;
199
- /**
200
- * Time Complexity: O(1)
201
- * Space Complexity: O(1)
202
- *
203
- * The `_rightRotate` function performs a right rotation on a given node in a binary tree.
204
- * @param {NODE | undefined} y - The parameter `y` is of type `NODE | undefined`. It represents a
205
- * node in a binary tree or `undefined` if there is no node.
206
- * @returns void, which means it does not return any value.
207
- */
208
- protected _rightRotate(y: NODE | undefined): void;
209
- }
@@ -1,6 +0,0 @@
1
- import { RedBlackTree, RedBlackTreeNode } from '../../../data-structures';
2
- import type { BSTOptions } from "./bst";
3
- export type RBTNColor = 'RED' | 'BLACK';
4
- export type RedBlackTreeNodeNested<K, V> = RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, any>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>;
5
- export type RedBlackTreeNested<K, V, R, NODE extends RedBlackTreeNode<K, V, NODE>> = RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, any>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>;
6
- export type RBTreeOptions<K, V, R> = Omit<BSTOptions<K, V, R>, 'isReverse'> & {};
@@ -1,10 +0,0 @@
1
- import { RedBlackTree, RedBlackTreeNode } from '../../../data-structures';
2
- import type { BSTOptions } from "./bst";
3
-
4
- export type RBTNColor = 'RED' | 'BLACK';
5
-
6
- export type RedBlackTreeNodeNested<K, V> = RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, RedBlackTreeNode<K, V, any>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
7
-
8
- export type RedBlackTreeNested<K, V, R, NODE extends RedBlackTreeNode<K, V, NODE>> = RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, RedBlackTree<K, V, R, NODE, any>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
9
-
10
- export type RBTreeOptions<K, V, R> = Omit<BSTOptions<K, V, R>, 'isReverse'> & {};