data-structure-typed 2.5.1 → 2.5.3

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 (184) hide show
  1. package/CHANGELOG.md +5 -1
  2. package/MIGRATION.md +169 -0
  3. package/README.md +135 -23
  4. package/README_CN.md +551 -143
  5. package/SPECIFICATION.md +20 -14
  6. package/SPECIFICATION.zh-CN.md +20 -14
  7. package/dist/cjs/binary-tree.cjs +6460 -1591
  8. package/dist/cjs/graph.cjs +440 -20
  9. package/dist/cjs/hash.cjs +125 -22
  10. package/dist/cjs/heap.cjs +196 -47
  11. package/dist/cjs/index.cjs +8486 -2429
  12. package/dist/cjs/linked-list.cjs +456 -31
  13. package/dist/cjs/matrix.cjs +79 -9
  14. package/dist/cjs/priority-queue.cjs +193 -44
  15. package/dist/cjs/queue.cjs +391 -2
  16. package/dist/cjs/stack.cjs +92 -6
  17. package/dist/cjs/trie.cjs +122 -28
  18. package/dist/cjs-legacy/binary-tree.cjs +6484 -1612
  19. package/dist/cjs-legacy/graph.cjs +440 -20
  20. package/dist/cjs-legacy/hash.cjs +125 -22
  21. package/dist/cjs-legacy/heap.cjs +196 -47
  22. package/dist/cjs-legacy/index.cjs +8654 -2594
  23. package/dist/cjs-legacy/linked-list.cjs +456 -31
  24. package/dist/cjs-legacy/matrix.cjs +79 -9
  25. package/dist/cjs-legacy/priority-queue.cjs +193 -44
  26. package/dist/cjs-legacy/queue.cjs +391 -2
  27. package/dist/cjs-legacy/stack.cjs +92 -6
  28. package/dist/cjs-legacy/trie.cjs +122 -28
  29. package/dist/esm/binary-tree.mjs +6460 -1591
  30. package/dist/esm/graph.mjs +440 -20
  31. package/dist/esm/hash.mjs +125 -22
  32. package/dist/esm/heap.mjs +196 -47
  33. package/dist/esm/index.mjs +8486 -2430
  34. package/dist/esm/linked-list.mjs +456 -31
  35. package/dist/esm/matrix.mjs +79 -9
  36. package/dist/esm/priority-queue.mjs +193 -44
  37. package/dist/esm/queue.mjs +391 -2
  38. package/dist/esm/stack.mjs +92 -6
  39. package/dist/esm/trie.mjs +122 -28
  40. package/dist/esm-legacy/binary-tree.mjs +6484 -1612
  41. package/dist/esm-legacy/graph.mjs +440 -20
  42. package/dist/esm-legacy/hash.mjs +125 -22
  43. package/dist/esm-legacy/heap.mjs +196 -47
  44. package/dist/esm-legacy/index.mjs +8654 -2595
  45. package/dist/esm-legacy/linked-list.mjs +456 -31
  46. package/dist/esm-legacy/matrix.mjs +79 -9
  47. package/dist/esm-legacy/priority-queue.mjs +193 -44
  48. package/dist/esm-legacy/queue.mjs +391 -2
  49. package/dist/esm-legacy/stack.mjs +92 -6
  50. package/dist/esm-legacy/trie.mjs +122 -28
  51. package/dist/types/common/error.d.ts +9 -0
  52. package/dist/types/common/index.d.ts +1 -1
  53. package/dist/types/data-structures/binary-tree/avl-tree.d.ts +98 -2
  54. package/dist/types/data-structures/binary-tree/binary-indexed-tree.d.ts +112 -0
  55. package/dist/types/data-structures/binary-tree/binary-tree.d.ts +214 -13
  56. package/dist/types/data-structures/binary-tree/bst.d.ts +294 -3
  57. package/dist/types/data-structures/binary-tree/red-black-tree.d.ts +155 -8
  58. package/dist/types/data-structures/binary-tree/segment-tree.d.ts +48 -0
  59. package/dist/types/data-structures/binary-tree/tree-map.d.ts +1370 -323
  60. package/dist/types/data-structures/binary-tree/tree-multi-map.d.ts +1329 -316
  61. package/dist/types/data-structures/binary-tree/tree-multi-set.d.ts +1116 -295
  62. package/dist/types/data-structures/binary-tree/tree-set.d.ts +1330 -326
  63. package/dist/types/data-structures/graph/directed-graph.d.ts +80 -0
  64. package/dist/types/data-structures/graph/undirected-graph.d.ts +72 -0
  65. package/dist/types/data-structures/hash/hash-map.d.ts +95 -6
  66. package/dist/types/data-structures/heap/heap.d.ts +154 -12
  67. package/dist/types/data-structures/linked-list/doubly-linked-list.d.ts +143 -0
  68. package/dist/types/data-structures/linked-list/singly-linked-list.d.ts +121 -1
  69. package/dist/types/data-structures/linked-list/skip-linked-list.d.ts +144 -0
  70. package/dist/types/data-structures/matrix/matrix.d.ts +64 -0
  71. package/dist/types/data-structures/queue/deque.d.ts +142 -0
  72. package/dist/types/data-structures/queue/queue.d.ts +109 -0
  73. package/dist/types/data-structures/stack/stack.d.ts +82 -2
  74. package/dist/types/data-structures/trie/trie.d.ts +96 -0
  75. package/dist/types/interfaces/binary-tree.d.ts +2 -3
  76. package/dist/types/types/data-structures/binary-tree/bst.d.ts +1 -0
  77. package/dist/types/types/data-structures/binary-tree/tree-map.d.ts +5 -0
  78. package/dist/types/types/data-structures/binary-tree/tree-multi-set.d.ts +4 -0
  79. package/dist/types/types/data-structures/binary-tree/tree-set.d.ts +4 -0
  80. package/dist/umd/data-structure-typed.js +8623 -2564
  81. package/dist/umd/data-structure-typed.min.js +5 -5
  82. package/docs-site-docusaurus/docs/api/classes/AVLTree.md +696 -194
  83. package/docs-site-docusaurus/docs/api/classes/AVLTreeNode.md +11 -11
  84. package/docs-site-docusaurus/docs/api/classes/AbstractGraph.md +71 -71
  85. package/docs-site-docusaurus/docs/api/classes/BST.md +639 -189
  86. package/docs-site-docusaurus/docs/api/classes/BSTNode.md +13 -13
  87. package/docs-site-docusaurus/docs/api/classes/BinaryIndexedTree.md +15 -15
  88. package/docs-site-docusaurus/docs/api/classes/BinaryTree.md +148 -160
  89. package/docs-site-docusaurus/docs/api/classes/BinaryTreeNode.md +13 -13
  90. package/docs-site-docusaurus/docs/api/classes/Deque.md +105 -91
  91. package/docs-site-docusaurus/docs/api/classes/DirectedGraph.md +82 -82
  92. package/docs-site-docusaurus/docs/api/classes/DoublyLinkedList.md +104 -74
  93. package/docs-site-docusaurus/docs/api/classes/DoublyLinkedListNode.md +8 -8
  94. package/docs-site-docusaurus/docs/api/classes/FibonacciHeap.md +12 -12
  95. package/docs-site-docusaurus/docs/api/classes/FibonacciHeapNode.md +1 -1
  96. package/docs-site-docusaurus/docs/api/classes/HashMap.md +51 -51
  97. package/docs-site-docusaurus/docs/api/classes/Heap.md +96 -85
  98. package/docs-site-docusaurus/docs/api/classes/IterableElementBase.md +25 -25
  99. package/docs-site-docusaurus/docs/api/classes/IterableEntryBase.md +33 -33
  100. package/docs-site-docusaurus/docs/api/classes/LinearBase.md +50 -50
  101. package/docs-site-docusaurus/docs/api/classes/LinearLinkedBase.md +55 -55
  102. package/docs-site-docusaurus/docs/api/classes/LinkedHashMap.md +55 -55
  103. package/docs-site-docusaurus/docs/api/classes/LinkedListNode.md +6 -6
  104. package/docs-site-docusaurus/docs/api/classes/LinkedListQueue.md +78 -78
  105. package/docs-site-docusaurus/docs/api/classes/MapGraph.md +82 -82
  106. package/docs-site-docusaurus/docs/api/classes/Matrix.md +31 -31
  107. package/docs-site-docusaurus/docs/api/classes/MaxHeap.md +104 -89
  108. package/docs-site-docusaurus/docs/api/classes/MaxPriorityQueue.md +104 -89
  109. package/docs-site-docusaurus/docs/api/classes/MinHeap.md +104 -89
  110. package/docs-site-docusaurus/docs/api/classes/MinPriorityQueue.md +104 -89
  111. package/docs-site-docusaurus/docs/api/classes/Navigator.md +5 -5
  112. package/docs-site-docusaurus/docs/api/classes/PriorityQueue.md +103 -88
  113. package/docs-site-docusaurus/docs/api/classes/Queue.md +112 -60
  114. package/docs-site-docusaurus/docs/api/classes/RedBlackTree.md +708 -206
  115. package/docs-site-docusaurus/docs/api/classes/SegmentTree.md +10 -10
  116. package/docs-site-docusaurus/docs/api/classes/SinglyLinkedList.md +79 -79
  117. package/docs-site-docusaurus/docs/api/classes/SinglyLinkedListNode.md +6 -6
  118. package/docs-site-docusaurus/docs/api/classes/SkipList.md +44 -44
  119. package/docs-site-docusaurus/docs/api/classes/Stack.md +42 -42
  120. package/docs-site-docusaurus/docs/api/classes/TreeMap.md +236 -33
  121. package/docs-site-docusaurus/docs/api/classes/TreeMultiMap.md +162 -46
  122. package/docs-site-docusaurus/docs/api/classes/TreeSet.md +232 -32
  123. package/docs-site-docusaurus/docs/api/classes/Trie.md +47 -47
  124. package/docs-site-docusaurus/docs/api/classes/TrieNode.md +8 -8
  125. package/docs-site-docusaurus/docs/api/classes/UndirectedGraph.md +81 -81
  126. package/docs-site-docusaurus/docs/guide/architecture.md +75 -5
  127. package/docs-site-docusaurus/docs/guide/concepts.md +53 -3
  128. package/docs-site-docusaurus/docs/guide/faq.md +233 -0
  129. package/docs-site-docusaurus/docs/guide/guides.md +43 -58
  130. package/docs-site-docusaurus/docs/guide/installation.md +2 -0
  131. package/docs-site-docusaurus/docs/guide/integrations.md +75 -176
  132. package/docs-site-docusaurus/docs/guide/overview.md +132 -11
  133. package/docs-site-docusaurus/docs/guide/performance.md +2 -0
  134. package/docs-site-docusaurus/docs/guide/quick-start.md +31 -0
  135. package/docs-site-docusaurus/docs/guide/use-cases/_category_.json +6 -0
  136. package/docs-site-docusaurus/docs/guide/use-cases/array-sort-alternative.md +158 -0
  137. package/docs-site-docusaurus/docs/guide/use-cases/heap-vs-sorting.md +92 -0
  138. package/docs-site-docusaurus/docs/guide/use-cases/map-vs-treemap.md +151 -0
  139. package/docs-site-docusaurus/docs/guide/use-cases/priority-queue-typescript.md +113 -0
  140. package/docs-site-docusaurus/docs/guide/use-cases/treemap-javascript.md +151 -0
  141. package/docs-site-docusaurus/docusaurus.config.ts +1 -1
  142. package/docs-site-docusaurus/src/pages/index.tsx +55 -2
  143. package/docs-site-docusaurus/static/llms.txt +37 -0
  144. package/docs-site-docusaurus/typedoc.json +1 -0
  145. package/llms.txt +37 -0
  146. package/package.json +65 -56
  147. package/src/common/error.ts +19 -1
  148. package/src/common/index.ts +1 -1
  149. package/src/data-structures/base/iterable-element-base.ts +3 -2
  150. package/src/data-structures/binary-tree/avl-tree.ts +99 -5
  151. package/src/data-structures/binary-tree/binary-indexed-tree.ts +102 -4
  152. package/src/data-structures/binary-tree/binary-tree.ts +239 -78
  153. package/src/data-structures/binary-tree/bst.ts +542 -13
  154. package/src/data-structures/binary-tree/red-black-tree.ts +155 -15
  155. package/src/data-structures/binary-tree/segment-tree.ts +42 -0
  156. package/src/data-structures/binary-tree/tree-map.ts +1223 -261
  157. package/src/data-structures/binary-tree/tree-multi-map.ts +939 -30
  158. package/src/data-structures/binary-tree/tree-multi-set.ts +746 -10
  159. package/src/data-structures/binary-tree/tree-set.ts +1018 -99
  160. package/src/data-structures/graph/abstract-graph.ts +2 -2
  161. package/src/data-structures/graph/directed-graph.ts +71 -1
  162. package/src/data-structures/graph/undirected-graph.ts +64 -1
  163. package/src/data-structures/hash/hash-map.ts +102 -16
  164. package/src/data-structures/heap/heap.ts +153 -23
  165. package/src/data-structures/heap/max-heap.ts +2 -2
  166. package/src/data-structures/linked-list/doubly-linked-list.ts +139 -0
  167. package/src/data-structures/linked-list/singly-linked-list.ts +106 -1
  168. package/src/data-structures/linked-list/skip-linked-list.ts +131 -5
  169. package/src/data-structures/matrix/matrix.ts +65 -9
  170. package/src/data-structures/priority-queue/max-priority-queue.ts +2 -2
  171. package/src/data-structures/queue/deque.ts +130 -0
  172. package/src/data-structures/queue/queue.ts +109 -0
  173. package/src/data-structures/stack/stack.ts +75 -5
  174. package/src/data-structures/trie/trie.ts +86 -2
  175. package/src/interfaces/binary-tree.ts +1 -9
  176. package/src/types/data-structures/binary-tree/bst.ts +1 -0
  177. package/src/types/data-structures/binary-tree/tree-map.ts +6 -0
  178. package/src/types/data-structures/binary-tree/tree-multi-set.ts +5 -0
  179. package/src/types/data-structures/binary-tree/tree-set.ts +5 -0
  180. package/.vitepress/cache/deps_temp_51f5f1b0/chunk-7OIKW5WK.js +0 -12984
  181. package/.vitepress/cache/deps_temp_51f5f1b0/package.json +0 -3
  182. package/.vitepress/cache/deps_temp_51f5f1b0/vitepress___@vue_devtools-api.js +0 -4505
  183. package/.vitepress/cache/deps_temp_51f5f1b0/vitepress___@vueuse_core.js +0 -9731
  184. package/.vitepress/cache/deps_temp_51f5f1b0/vue.js +0 -347
@@ -9,7 +9,7 @@ import type { Comparator, DFSOrderPattern, ElementCallback, HeapOptions } from '
9
9
  import { IterableElementBase } from '../base';
10
10
  /**
11
11
  * Binary heap with pluggable comparator; supports fast insertion and removal of the top element.
12
- * @remarks Time O(1), Space O(1)
12
+ * @remarks Typical operations: O(log N) insert/remove, O(1) peek. Space O(N).
13
13
  * @template E
14
14
  * @template R
15
15
  * 1. Complete Binary Tree: Heaps are typically complete binary trees, meaning every level is fully filled except possibly for the last level, which has nodes as far left as possible.
@@ -187,6 +187,14 @@ export declare class Heap<E = any, R = any> extends IterableElementBase<E, R> {
187
187
 
188
188
 
189
189
 
190
+
191
+
192
+
193
+
194
+
195
+
196
+
197
+
190
198
 
191
199
 
192
200
 
@@ -236,7 +244,7 @@ export declare class Heap<E = any, R = any> extends IterableElementBase<E, R> {
236
244
  static heapify<EE = any, RR = any>(elements: Iterable<EE>, options: HeapOptions<EE, RR>): Heap<EE, RR>;
237
245
  /**
238
246
  * Insert an element.
239
- * @remarks Time O(1) amortized, Space O(1)
247
+ * @remarks Time O(log N) amortized, Space O(1)
240
248
  * @param element - Element to insert.
241
249
  * @returns True.
242
250
 
@@ -261,6 +269,14 @@ export declare class Heap<E = any, R = any> extends IterableElementBase<E, R> {
261
269
 
262
270
 
263
271
 
272
+
273
+
274
+
275
+
276
+
277
+
278
+
279
+
264
280
 
265
281
 
266
282
 
@@ -311,6 +327,14 @@ export declare class Heap<E = any, R = any> extends IterableElementBase<E, R> {
311
327
 
312
328
 
313
329
 
330
+
331
+
332
+
333
+
334
+
335
+
336
+
337
+
314
338
 
315
339
 
316
340
 
@@ -355,6 +379,13 @@ export declare class Heap<E = any, R = any> extends IterableElementBase<E, R> {
355
379
 
356
380
 
357
381
 
382
+
383
+
384
+
385
+
386
+
387
+
388
+
358
389
 
359
390
 
360
391
 
@@ -363,6 +394,34 @@ export declare class Heap<E = any, R = any> extends IterableElementBase<E, R> {
363
394
 
364
395
 
365
396
 
397
+ * @example
398
+ * // Heap with custom comparator (MaxHeap behavior)
399
+ * interface Task {
400
+ * id: number;
401
+ * priority: number;
402
+ * name: string;
403
+ * }
404
+ *
405
+ * // Custom comparator for max heap behavior (higher priority first)
406
+ * const tasks: Task[] = [
407
+ * { id: 1, priority: 5, name: 'Email' },
408
+ * { id: 2, priority: 3, name: 'Chat' },
409
+ * { id: 3, priority: 8, name: 'Alert' }
410
+ * ];
411
+ *
412
+ * const maxHeap = new Heap(tasks, {
413
+ * comparator: (a: Task, b: Task) => b.priority - a.priority
414
+ * });
415
+ *
416
+ * console.log(maxHeap.size); // 3;
417
+ *
418
+ * // Peek returns highest priority task
419
+ * const topTask = maxHeap.peek();
420
+ * console.log(topTask?.priority); // 8;
421
+ * console.log(topTask?.name); // 'Alert';
422
+ */
423
+ /**
424
+ * @deprecated Use `pop` instead. Will be removed in a future major version.
366
425
  * @example
367
426
  * // Heap with custom comparator (MaxHeap behavior)
368
427
  * interface Task {
@@ -390,6 +449,12 @@ export declare class Heap<E = any, R = any> extends IterableElementBase<E, R> {
390
449
  * console.log(topTask?.name); // 'Alert';
391
450
  */
392
451
  poll(): E | undefined;
452
+ /**
453
+ * Remove and return the top element (min or max depending on comparator).
454
+ * @remarks Time O(log N) amortized, Space O(1)
455
+ * @returns The removed top element, or undefined if empty.
456
+ */
457
+ pop(): E | undefined;
393
458
  /**
394
459
  * Get the current top element without removing it.
395
460
  * @remarks Time O(1), Space O(1)
@@ -416,6 +481,14 @@ export declare class Heap<E = any, R = any> extends IterableElementBase<E, R> {
416
481
 
417
482
 
418
483
 
484
+
485
+
486
+
487
+
488
+
489
+
490
+
491
+
419
492
 
420
493
 
421
494
 
@@ -510,6 +583,14 @@ export declare class Heap<E = any, R = any> extends IterableElementBase<E, R> {
510
583
 
511
584
 
512
585
 
586
+
587
+
588
+
589
+
590
+
591
+
592
+
593
+
513
594
 
514
595
 
515
596
 
@@ -551,6 +632,14 @@ export declare class Heap<E = any, R = any> extends IterableElementBase<E, R> {
551
632
 
552
633
 
553
634
 
635
+
636
+
637
+
638
+
639
+
640
+
641
+
642
+
554
643
 
555
644
 
556
645
 
@@ -567,13 +656,6 @@ export declare class Heap<E = any, R = any> extends IterableElementBase<E, R> {
567
656
  * console.log(heap.isEmpty()); // true;
568
657
  */
569
658
  clear(): void;
570
- /**
571
- * Replace the backing array and rebuild the heap.
572
- * @remarks Time O(N), Space O(N)
573
- * @param elements - Iterable used to refill the heap.
574
- * @returns Array of per-node results from fixing steps.
575
- */
576
- refill(elements: Iterable<E>): boolean[];
577
659
  /**
578
660
  * Check if an equal element exists in the heap.
579
661
  * @remarks Time O(N), Space O(1)
@@ -592,6 +674,14 @@ export declare class Heap<E = any, R = any> extends IterableElementBase<E, R> {
592
674
 
593
675
 
594
676
 
677
+
678
+
679
+
680
+
681
+
682
+
683
+
684
+
595
685
 
596
686
 
597
687
 
@@ -632,6 +722,14 @@ export declare class Heap<E = any, R = any> extends IterableElementBase<E, R> {
632
722
 
633
723
 
634
724
 
725
+
726
+
727
+
728
+
729
+
730
+
731
+
732
+
635
733
 
636
734
 
637
735
 
@@ -648,13 +746,17 @@ export declare class Heap<E = any, R = any> extends IterableElementBase<E, R> {
648
746
  * console.log(heap.toArray().includes(4)); // false;
649
747
  */
650
748
  delete(element: E): boolean;
749
+ /**
750
+ * @deprecated Use `deleteWhere` instead. Will be removed in a future major version.
751
+ */
752
+ deleteBy(predicate: (element: E, index: number, heap: this) => boolean): boolean;
651
753
  /**
652
754
  * Delete the first element that matches a predicate.
653
755
  * @remarks Time O(N), Space O(1)
654
756
  * @param predicate - Function (element, index, heap) → boolean.
655
757
  * @returns True if an element was removed.
656
758
  */
657
- deleteBy(predicate: (element: E, index: number, heap: this) => boolean): boolean;
759
+ deleteWhere(predicate: (element: E, index: number, heap: this) => boolean): boolean;
658
760
  /**
659
761
  * Set the equality comparator used by has/delete operations.
660
762
  * @remarks Time O(1), Space O(1)
@@ -680,6 +782,14 @@ export declare class Heap<E = any, R = any> extends IterableElementBase<E, R> {
680
782
 
681
783
 
682
784
 
785
+
786
+
787
+
788
+
789
+
790
+
791
+
792
+
683
793
 
684
794
 
685
795
 
@@ -728,6 +838,14 @@ export declare class Heap<E = any, R = any> extends IterableElementBase<E, R> {
728
838
 
729
839
 
730
840
 
841
+
842
+
843
+
844
+
845
+
846
+
847
+
848
+
731
849
 
732
850
 
733
851
 
@@ -768,6 +886,14 @@ export declare class Heap<E = any, R = any> extends IterableElementBase<E, R> {
768
886
 
769
887
 
770
888
 
889
+
890
+
891
+
892
+
893
+
894
+
895
+
896
+
771
897
 
772
898
 
773
899
 
@@ -812,6 +938,14 @@ export declare class Heap<E = any, R = any> extends IterableElementBase<E, R> {
812
938
 
813
939
 
814
940
 
941
+
942
+
943
+
944
+
945
+
946
+
947
+
948
+
815
949
 
816
950
 
817
951
 
@@ -856,6 +990,14 @@ export declare class Heap<E = any, R = any> extends IterableElementBase<E, R> {
856
990
 
857
991
 
858
992
 
993
+
994
+
995
+
996
+
997
+
998
+
999
+
1000
+
859
1001
 
860
1002
 
861
1003
 
@@ -973,9 +1115,9 @@ export declare class FibonacciHeap<E> {
973
1115
  * Push an element into the root list.
974
1116
  * @remarks Time O(1) amortized, Space O(1)
975
1117
  * @param element - Element to insert.
976
- * @returns This heap.
1118
+ * @returns True when the element is added.
977
1119
  */
978
- push(element: E): this;
1120
+ push(element: E): boolean;
979
1121
  peek(): E | undefined;
980
1122
  /**
981
1123
  * Collect nodes from a circular doubly linked list starting at head.
@@ -207,6 +207,14 @@ export declare class DoublyLinkedList<E = any, R = any> extends LinearLinkedBase
207
207
 
208
208
 
209
209
 
210
+
211
+
212
+
213
+
214
+
215
+
216
+
217
+
210
218
 
211
219
 
212
220
 
@@ -259,6 +267,14 @@ export declare class DoublyLinkedList<E = any, R = any> extends LinearLinkedBase
259
267
 
260
268
 
261
269
 
270
+
271
+
272
+
273
+
274
+
275
+
276
+
277
+
262
278
 
263
279
 
264
280
 
@@ -311,6 +327,14 @@ export declare class DoublyLinkedList<E = any, R = any> extends LinearLinkedBase
311
327
 
312
328
 
313
329
 
330
+
331
+
332
+
333
+
334
+
335
+
336
+
337
+
314
338
 
315
339
 
316
340
 
@@ -354,6 +378,14 @@ export declare class DoublyLinkedList<E = any, R = any> extends LinearLinkedBase
354
378
 
355
379
 
356
380
 
381
+
382
+
383
+
384
+
385
+
386
+
387
+
388
+
357
389
 
358
390
 
359
391
 
@@ -411,6 +443,14 @@ export declare class DoublyLinkedList<E = any, R = any> extends LinearLinkedBase
411
443
 
412
444
 
413
445
 
446
+
447
+
448
+
449
+
450
+
451
+
452
+
453
+
414
454
 
415
455
 
416
456
 
@@ -451,6 +491,14 @@ export declare class DoublyLinkedList<E = any, R = any> extends LinearLinkedBase
451
491
 
452
492
 
453
493
 
494
+
495
+
496
+
497
+
498
+
499
+
500
+
501
+
454
502
 
455
503
 
456
504
 
@@ -498,6 +546,14 @@ export declare class DoublyLinkedList<E = any, R = any> extends LinearLinkedBase
498
546
 
499
547
 
500
548
 
549
+
550
+
551
+
552
+
553
+
554
+
555
+
556
+
501
557
 
502
558
 
503
559
 
@@ -562,6 +618,14 @@ export declare class DoublyLinkedList<E = any, R = any> extends LinearLinkedBase
562
618
 
563
619
 
564
620
 
621
+
622
+
623
+
624
+
625
+
626
+
627
+
628
+
565
629
 
566
630
 
567
631
 
@@ -602,6 +666,14 @@ export declare class DoublyLinkedList<E = any, R = any> extends LinearLinkedBase
602
666
 
603
667
 
604
668
 
669
+
670
+
671
+
672
+
673
+
674
+
675
+
676
+
605
677
 
606
678
 
607
679
 
@@ -642,6 +714,14 @@ export declare class DoublyLinkedList<E = any, R = any> extends LinearLinkedBase
642
714
 
643
715
 
644
716
 
717
+
718
+
719
+
720
+
721
+
722
+
723
+
724
+
645
725
 
646
726
 
647
727
 
@@ -680,6 +760,14 @@ export declare class DoublyLinkedList<E = any, R = any> extends LinearLinkedBase
680
760
 
681
761
 
682
762
 
763
+
764
+
765
+
766
+
767
+
768
+
769
+
770
+
683
771
 
684
772
 
685
773
 
@@ -720,6 +808,14 @@ export declare class DoublyLinkedList<E = any, R = any> extends LinearLinkedBase
720
808
 
721
809
 
722
810
 
811
+
812
+
813
+
814
+
815
+
816
+
817
+
818
+
723
819
 
724
820
 
725
821
 
@@ -760,6 +856,14 @@ export declare class DoublyLinkedList<E = any, R = any> extends LinearLinkedBase
760
856
 
761
857
 
762
858
 
859
+
860
+
861
+
862
+
863
+
864
+
865
+
866
+
763
867
 
764
868
 
765
869
 
@@ -803,6 +907,14 @@ export declare class DoublyLinkedList<E = any, R = any> extends LinearLinkedBase
803
907
 
804
908
 
805
909
 
910
+
911
+
912
+
913
+
914
+
915
+
916
+
917
+
806
918
 
807
919
 
808
920
 
@@ -819,6 +931,13 @@ export declare class DoublyLinkedList<E = any, R = any> extends LinearLinkedBase
819
931
  * console.log([...list]); // [3, 2, 1];
820
932
  */
821
933
  reverse(): this;
934
+ /**
935
+ * Delete the first element that satisfies a predicate.
936
+ * @remarks Time O(N), Space O(1)
937
+ * @param predicate - Function (value, index, list) → boolean to decide deletion.
938
+ * @returns True if a match was removed.
939
+ */
940
+ deleteWhere(predicate: (value: E, index: number, list: this) => boolean): boolean;
822
941
  /**
823
942
  * Set the equality comparator used to compare values.
824
943
  * @remarks Time O(1), Space O(1)
@@ -850,6 +969,14 @@ export declare class DoublyLinkedList<E = any, R = any> extends LinearLinkedBase
850
969
 
851
970
 
852
971
 
972
+
973
+
974
+
975
+
976
+
977
+
978
+
979
+
853
980
 
854
981
 
855
982
 
@@ -895,6 +1022,14 @@ export declare class DoublyLinkedList<E = any, R = any> extends LinearLinkedBase
895
1022
 
896
1023
 
897
1024
 
1025
+
1026
+
1027
+
1028
+
1029
+
1030
+
1031
+
1032
+
898
1033
 
899
1034
 
900
1035
 
@@ -950,6 +1085,14 @@ export declare class DoublyLinkedList<E = any, R = any> extends LinearLinkedBase
950
1085
 
951
1086
 
952
1087
 
1088
+
1089
+
1090
+
1091
+
1092
+
1093
+
1094
+
1095
+
953
1096
 
954
1097
 
955
1098