data-structure-typed 2.5.2 → 2.6.0

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 (162) hide show
  1. package/.husky/pre-commit +3 -0
  2. package/CHANGELOG.md +3 -1
  3. package/MIGRATION.md +217 -0
  4. package/README.md +80 -8
  5. package/README_CN.md +569 -143
  6. package/SPECIFICATION.md +44 -14
  7. package/SPECIFICATION.zh-CN.md +44 -14
  8. package/dist/cjs/binary-tree.cjs +5841 -1678
  9. package/dist/cjs/graph.cjs +422 -14
  10. package/dist/cjs/hash.cjs +95 -7
  11. package/dist/cjs/heap.cjs +174 -16
  12. package/dist/cjs/index.cjs +7751 -2449
  13. package/dist/cjs/linked-list.cjs +443 -2
  14. package/dist/cjs/matrix.cjs +56 -0
  15. package/dist/cjs/priority-queue.cjs +172 -14
  16. package/dist/cjs/queue.cjs +435 -0
  17. package/dist/cjs/stack.cjs +103 -4
  18. package/dist/cjs/trie.cjs +106 -0
  19. package/dist/cjs-legacy/binary-tree.cjs +5933 -1772
  20. package/dist/cjs-legacy/graph.cjs +422 -14
  21. package/dist/cjs-legacy/hash.cjs +95 -7
  22. package/dist/cjs-legacy/heap.cjs +174 -16
  23. package/dist/cjs-legacy/index.cjs +8154 -2854
  24. package/dist/cjs-legacy/linked-list.cjs +443 -2
  25. package/dist/cjs-legacy/matrix.cjs +56 -0
  26. package/dist/cjs-legacy/priority-queue.cjs +172 -14
  27. package/dist/cjs-legacy/queue.cjs +435 -0
  28. package/dist/cjs-legacy/stack.cjs +103 -4
  29. package/dist/cjs-legacy/trie.cjs +106 -0
  30. package/dist/esm/binary-tree.mjs +5841 -1678
  31. package/dist/esm/graph.mjs +422 -14
  32. package/dist/esm/hash.mjs +95 -7
  33. package/dist/esm/heap.mjs +174 -16
  34. package/dist/esm/index.mjs +7751 -2449
  35. package/dist/esm/linked-list.mjs +443 -2
  36. package/dist/esm/matrix.mjs +56 -0
  37. package/dist/esm/priority-queue.mjs +172 -14
  38. package/dist/esm/queue.mjs +435 -0
  39. package/dist/esm/stack.mjs +103 -4
  40. package/dist/esm/trie.mjs +106 -0
  41. package/dist/esm-legacy/binary-tree.mjs +5933 -1772
  42. package/dist/esm-legacy/graph.mjs +422 -14
  43. package/dist/esm-legacy/hash.mjs +95 -7
  44. package/dist/esm-legacy/heap.mjs +174 -16
  45. package/dist/esm-legacy/index.mjs +8154 -2854
  46. package/dist/esm-legacy/linked-list.mjs +443 -2
  47. package/dist/esm-legacy/matrix.mjs +56 -0
  48. package/dist/esm-legacy/priority-queue.mjs +172 -14
  49. package/dist/esm-legacy/queue.mjs +435 -0
  50. package/dist/esm-legacy/stack.mjs +103 -4
  51. package/dist/esm-legacy/trie.mjs +106 -0
  52. package/dist/types/data-structures/base/iterable-element-base.d.ts +17 -0
  53. package/dist/types/data-structures/base/linear-base.d.ts +6 -0
  54. package/dist/types/data-structures/binary-tree/avl-tree.d.ts +86 -2
  55. package/dist/types/data-structures/binary-tree/binary-indexed-tree.d.ts +98 -0
  56. package/dist/types/data-structures/binary-tree/binary-tree.d.ts +191 -15
  57. package/dist/types/data-structures/binary-tree/bst.d.ts +171 -3
  58. package/dist/types/data-structures/binary-tree/red-black-tree.d.ts +136 -8
  59. package/dist/types/data-structures/binary-tree/segment-tree.d.ts +42 -0
  60. package/dist/types/data-structures/binary-tree/tree-map.d.ts +1061 -167
  61. package/dist/types/data-structures/binary-tree/tree-multi-map.d.ts +1232 -355
  62. package/dist/types/data-structures/binary-tree/tree-multi-set.d.ts +916 -194
  63. package/dist/types/data-structures/binary-tree/tree-set.d.ts +1078 -141
  64. package/dist/types/data-structures/graph/directed-graph.d.ts +70 -0
  65. package/dist/types/data-structures/graph/undirected-graph.d.ts +63 -0
  66. package/dist/types/data-structures/hash/hash-map.d.ts +84 -6
  67. package/dist/types/data-structures/heap/heap.d.ts +140 -12
  68. package/dist/types/data-structures/linked-list/doubly-linked-list.d.ts +150 -2
  69. package/dist/types/data-structures/linked-list/singly-linked-list.d.ts +106 -1
  70. package/dist/types/data-structures/linked-list/skip-linked-list.d.ts +126 -0
  71. package/dist/types/data-structures/matrix/matrix.d.ts +56 -0
  72. package/dist/types/data-structures/queue/deque.d.ts +171 -0
  73. package/dist/types/data-structures/queue/queue.d.ts +97 -0
  74. package/dist/types/data-structures/stack/stack.d.ts +72 -2
  75. package/dist/types/data-structures/trie/trie.d.ts +84 -0
  76. package/dist/types/interfaces/binary-tree.d.ts +2 -3
  77. package/dist/umd/data-structure-typed.js +7784 -2484
  78. package/dist/umd/data-structure-typed.min.js +4 -4
  79. package/docs-site-docusaurus/docs/api/classes/AVLTree.md +188 -200
  80. package/docs-site-docusaurus/docs/api/classes/AVLTreeNode.md +11 -11
  81. package/docs-site-docusaurus/docs/api/classes/AbstractGraph.md +62 -62
  82. package/docs-site-docusaurus/docs/api/classes/BST.md +183 -195
  83. package/docs-site-docusaurus/docs/api/classes/BSTNode.md +13 -13
  84. package/docs-site-docusaurus/docs/api/classes/BinaryIndexedTree.md +15 -15
  85. package/docs-site-docusaurus/docs/api/classes/BinaryTree.md +143 -155
  86. package/docs-site-docusaurus/docs/api/classes/BinaryTreeNode.md +13 -13
  87. package/docs-site-docusaurus/docs/api/classes/Deque.md +99 -85
  88. package/docs-site-docusaurus/docs/api/classes/DirectedGraph.md +73 -73
  89. package/docs-site-docusaurus/docs/api/classes/DoublyLinkedList.md +100 -70
  90. package/docs-site-docusaurus/docs/api/classes/DoublyLinkedListNode.md +8 -8
  91. package/docs-site-docusaurus/docs/api/classes/FibonacciHeap.md +12 -12
  92. package/docs-site-docusaurus/docs/api/classes/FibonacciHeapNode.md +1 -1
  93. package/docs-site-docusaurus/docs/api/classes/HashMap.md +38 -38
  94. package/docs-site-docusaurus/docs/api/classes/Heap.md +96 -85
  95. package/docs-site-docusaurus/docs/api/classes/IterableElementBase.md +25 -25
  96. package/docs-site-docusaurus/docs/api/classes/IterableEntryBase.md +23 -23
  97. package/docs-site-docusaurus/docs/api/classes/LinearBase.md +48 -48
  98. package/docs-site-docusaurus/docs/api/classes/LinearLinkedBase.md +52 -52
  99. package/docs-site-docusaurus/docs/api/classes/LinkedHashMap.md +46 -42
  100. package/docs-site-docusaurus/docs/api/classes/LinkedListNode.md +6 -6
  101. package/docs-site-docusaurus/docs/api/classes/LinkedListQueue.md +74 -74
  102. package/docs-site-docusaurus/docs/api/classes/MapGraph.md +73 -73
  103. package/docs-site-docusaurus/docs/api/classes/Matrix.md +31 -31
  104. package/docs-site-docusaurus/docs/api/classes/MaxHeap.md +104 -89
  105. package/docs-site-docusaurus/docs/api/classes/MaxPriorityQueue.md +104 -89
  106. package/docs-site-docusaurus/docs/api/classes/MinHeap.md +104 -89
  107. package/docs-site-docusaurus/docs/api/classes/MinPriorityQueue.md +104 -89
  108. package/docs-site-docusaurus/docs/api/classes/Navigator.md +5 -5
  109. package/docs-site-docusaurus/docs/api/classes/PriorityQueue.md +103 -88
  110. package/docs-site-docusaurus/docs/api/classes/Queue.md +111 -59
  111. package/docs-site-docusaurus/docs/api/classes/RedBlackTree.md +200 -212
  112. package/docs-site-docusaurus/docs/api/classes/SegmentTree.md +10 -10
  113. package/docs-site-docusaurus/docs/api/classes/SinglyLinkedList.md +75 -75
  114. package/docs-site-docusaurus/docs/api/classes/SinglyLinkedListNode.md +6 -6
  115. package/docs-site-docusaurus/docs/api/classes/SkipList.md +37 -37
  116. package/docs-site-docusaurus/docs/api/classes/Stack.md +42 -42
  117. package/docs-site-docusaurus/docs/api/classes/TreeMap.md +107 -36
  118. package/docs-site-docusaurus/docs/api/classes/TreeMultiMap.md +43 -43
  119. package/docs-site-docusaurus/docs/api/classes/TreeSet.md +106 -35
  120. package/docs-site-docusaurus/docs/api/classes/Trie.md +43 -43
  121. package/docs-site-docusaurus/docs/api/classes/TrieNode.md +8 -8
  122. package/docs-site-docusaurus/docs/api/classes/UndirectedGraph.md +72 -72
  123. package/docs-site-docusaurus/docs/guide/architecture.md +75 -7
  124. package/docs-site-docusaurus/docs/guide/concepts.md +53 -34
  125. package/docs-site-docusaurus/docs/guide/faq.md +53 -0
  126. package/docs-site-docusaurus/docs/guide/guides.md +8 -9
  127. package/docs-site-docusaurus/docs/guide/integrations.md +74 -177
  128. package/docs-site-docusaurus/docs/guide/overview.md +131 -17
  129. package/docs-site-docusaurus/src/pages/index.tsx +4 -0
  130. package/docs-site-docusaurus/typedoc.json +1 -0
  131. package/jest.integration.config.js +1 -2
  132. package/package.json +10 -7
  133. package/src/data-structures/base/iterable-element-base.ts +32 -0
  134. package/src/data-structures/base/linear-base.ts +11 -0
  135. package/src/data-structures/binary-tree/avl-tree.ts +88 -5
  136. package/src/data-structures/binary-tree/binary-indexed-tree.ts +98 -0
  137. package/src/data-structures/binary-tree/binary-tree.ts +242 -81
  138. package/src/data-structures/binary-tree/bst.ts +173 -7
  139. package/src/data-structures/binary-tree/red-black-tree.ts +139 -15
  140. package/src/data-structures/binary-tree/segment-tree.ts +42 -0
  141. package/src/data-structures/binary-tree/tree-map.ts +948 -36
  142. package/src/data-structures/binary-tree/tree-multi-map.ts +893 -13
  143. package/src/data-structures/binary-tree/tree-multi-set.ts +761 -33
  144. package/src/data-structures/binary-tree/tree-set.ts +1260 -251
  145. package/src/data-structures/graph/directed-graph.ts +71 -1
  146. package/src/data-structures/graph/undirected-graph.ts +64 -1
  147. package/src/data-structures/hash/hash-map.ts +100 -12
  148. package/src/data-structures/heap/heap.ts +149 -19
  149. package/src/data-structures/linked-list/doubly-linked-list.ts +178 -2
  150. package/src/data-structures/linked-list/singly-linked-list.ts +106 -1
  151. package/src/data-structures/linked-list/skip-linked-list.ts +126 -0
  152. package/src/data-structures/matrix/matrix.ts +56 -0
  153. package/src/data-structures/queue/deque.ts +187 -0
  154. package/src/data-structures/queue/queue.ts +109 -0
  155. package/src/data-structures/stack/stack.ts +75 -5
  156. package/src/data-structures/trie/trie.ts +84 -0
  157. package/src/interfaces/binary-tree.ts +1 -9
  158. package/.vitepress/cache/deps_temp_51f5f1b0/chunk-7OIKW5WK.js +0 -12984
  159. package/.vitepress/cache/deps_temp_51f5f1b0/package.json +0 -3
  160. package/.vitepress/cache/deps_temp_51f5f1b0/vitepress___@vue_devtools-api.js +0 -4505
  161. package/.vitepress/cache/deps_temp_51f5f1b0/vitepress___@vueuse_core.js +0 -9731
  162. package/.vitepress/cache/deps_temp_51f5f1b0/vue.js +0 -347
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Class: SinglyLinkedListNode\<E\>
8
8
 
9
- Defined in: [data-structures/linked-list/singly-linked-list.ts:17](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/linked-list/singly-linked-list.ts#L17)
9
+ Defined in: [data-structures/linked-list/singly-linked-list.ts:17](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/linked-list/singly-linked-list.ts#L17)
10
10
 
11
11
  Node of a singly linked list; stores value and the next link.
12
12
 
@@ -32,7 +32,7 @@ Time O(1), Space O(1)
32
32
  new SinglyLinkedListNode<E>(value): SinglyLinkedListNode<E>;
33
33
  ```
34
34
 
35
- Defined in: [data-structures/linked-list/singly-linked-list.ts:25](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/linked-list/singly-linked-list.ts#L25)
35
+ Defined in: [data-structures/linked-list/singly-linked-list.ts:25](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/linked-list/singly-linked-list.ts#L25)
36
36
 
37
37
  Create a list node.
38
38
 
@@ -68,7 +68,7 @@ Time O(1), Space O(1)
68
68
  get next(): SinglyLinkedListNode<E> | undefined;
69
69
  ```
70
70
 
71
- Defined in: [data-structures/linked-list/singly-linked-list.ts:39](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/linked-list/singly-linked-list.ts#L39)
71
+ Defined in: [data-structures/linked-list/singly-linked-list.ts:39](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/linked-list/singly-linked-list.ts#L39)
72
72
 
73
73
  Get the next node.
74
74
 
@@ -88,7 +88,7 @@ Next node or undefined.
88
88
  set next(value): void;
89
89
  ```
90
90
 
91
- Defined in: [data-structures/linked-list/singly-linked-list.ts:50](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/linked-list/singly-linked-list.ts#L50)
91
+ Defined in: [data-structures/linked-list/singly-linked-list.ts:50](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/linked-list/singly-linked-list.ts#L50)
92
92
 
93
93
  Set the next node.
94
94
 
@@ -124,7 +124,7 @@ void
124
124
  get value(): E;
125
125
  ```
126
126
 
127
- Defined in: [data-structures/base/linear-base.ts:27](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/base/linear-base.ts#L27)
127
+ Defined in: [data-structures/base/linear-base.ts:27](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/linear-base.ts#L27)
128
128
 
129
129
  Element payload getter.
130
130
 
@@ -144,7 +144,7 @@ Element value.
144
144
  set value(value): void;
145
145
  ```
146
146
 
147
- Defined in: [data-structures/base/linear-base.ts:36](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/base/linear-base.ts#L36)
147
+ Defined in: [data-structures/base/linear-base.ts:36](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/linear-base.ts#L36)
148
148
 
149
149
  Element payload setter.
150
150
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Class: SkipList\<K, V, R\>
8
8
 
9
- Defined in: [data-structures/linked-list/skip-linked-list.ts:49](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/linked-list/skip-linked-list.ts#L49)
9
+ Defined in: [data-structures/linked-list/skip-linked-list.ts:49](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/linked-list/skip-linked-list.ts#L49)
10
10
 
11
11
  SkipList — a probabilistic sorted key-value container.
12
12
 
@@ -49,7 +49,7 @@ Reference: Java ConcurrentSkipListMap (NavigableMap interface).
49
49
  get size(): number;
50
50
  ```
51
51
 
52
- Defined in: [data-structures/linked-list/skip-linked-list.ts:122](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/linked-list/skip-linked-list.ts#L122)
52
+ Defined in: [data-structures/linked-list/skip-linked-list.ts:122](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/linked-list/skip-linked-list.ts#L122)
53
53
 
54
54
  Total number of entries.
55
55
 
@@ -75,7 +75,7 @@ Entry count.
75
75
  iterator: IterableIterator<[K, V | undefined]>;
76
76
  ```
77
77
 
78
- Defined in: [data-structures/base/iterable-entry-base.ts:22](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/base/iterable-entry-base.ts#L22)
78
+ Defined in: [data-structures/base/iterable-entry-base.ts:22](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-entry-base.ts#L22)
79
79
 
80
80
  Default iterator yielding `[key, value]` entries.
81
81
 
@@ -107,7 +107,7 @@ Time O(n) to iterate, Space O(1)
107
107
  ceiling(key): [K, V | undefined] | undefined;
108
108
  ```
109
109
 
110
- Defined in: [data-structures/linked-list/skip-linked-list.ts:783](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/linked-list/skip-linked-list.ts#L783)
110
+ Defined in: [data-structures/linked-list/skip-linked-list.ts:831](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/linked-list/skip-linked-list.ts#L831)
111
111
 
112
112
  Least entry ≥ key, or `undefined`.
113
113
 
@@ -140,7 +140,7 @@ Least entry ≥ key, or `undefined`.
140
140
  clear(): void;
141
141
  ```
142
142
 
143
- Defined in: [data-structures/linked-list/skip-linked-list.ts:221](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/linked-list/skip-linked-list.ts#L221)
143
+ Defined in: [data-structures/linked-list/skip-linked-list.ts:229](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/linked-list/skip-linked-list.ts#L229)
144
144
 
145
145
  Remove all entries
146
146
 
@@ -171,7 +171,7 @@ Remove all entries
171
171
  clone(): this;
172
172
  ```
173
173
 
174
- Defined in: [data-structures/linked-list/skip-linked-list.ts:268](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/linked-list/skip-linked-list.ts#L268)
174
+ Defined in: [data-structures/linked-list/skip-linked-list.ts:280](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/linked-list/skip-linked-list.ts#L280)
175
175
 
176
176
  Create independent copy
177
177
 
@@ -203,7 +203,7 @@ Create independent copy
203
203
  delete(key): boolean;
204
204
  ```
205
205
 
206
- Defined in: [data-structures/linked-list/skip-linked-list.ts:525](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/linked-list/skip-linked-list.ts#L525)
206
+ Defined in: [data-structures/linked-list/skip-linked-list.ts:553](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/linked-list/skip-linked-list.ts#L553)
207
207
 
208
208
  Delete a key. Returns `true` if the key was found and removed.
209
209
 
@@ -243,7 +243,7 @@ Delete a key. Returns `true` if the key was found and removed.
243
243
  entries(): IterableIterator<[K, V | undefined]>;
244
244
  ```
245
245
 
246
- Defined in: [data-structures/base/iterable-entry-base.ts:31](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/base/iterable-entry-base.ts#L31)
246
+ Defined in: [data-structures/base/iterable-entry-base.ts:31](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-entry-base.ts#L31)
247
247
 
248
248
  Iterate over `[key, value]` pairs (may yield `undefined` values).
249
249
 
@@ -269,7 +269,7 @@ Time O(n), Space O(1)
269
269
  every(predicate, thisArg?): boolean;
270
270
  ```
271
271
 
272
- Defined in: [data-structures/base/iterable-entry-base.ts:66](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/base/iterable-entry-base.ts#L66)
272
+ Defined in: [data-structures/base/iterable-entry-base.ts:66](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-entry-base.ts#L66)
273
273
 
274
274
  Test whether all entries satisfy the predicate.
275
275
 
@@ -309,7 +309,7 @@ Time O(n), Space O(1)
309
309
  filter(callbackfn, thisArg?): this;
310
310
  ```
311
311
 
312
- Defined in: [data-structures/linked-list/skip-linked-list.ts:1129](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/linked-list/skip-linked-list.ts#L1129)
312
+ Defined in: [data-structures/linked-list/skip-linked-list.ts:1201](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/linked-list/skip-linked-list.ts#L1201)
313
313
 
314
314
  Creates a new SkipList with entries that pass the predicate.
315
315
 
@@ -350,7 +350,7 @@ Creates a new SkipList with entries that pass the predicate.
350
350
  find(callbackfn, thisArg?): [K, V | undefined] | undefined;
351
351
  ```
352
352
 
353
- Defined in: [data-structures/base/iterable-entry-base.ts:114](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/base/iterable-entry-base.ts#L114)
353
+ Defined in: [data-structures/base/iterable-entry-base.ts:114](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-entry-base.ts#L114)
354
354
 
355
355
  Find the first entry that matches a predicate.
356
356
 
@@ -390,7 +390,7 @@ Time O(n), Space O(1)
390
390
  first(): [K, V | undefined] | undefined;
391
391
  ```
392
392
 
393
- Defined in: [data-structures/linked-list/skip-linked-list.ts:589](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/linked-list/skip-linked-list.ts#L589)
393
+ Defined in: [data-structures/linked-list/skip-linked-list.ts:621](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/linked-list/skip-linked-list.ts#L621)
394
394
 
395
395
  Returns the first (smallest key) entry, or `undefined` if empty.
396
396
 
@@ -416,7 +416,7 @@ Returns the first (smallest key) entry, or `undefined` if empty.
416
416
  floor(key): [K, V | undefined] | undefined;
417
417
  ```
418
418
 
419
- Defined in: [data-structures/linked-list/skip-linked-list.ts:838](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/linked-list/skip-linked-list.ts#L838)
419
+ Defined in: [data-structures/linked-list/skip-linked-list.ts:890](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/linked-list/skip-linked-list.ts#L890)
420
420
 
421
421
  Greatest entry ≤ key, or `undefined`.
422
422
 
@@ -449,7 +449,7 @@ Greatest entry ≤ key, or `undefined`.
449
449
  forEach(callbackfn, thisArg?): void;
450
450
  ```
451
451
 
452
- Defined in: [data-structures/base/iterable-entry-base.ts:99](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/base/iterable-entry-base.ts#L99)
452
+ Defined in: [data-structures/base/iterable-entry-base.ts:99](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-entry-base.ts#L99)
453
453
 
454
454
  Visit each entry, left-to-right.
455
455
 
@@ -487,7 +487,7 @@ Time O(n), Space O(1)
487
487
  get(key): V | undefined;
488
488
  ```
489
489
 
490
- Defined in: [data-structures/linked-list/skip-linked-list.ts:422](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/linked-list/skip-linked-list.ts#L422)
490
+ Defined in: [data-structures/linked-list/skip-linked-list.ts:442](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/linked-list/skip-linked-list.ts#L442)
491
491
 
492
492
  Get the value for a key, or `undefined` if not found.
493
493
  Overrides base O(n) with O(log n) skip-list search.
@@ -540,7 +540,7 @@ Overrides base O(n) with O(log n) skip-list search.
540
540
  has(key): boolean;
541
541
  ```
542
542
 
543
- Defined in: [data-structures/linked-list/skip-linked-list.ts:471](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/linked-list/skip-linked-list.ts#L471)
543
+ Defined in: [data-structures/linked-list/skip-linked-list.ts:495](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/linked-list/skip-linked-list.ts#L495)
544
544
 
545
545
  Check if a key exists.
546
546
  Overrides base O(n) with O(log n) skip-list search.
@@ -578,7 +578,7 @@ Overrides base O(n) with O(log n) skip-list search.
578
578
  hasValue(value): boolean;
579
579
  ```
580
580
 
581
- Defined in: [data-structures/base/iterable-entry-base.ts:143](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/base/iterable-entry-base.ts#L143)
581
+ Defined in: [data-structures/base/iterable-entry-base.ts:143](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-entry-base.ts#L143)
582
582
 
583
583
  Whether there exists an entry with the given value.
584
584
 
@@ -612,7 +612,7 @@ Time O(n), Space O(1)
612
612
  higher(key): [K, V | undefined] | undefined;
613
613
  ```
614
614
 
615
- Defined in: [data-structures/linked-list/skip-linked-list.ts:893](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/linked-list/skip-linked-list.ts#L893)
615
+ Defined in: [data-structures/linked-list/skip-linked-list.ts:949](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/linked-list/skip-linked-list.ts#L949)
616
616
 
617
617
  Least entry strictly > key, or `undefined`.
618
618
 
@@ -645,7 +645,7 @@ Least entry strictly > key, or `undefined`.
645
645
  isEmpty(): boolean;
646
646
  ```
647
647
 
648
- Defined in: [data-structures/linked-list/skip-linked-list.ts:177](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/linked-list/skip-linked-list.ts#L177)
648
+ Defined in: [data-structures/linked-list/skip-linked-list.ts:181](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/linked-list/skip-linked-list.ts#L181)
649
649
 
650
650
  Check if empty
651
651
 
@@ -675,7 +675,7 @@ Check if empty
675
675
  keys(): IterableIterator<K>;
676
676
  ```
677
677
 
678
- Defined in: [data-structures/base/iterable-entry-base.ts:42](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/base/iterable-entry-base.ts#L42)
678
+ Defined in: [data-structures/base/iterable-entry-base.ts:42](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-entry-base.ts#L42)
679
679
 
680
680
  Iterate over keys only.
681
681
 
@@ -701,7 +701,7 @@ Time O(n), Space O(1)
701
701
  last(): [K, V | undefined] | undefined;
702
702
  ```
703
703
 
704
- Defined in: [data-structures/linked-list/skip-linked-list.ts:636](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/linked-list/skip-linked-list.ts#L636)
704
+ Defined in: [data-structures/linked-list/skip-linked-list.ts:672](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/linked-list/skip-linked-list.ts#L672)
705
705
 
706
706
  Returns the last (largest key) entry, or `undefined` if empty.
707
707
 
@@ -727,7 +727,7 @@ Returns the last (largest key) entry, or `undefined` if empty.
727
727
  lower(key): [K, V | undefined] | undefined;
728
728
  ```
729
729
 
730
- Defined in: [data-structures/linked-list/skip-linked-list.ts:945](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/linked-list/skip-linked-list.ts#L945)
730
+ Defined in: [data-structures/linked-list/skip-linked-list.ts:1005](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/linked-list/skip-linked-list.ts#L1005)
731
731
 
732
732
  Greatest entry strictly < key, or `undefined`.
733
733
 
@@ -760,7 +760,7 @@ Greatest entry strictly < key, or `undefined`.
760
760
  map<MK, MV>(callback, options?): SkipList<MK, MV>;
761
761
  ```
762
762
 
763
- Defined in: [data-structures/linked-list/skip-linked-list.ts:1076](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/linked-list/skip-linked-list.ts#L1076)
763
+ Defined in: [data-structures/linked-list/skip-linked-list.ts:1144](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/linked-list/skip-linked-list.ts#L1144)
764
764
 
765
765
  Creates a new SkipList with entries transformed by callback.
766
766
 
@@ -811,7 +811,7 @@ Creates a new SkipList with entries transformed by callback.
811
811
  pollFirst(): [K, V | undefined] | undefined;
812
812
  ```
813
813
 
814
- Defined in: [data-structures/linked-list/skip-linked-list.ts:686](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/linked-list/skip-linked-list.ts#L686)
814
+ Defined in: [data-structures/linked-list/skip-linked-list.ts:726](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/linked-list/skip-linked-list.ts#L726)
815
815
 
816
816
  Remove and return the first (smallest key) entry.
817
817
 
@@ -838,7 +838,7 @@ Remove and return the first (smallest key) entry.
838
838
  pollLast(): [K, V | undefined] | undefined;
839
839
  ```
840
840
 
841
- Defined in: [data-structures/linked-list/skip-linked-list.ts:733](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/linked-list/skip-linked-list.ts#L733)
841
+ Defined in: [data-structures/linked-list/skip-linked-list.ts:777](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/linked-list/skip-linked-list.ts#L777)
842
842
 
843
843
  Remove and return the last (largest key) entry.
844
844
 
@@ -865,7 +865,7 @@ Remove and return the last (largest key) entry.
865
865
  print(): void;
866
866
  ```
867
867
 
868
- Defined in: [data-structures/base/iterable-entry-base.ts:203](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/base/iterable-entry-base.ts#L203)
868
+ Defined in: [data-structures/base/iterable-entry-base.ts:203](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-entry-base.ts#L203)
869
869
 
870
870
  Print a human-friendly representation to the console.
871
871
 
@@ -889,7 +889,7 @@ Time O(n), Space O(n)
889
889
  rangeSearch(range, options?): [K, V | undefined][];
890
890
  ```
891
891
 
892
- Defined in: [data-structures/linked-list/skip-linked-list.ts:1003](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/linked-list/skip-linked-list.ts#L1003)
892
+ Defined in: [data-structures/linked-list/skip-linked-list.ts:1067](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/linked-list/skip-linked-list.ts#L1067)
893
893
 
894
894
  Returns entries within the given key range.
895
895
 
@@ -926,7 +926,7 @@ Returns entries within the given key range.
926
926
  reduce<U>(callbackfn, initialValue): U;
927
927
  ```
928
928
 
929
- Defined in: [data-structures/base/iterable-entry-base.ts:171](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/base/iterable-entry-base.ts#L171)
929
+ Defined in: [data-structures/base/iterable-entry-base.ts:171](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-entry-base.ts#L171)
930
930
 
931
931
  Reduce entries into a single accumulator.
932
932
 
@@ -972,7 +972,7 @@ Time O(n), Space O(1)
972
972
  set(key, value): this;
973
973
  ```
974
974
 
975
- Defined in: [data-structures/linked-list/skip-linked-list.ts:333](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/linked-list/skip-linked-list.ts#L333)
975
+ Defined in: [data-structures/linked-list/skip-linked-list.ts:349](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/linked-list/skip-linked-list.ts#L349)
976
976
 
977
977
  Insert or update a key-value pair. Returns `this` for chaining.
978
978
  Unique keys only — if key exists, value is updated in place.
@@ -1021,7 +1021,7 @@ Unique keys only — if key exists, value is updated in place.
1021
1021
  some(predicate, thisArg?): boolean;
1022
1022
  ```
1023
1023
 
1024
- Defined in: [data-structures/base/iterable-entry-base.ts:83](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/base/iterable-entry-base.ts#L83)
1024
+ Defined in: [data-structures/base/iterable-entry-base.ts:83](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-entry-base.ts#L83)
1025
1025
 
1026
1026
  Test whether any entry satisfies the predicate.
1027
1027
 
@@ -1061,7 +1061,7 @@ Time O(n), Space O(1)
1061
1061
  toArray(): [K, V | undefined][];
1062
1062
  ```
1063
1063
 
1064
- Defined in: [data-structures/base/iterable-entry-base.ts:186](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/base/iterable-entry-base.ts#L186)
1064
+ Defined in: [data-structures/base/iterable-entry-base.ts:186](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-entry-base.ts#L186)
1065
1065
 
1066
1066
  Converts data structure to `[key, value]` pairs.
1067
1067
 
@@ -1087,7 +1087,7 @@ Time O(n), Space O(n)
1087
1087
  toVisual(): string | [K, V | undefined][];
1088
1088
  ```
1089
1089
 
1090
- Defined in: [data-structures/base/iterable-entry-base.ts:195](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/base/iterable-entry-base.ts#L195)
1090
+ Defined in: [data-structures/base/iterable-entry-base.ts:195](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-entry-base.ts#L195)
1091
1091
 
1092
1092
  Visualize the iterable as an array of `[key, value]` pairs (or a custom string).
1093
1093
 
@@ -1113,7 +1113,7 @@ Time O(n), Space O(n)
1113
1113
  values(): IterableIterator<V | undefined>;
1114
1114
  ```
1115
1115
 
1116
- Defined in: [data-structures/base/iterable-entry-base.ts:53](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/base/iterable-entry-base.ts#L53)
1116
+ Defined in: [data-structures/base/iterable-entry-base.ts:53](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-entry-base.ts#L53)
1117
1117
 
1118
1118
  Iterate over values only.
1119
1119
 
@@ -1139,7 +1139,7 @@ Time O(n), Space O(1)
1139
1139
  static createDefaultComparator<K>(): Comparator<K>;
1140
1140
  ```
1141
1141
 
1142
- Defined in: [data-structures/linked-list/skip-linked-list.ts:86](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/linked-list/skip-linked-list.ts#L86)
1142
+ Defined in: [data-structures/linked-list/skip-linked-list.ts:86](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/linked-list/skip-linked-list.ts#L86)
1143
1143
 
1144
1144
  Creates a default comparator supporting number, string, Date, and bigint.
1145
1145
 
@@ -1164,7 +1164,7 @@ Creates a default comparator supporting number, string, Date, and bigint.
1164
1164
  protected _findNode(key): SkipListNode<K, V> | undefined;
1165
1165
  ```
1166
1166
 
1167
- Defined in: [data-structures/linked-list/skip-linked-list.ts:1182](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/linked-list/skip-linked-list.ts#L1182)
1167
+ Defined in: [data-structures/linked-list/skip-linked-list.ts:1254](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/linked-list/skip-linked-list.ts#L1254)
1168
1168
 
1169
1169
  Finds the node for a given key, or undefined.
1170
1170
 
@@ -1186,7 +1186,7 @@ Finds the node for a given key, or undefined.
1186
1186
  protected _findUpdate(key): SkipListNode<K, V>[];
1187
1187
  ```
1188
1188
 
1189
- Defined in: [data-structures/linked-list/skip-linked-list.ts:1164](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/linked-list/skip-linked-list.ts#L1164)
1189
+ Defined in: [data-structures/linked-list/skip-linked-list.ts:1236](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/linked-list/skip-linked-list.ts#L1236)
1190
1190
 
1191
1191
  Finds the update array (predecessors at each level) for a given key.
1192
1192
 
@@ -1208,7 +1208,7 @@ Finds the update array (predecessors at each level) for a given key.
1208
1208
  protected _getIterator(): IterableIterator<[K, V | undefined]>;
1209
1209
  ```
1210
1210
 
1211
- Defined in: [data-structures/linked-list/skip-linked-list.ts:1148](https://github.com/zrwusa/data-structure-typed/blob/8292cb978daf85ebe846186c7c7572aece04fb7b/src/data-structures/linked-list/skip-linked-list.ts#L1148)
1211
+ Defined in: [data-structures/linked-list/skip-linked-list.ts:1220](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/linked-list/skip-linked-list.ts#L1220)
1212
1212
 
1213
1213
  Underlying iterator for the default iteration protocol.
1214
1214