data-structure-typed 2.6.1 → 2.6.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 (116) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/dist/cjs/binary-tree.cjs +2927 -23688
  3. package/dist/cjs/graph.cjs +845 -2634
  4. package/dist/cjs/hash.cjs +185 -616
  5. package/dist/cjs/heap.cjs +266 -818
  6. package/dist/cjs/index.cjs +5116 -31358
  7. package/dist/cjs/linked-list.cjs +644 -2615
  8. package/dist/cjs/matrix.cjs +220 -535
  9. package/dist/cjs/priority-queue.cjs +266 -818
  10. package/dist/cjs/queue.cjs +637 -2343
  11. package/dist/cjs/stack.cjs +124 -530
  12. package/dist/cjs/trie.cjs +145 -592
  13. package/dist/cjs-legacy/binary-tree.cjs +4352 -25113
  14. package/dist/cjs-legacy/graph.cjs +847 -2636
  15. package/dist/cjs-legacy/hash.cjs +181 -612
  16. package/dist/cjs-legacy/heap.cjs +266 -818
  17. package/dist/cjs-legacy/index.cjs +6657 -32899
  18. package/dist/cjs-legacy/linked-list.cjs +640 -2611
  19. package/dist/cjs-legacy/matrix.cjs +220 -535
  20. package/dist/cjs-legacy/priority-queue.cjs +266 -818
  21. package/dist/cjs-legacy/queue.cjs +634 -2340
  22. package/dist/cjs-legacy/stack.cjs +124 -530
  23. package/dist/cjs-legacy/trie.cjs +145 -592
  24. package/dist/esm/binary-tree.mjs +2927 -23688
  25. package/dist/esm/graph.mjs +845 -2634
  26. package/dist/esm/hash.mjs +185 -616
  27. package/dist/esm/heap.mjs +266 -818
  28. package/dist/esm/index.mjs +5116 -31358
  29. package/dist/esm/linked-list.mjs +644 -2615
  30. package/dist/esm/matrix.mjs +220 -535
  31. package/dist/esm/priority-queue.mjs +266 -818
  32. package/dist/esm/queue.mjs +637 -2343
  33. package/dist/esm/stack.mjs +124 -530
  34. package/dist/esm/trie.mjs +145 -592
  35. package/dist/esm-legacy/binary-tree.mjs +4352 -25113
  36. package/dist/esm-legacy/graph.mjs +847 -2636
  37. package/dist/esm-legacy/hash.mjs +181 -612
  38. package/dist/esm-legacy/heap.mjs +266 -818
  39. package/dist/esm-legacy/index.mjs +6657 -32899
  40. package/dist/esm-legacy/linked-list.mjs +640 -2611
  41. package/dist/esm-legacy/matrix.mjs +220 -535
  42. package/dist/esm-legacy/priority-queue.mjs +266 -818
  43. package/dist/esm-legacy/queue.mjs +634 -2340
  44. package/dist/esm-legacy/stack.mjs +124 -530
  45. package/dist/esm-legacy/trie.mjs +145 -592
  46. package/dist/types/data-structures/binary-tree/avl-tree.d.ts +29 -500
  47. package/dist/types/data-structures/binary-tree/binary-indexed-tree.d.ts +38 -563
  48. package/dist/types/data-structures/binary-tree/binary-tree.d.ts +230 -1212
  49. package/dist/types/data-structures/binary-tree/bst.d.ts +124 -1063
  50. package/dist/types/data-structures/binary-tree/red-black-tree.d.ts +99 -854
  51. package/dist/types/data-structures/binary-tree/segment-tree.d.ts +62 -314
  52. package/dist/types/data-structures/binary-tree/tree-map.d.ts +366 -5057
  53. package/dist/types/data-structures/binary-tree/tree-multi-map.d.ts +277 -4885
  54. package/dist/types/data-structures/binary-tree/tree-multi-set.d.ts +253 -3929
  55. package/dist/types/data-structures/binary-tree/tree-set.d.ts +261 -4782
  56. package/dist/types/data-structures/graph/abstract-graph.d.ts +44 -44
  57. package/dist/types/data-structures/graph/directed-graph.d.ts +130 -527
  58. package/dist/types/data-structures/graph/undirected-graph.d.ts +125 -482
  59. package/dist/types/data-structures/hash/hash-map.d.ts +132 -562
  60. package/dist/types/data-structures/heap/heap.d.ts +194 -746
  61. package/dist/types/data-structures/linked-list/doubly-linked-list.d.ts +120 -809
  62. package/dist/types/data-structures/linked-list/singly-linked-list.d.ts +121 -733
  63. package/dist/types/data-structures/linked-list/skip-linked-list.d.ts +193 -863
  64. package/dist/types/data-structures/matrix/matrix.d.ts +159 -474
  65. package/dist/types/data-structures/priority-queue/max-priority-queue.d.ts +1 -6
  66. package/dist/types/data-structures/priority-queue/min-priority-queue.d.ts +6 -11
  67. package/dist/types/data-structures/priority-queue/priority-queue.d.ts +1 -1
  68. package/dist/types/data-structures/queue/deque.d.ts +196 -804
  69. package/dist/types/data-structures/queue/queue.d.ts +99 -585
  70. package/dist/types/data-structures/stack/stack.d.ts +75 -481
  71. package/dist/types/data-structures/trie/trie.d.ts +98 -584
  72. package/dist/umd/data-structure-typed.js +6580 -32822
  73. package/dist/umd/data-structure-typed.min.js +3 -3
  74. package/docs-site-docusaurus/docs/api/classes/AVLTree.md +162 -215
  75. package/docs-site-docusaurus/docs/api/classes/AVLTreeNode.md +9 -9
  76. package/docs-site-docusaurus/docs/api/classes/AbstractGraph.md +47 -47
  77. package/docs-site-docusaurus/docs/api/classes/BST.md +155 -208
  78. package/docs-site-docusaurus/docs/api/classes/BSTNode.md +7 -7
  79. package/docs-site-docusaurus/docs/api/classes/BinaryIndexedTree.md +13 -29
  80. package/docs-site-docusaurus/docs/api/classes/BinaryTree.md +104 -158
  81. package/docs-site-docusaurus/docs/api/classes/BinaryTreeNode.md +13 -13
  82. package/docs-site-docusaurus/docs/api/classes/Deque.md +72 -104
  83. package/docs-site-docusaurus/docs/api/classes/DirectedGraph.md +60 -80
  84. package/docs-site-docusaurus/docs/api/classes/DoublyLinkedList.md +67 -101
  85. package/docs-site-docusaurus/docs/api/classes/DoublyLinkedListNode.md +6 -6
  86. package/docs-site-docusaurus/docs/api/classes/FibonacciHeap.md +9 -9
  87. package/docs-site-docusaurus/docs/api/classes/FibonacciHeapNode.md +1 -1
  88. package/docs-site-docusaurus/docs/api/classes/HashMap.md +52 -48
  89. package/docs-site-docusaurus/docs/api/classes/Heap.md +40 -68
  90. package/docs-site-docusaurus/docs/api/classes/IterableElementBase.md +17 -17
  91. package/docs-site-docusaurus/docs/api/classes/LinearBase.md +38 -38
  92. package/docs-site-docusaurus/docs/api/classes/LinearLinkedBase.md +45 -45
  93. package/docs-site-docusaurus/docs/api/classes/LinkedHashMap.md +23 -23
  94. package/docs-site-docusaurus/docs/api/classes/LinkedListQueue.md +68 -96
  95. package/docs-site-docusaurus/docs/api/classes/MapGraph.md +60 -80
  96. package/docs-site-docusaurus/docs/api/classes/Matrix.md +57 -52
  97. package/docs-site-docusaurus/docs/api/classes/MaxHeap.md +38 -66
  98. package/docs-site-docusaurus/docs/api/classes/MaxPriorityQueue.md +41 -74
  99. package/docs-site-docusaurus/docs/api/classes/MinHeap.md +38 -66
  100. package/docs-site-docusaurus/docs/api/classes/MinPriorityQueue.md +46 -79
  101. package/docs-site-docusaurus/docs/api/classes/PriorityQueue.md +40 -68
  102. package/docs-site-docusaurus/docs/api/classes/Queue.md +54 -78
  103. package/docs-site-docusaurus/docs/api/classes/RedBlackTree.md +171 -225
  104. package/docs-site-docusaurus/docs/api/classes/SegmentTree.md +10 -22
  105. package/docs-site-docusaurus/docs/api/classes/SinglyLinkedList.md +68 -98
  106. package/docs-site-docusaurus/docs/api/classes/SinglyLinkedListNode.md +4 -4
  107. package/docs-site-docusaurus/docs/api/classes/SkipList.md +98 -75
  108. package/docs-site-docusaurus/docs/api/classes/Stack.md +33 -53
  109. package/docs-site-docusaurus/docs/api/classes/TreeMap.md +104 -129
  110. package/docs-site-docusaurus/docs/api/classes/TreeMultiMap.md +57 -124
  111. package/docs-site-docusaurus/docs/api/classes/TreeSet.md +45 -116
  112. package/docs-site-docusaurus/docs/api/classes/Trie.md +37 -61
  113. package/docs-site-docusaurus/docs/api/classes/TrieNode.md +8 -8
  114. package/docs-site-docusaurus/docs/api/classes/UndirectedGraph.md +59 -77
  115. package/package.json +1 -1
  116. package/src/data-structures/binary-tree/tree-multi-set.ts +15 -11
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Class: Trie\<R\>
8
8
 
9
- Defined in: [data-structures/trie/trie.ts:216](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L216)
9
+ Defined in: [data-structures/trie/trie.ts:208](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L208)
10
10
 
11
11
  Prefix tree (Trie) for fast prefix queries and word storage.
12
12
 
@@ -156,7 +156,7 @@ Time O(1), Space O(1)
156
156
  new Trie<R>(words?, options?): Trie<R>;
157
157
  ```
158
158
 
159
- Defined in: [data-structures/trie/trie.ts:225](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L225)
159
+ Defined in: [data-structures/trie/trie.ts:216](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L216)
160
160
 
161
161
  Create a Trie and optionally bulk-insert words.
162
162
 
@@ -198,7 +198,7 @@ Time O(totalChars), Space O(totalChars)
198
198
  get caseSensitive(): boolean;
199
199
  ```
200
200
 
201
- Defined in: [data-structures/trie/trie.ts:256](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L256)
201
+ Defined in: [data-structures/trie/trie.ts:245](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L245)
202
202
 
203
203
  Get whether comparisons are case-sensitive.
204
204
 
@@ -222,7 +222,7 @@ True if case-sensitive.
222
222
  get root(): TrieNode;
223
223
  ```
224
224
 
225
- Defined in: [data-structures/trie/trie.ts:268](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L268)
225
+ Defined in: [data-structures/trie/trie.ts:256](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L256)
226
226
 
227
227
  Get the root node.
228
228
 
@@ -246,7 +246,7 @@ Root TrieNode.
246
246
  get size(): number;
247
247
  ```
248
248
 
249
- Defined in: [data-structures/trie/trie.ts:244](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L244)
249
+ Defined in: [data-structures/trie/trie.ts:234](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L234)
250
250
 
251
251
  Get the number of stored words.
252
252
 
@@ -330,7 +330,7 @@ Producing the iterator is O(1); consuming the entire iterator is Time O(n) with
330
330
  add(word): boolean;
331
331
  ```
332
332
 
333
- Defined in: [data-structures/trie/trie.ts:346](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L346)
333
+ Defined in: [data-structures/trie/trie.ts:290](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L290)
334
334
 
335
335
  Insert one word into the trie.
336
336
 
@@ -348,8 +348,6 @@ Word to insert.
348
348
 
349
349
  True if the word was newly added.
350
350
 
351
- *
352
-
353
351
  #### Remarks
354
352
 
355
353
  Time O(L), Space O(L)
@@ -381,7 +379,7 @@ Time O(L), Space O(L)
381
379
  addMany(words): boolean[];
382
380
  ```
383
381
 
384
- Defined in: [data-structures/trie/trie.ts:419](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L419)
382
+ Defined in: [data-structures/trie/trie.ts:323](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L323)
385
383
 
386
384
  Insert many words from an iterable.
387
385
 
@@ -399,8 +397,6 @@ Iterable of strings (or raw records if toElementFn is provided).
399
397
 
400
398
  Array of per-word 'added' flags.
401
399
 
402
- *
403
-
404
400
  #### Remarks
405
401
 
406
402
  Time O(ΣL), Space O(ΣL)
@@ -424,7 +420,7 @@ Time O(ΣL), Space O(ΣL)
424
420
  clear(): void;
425
421
  ```
426
422
 
427
- Defined in: [data-structures/trie/trie.ts:603](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L603)
423
+ Defined in: [data-structures/trie/trie.ts:384](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L384)
428
424
 
429
425
  Remove all words and reset to a fresh root.
430
426
 
@@ -434,8 +430,6 @@ Remove all words and reset to a fresh root.
434
430
 
435
431
  void
436
432
 
437
- *
438
-
439
433
  #### Remarks
440
434
 
441
435
  Time O(1), Space O(1)
@@ -461,7 +455,7 @@ Time O(1), Space O(1)
461
455
  clone(): this;
462
456
  ```
463
457
 
464
- Defined in: [data-structures/trie/trie.ts:1055](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L1055)
458
+ Defined in: [data-structures/trie/trie.ts:615](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L615)
465
459
 
466
460
  Deep clone this trie by iterating and inserting all words.
467
461
 
@@ -471,8 +465,6 @@ Deep clone this trie by iterating and inserting all words.
471
465
 
472
466
  A new trie with the same words and options.
473
467
 
474
- *
475
-
476
468
  #### Remarks
477
469
 
478
470
  Time O(ΣL), Space O(ΣL)
@@ -499,7 +491,7 @@ Time O(ΣL), Space O(ΣL)
499
491
  delete(word): boolean;
500
492
  ```
501
493
 
502
- Defined in: [data-structures/trie/trie.ts:674](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L674)
494
+ Defined in: [data-structures/trie/trie.ts:412](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L412)
503
495
 
504
496
  Delete one word if present.
505
497
 
@@ -517,8 +509,6 @@ Word to delete.
517
509
 
518
510
  True if a word was removed.
519
511
 
520
- *
521
-
522
512
  #### Remarks
523
513
 
524
514
  Time O(L), Space O(1)
@@ -552,7 +542,7 @@ Time O(L), Space O(1)
552
542
  entries(): IterableIterator<[number, string]>;
553
543
  ```
554
544
 
555
- Defined in: [data-structures/base/iterable-element-base.ts:208](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-element-base.ts#L208)
545
+ Defined in: [data-structures/base/iterable-element-base.ts:207](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-element-base.ts#L207)
556
546
 
557
547
  Return an iterator of `[index, value]` pairs (Array-compatible).
558
548
 
@@ -616,7 +606,7 @@ Time O(n) in the worst case; may exit early when the first failure is found. Spa
616
606
  filter(predicate, thisArg?): this;
617
607
  ```
618
608
 
619
- Defined in: [data-structures/trie/trie.ts:1113](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L1113)
609
+ Defined in: [data-structures/trie/trie.ts:633](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L633)
620
610
 
621
611
  Filter words into a new trie of the same class.
622
612
 
@@ -640,8 +630,6 @@ Value for `this` inside the predicate.
640
630
 
641
631
  A new trie containing words that satisfy the predicate.
642
632
 
643
- *
644
-
645
633
  #### Remarks
646
634
 
647
635
  Time O(ΣL), Space O(ΣL)
@@ -797,7 +785,7 @@ Time O(n), Space O(1).
797
785
  getHeight(): number;
798
786
  ```
799
787
 
800
- Defined in: [data-structures/trie/trie.ts:716](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L716)
788
+ Defined in: [data-structures/trie/trie.ts:452](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L452)
801
789
 
802
790
  Compute the height (max depth) of the trie.
803
791
 
@@ -819,7 +807,7 @@ Time O(N), Space O(H)
819
807
  getLongestCommonPrefix(): string;
820
808
  ```
821
809
 
822
- Defined in: [data-structures/trie/trie.ts:895](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L895)
810
+ Defined in: [data-structures/trie/trie.ts:543](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L543)
823
811
 
824
812
  Return the longest common prefix among all words.
825
813
 
@@ -829,8 +817,6 @@ Return the longest common prefix among all words.
829
817
 
830
818
  The longest common prefix string.
831
819
 
832
- *
833
-
834
820
  #### Remarks
835
821
 
836
822
  Time O(H), Space O(1)
@@ -855,7 +841,7 @@ getWords(
855
841
  isAllWhenEmptyPrefix?): string[];
856
842
  ```
857
843
 
858
- Defined in: [data-structures/trie/trie.ts:969](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L969)
844
+ Defined in: [data-structures/trie/trie.ts:574](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L574)
859
845
 
860
846
  Collect words under a prefix up to a maximum count.
861
847
 
@@ -885,8 +871,6 @@ When true, collect from root even if prefix is empty.
885
871
 
886
872
  Array of collected words (at most max).
887
873
 
888
- *
889
-
890
874
  #### Remarks
891
875
 
892
876
  Time O(K·L), Space O(K·L)
@@ -914,7 +898,7 @@ Time O(K·L), Space O(K·L)
914
898
  has(word): boolean;
915
899
  ```
916
900
 
917
- Defined in: [data-structures/trie/trie.ts:487](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L487)
901
+ Defined in: [data-structures/trie/trie.ts:348](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L348)
918
902
 
919
903
  Check whether a word exists.
920
904
 
@@ -932,8 +916,6 @@ Word to search for.
932
916
 
933
917
  True if present.
934
918
 
935
- *
936
-
937
919
  #### Remarks
938
920
 
939
921
  Time O(L), Space O(1)
@@ -961,7 +943,7 @@ Time O(L), Space O(1)
961
943
  hasCommonPrefix(input): boolean;
962
944
  ```
963
945
 
964
- Defined in: [data-structures/trie/trie.ts:828](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L828)
946
+ Defined in: [data-structures/trie/trie.ts:519](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L519)
965
947
 
966
948
  Check whether the trie’s longest common prefix equals input.
967
949
 
@@ -991,7 +973,7 @@ Time O(min(H,L)), Space O(1)
991
973
  hasPrefix(input): boolean;
992
974
  ```
993
975
 
994
- Defined in: [data-structures/trie/trie.ts:810](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L810)
976
+ Defined in: [data-structures/trie/trie.ts:502](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L502)
995
977
 
996
978
  Check whether any word starts with input.
997
979
 
@@ -1009,8 +991,6 @@ String to test as prefix.
1009
991
 
1010
992
  True if input matches a path from root.
1011
993
 
1012
- *
1013
-
1014
994
  #### Remarks
1015
995
 
1016
996
  Time O(L), Space O(1)
@@ -1034,7 +1014,7 @@ Time O(L), Space O(1)
1034
1014
  hasPurePrefix(input): boolean;
1035
1015
  ```
1036
1016
 
1037
- Defined in: [data-structures/trie/trie.ts:743](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L743)
1017
+ Defined in: [data-structures/trie/trie.ts:478](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L478)
1038
1018
 
1039
1019
  Check whether input is a proper prefix of at least one word.
1040
1020
 
@@ -1064,7 +1044,7 @@ Time O(L), Space O(1)
1064
1044
  includes(element): boolean;
1065
1045
  ```
1066
1046
 
1067
- Defined in: [data-structures/base/iterable-element-base.ts:200](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-element-base.ts#L200)
1047
+ Defined in: [data-structures/base/iterable-element-base.ts:199](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-element-base.ts#L199)
1068
1048
 
1069
1049
  Check whether a value exists (Array-compatible alias for `has`).
1070
1050
 
@@ -1098,7 +1078,7 @@ Provided for familiarity when migrating from Array. Time O(n), Space O(1).
1098
1078
  isEmpty(): boolean;
1099
1079
  ```
1100
1080
 
1101
- Defined in: [data-structures/trie/trie.ts:549](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L549)
1081
+ Defined in: [data-structures/trie/trie.ts:370](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L370)
1102
1082
 
1103
1083
  Check whether the trie is empty.
1104
1084
 
@@ -1108,8 +1088,6 @@ Check whether the trie is empty.
1108
1088
 
1109
1089
  True if size is 0.
1110
1090
 
1111
- *
1112
-
1113
1091
  #### Remarks
1114
1092
 
1115
1093
  Time O(1), Space O(1)
@@ -1136,7 +1114,7 @@ Time O(1), Space O(1)
1136
1114
  keys(): IterableIterator<number>;
1137
1115
  ```
1138
1116
 
1139
- Defined in: [data-structures/base/iterable-element-base.ts:219](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-element-base.ts#L219)
1117
+ Defined in: [data-structures/base/iterable-element-base.ts:218](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-element-base.ts#L218)
1140
1118
 
1141
1119
  Return an iterator of numeric indices (Array-compatible).
1142
1120
 
@@ -1165,12 +1143,10 @@ map<RM>(
1165
1143
  thisArg?): Trie<RM>;
1166
1144
  ```
1167
1145
 
1168
- Defined in: [data-structures/trie/trie.ts:1172](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L1172)
1146
+ Defined in: [data-structures/trie/trie.ts:653](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L653)
1169
1147
 
1170
1148
  Transform words
1171
1149
 
1172
- *
1173
-
1174
1150
  ##### Type Parameters
1175
1151
 
1176
1152
  ###### RM
@@ -1217,7 +1193,7 @@ map<EM, RM>(
1217
1193
  thisArg?): IterableElementBase<EM, RM>;
1218
1194
  ```
1219
1195
 
1220
- Defined in: [data-structures/trie/trie.ts:1185](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L1185)
1196
+ Defined in: [data-structures/trie/trie.ts:665](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L665)
1221
1197
 
1222
1198
  Map words into a new trie (possibly different record type).
1223
1199
 
@@ -1275,7 +1251,7 @@ IterableElementBase.map
1275
1251
  mapSame(callback, thisArg?): this;
1276
1252
  ```
1277
1253
 
1278
- Defined in: [data-structures/trie/trie.ts:1212](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L1212)
1254
+ Defined in: [data-structures/trie/trie.ts:690](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L690)
1279
1255
 
1280
1256
  Map words into a new trie of the same element type.
1281
1257
 
@@ -1315,7 +1291,7 @@ Time O(ΣL), Space O(ΣL)
1315
1291
  print(): void;
1316
1292
  ```
1317
1293
 
1318
- Defined in: [data-structures/base/iterable-element-base.ts:301](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-element-base.ts#L301)
1294
+ Defined in: [data-structures/base/iterable-element-base.ts:298](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-element-base.ts#L298)
1319
1295
 
1320
1296
  Prints `toVisual()` to the console. Intended for quick debugging.
1321
1297
 
@@ -1373,7 +1349,7 @@ Time O(n), Space O(1). Throws if called on an empty structure without `initialVa
1373
1349
  reduce(callbackfn): string;
1374
1350
  ```
1375
1351
 
1376
- Defined in: [data-structures/base/iterable-element-base.ts:226](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-element-base.ts#L226)
1352
+ Defined in: [data-structures/base/iterable-element-base.ts:225](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-element-base.ts#L225)
1377
1353
 
1378
1354
  ##### Parameters
1379
1355
 
@@ -1395,7 +1371,7 @@ Defined in: [data-structures/base/iterable-element-base.ts:226](https://github.c
1395
1371
  reduce(callbackfn, initialValue): string;
1396
1372
  ```
1397
1373
 
1398
- Defined in: [data-structures/base/iterable-element-base.ts:227](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-element-base.ts#L227)
1374
+ Defined in: [data-structures/base/iterable-element-base.ts:226](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-element-base.ts#L226)
1399
1375
 
1400
1376
  ##### Parameters
1401
1377
 
@@ -1421,7 +1397,7 @@ Defined in: [data-structures/base/iterable-element-base.ts:227](https://github.c
1421
1397
  reduce<U>(callbackfn, initialValue): U;
1422
1398
  ```
1423
1399
 
1424
- Defined in: [data-structures/base/iterable-element-base.ts:228](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-element-base.ts#L228)
1400
+ Defined in: [data-structures/base/iterable-element-base.ts:227](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-element-base.ts#L227)
1425
1401
 
1426
1402
  ##### Type Parameters
1427
1403
 
@@ -1495,7 +1471,7 @@ Time O(n) in the worst case; may exit early on first success. Space O(1).
1495
1471
  toArray(): string[];
1496
1472
  ```
1497
1473
 
1498
- Defined in: [data-structures/base/iterable-element-base.ts:278](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-element-base.ts#L278)
1474
+ Defined in: [data-structures/base/iterable-element-base.ts:275](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-element-base.ts#L275)
1499
1475
 
1500
1476
  Materializes the elements into a new array.
1501
1477
 
@@ -1521,7 +1497,7 @@ Time O(n), Space O(n).
1521
1497
  toVisual(): string[];
1522
1498
  ```
1523
1499
 
1524
- Defined in: [data-structures/base/iterable-element-base.ts:290](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-element-base.ts#L290)
1500
+ Defined in: [data-structures/base/iterable-element-base.ts:287](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-element-base.ts#L287)
1525
1501
 
1526
1502
  Returns a representation of the structure suitable for quick visualization.
1527
1503
  Defaults to an array of elements; subclasses may override to provide richer visuals.
@@ -1609,7 +1585,7 @@ Time O(1), Space O(1).
1609
1585
  get protected _total(): number;
1610
1586
  ```
1611
1587
 
1612
- Defined in: [data-structures/trie/trie.ts:278](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L278)
1588
+ Defined in: [data-structures/trie/trie.ts:265](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L265)
1613
1589
 
1614
1590
  (Protected) Get total count for base class iteration.
1615
1591
 
@@ -1631,7 +1607,7 @@ Total number of elements.
1631
1607
  protected _caseProcess(str): string;
1632
1608
  ```
1633
1609
 
1634
- Defined in: [data-structures/trie/trie.ts:1296](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L1296)
1610
+ Defined in: [data-structures/trie/trie.ts:766](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L766)
1635
1611
 
1636
1612
  (Protected) Normalize a string according to case sensitivity.
1637
1613
 
@@ -1661,7 +1637,7 @@ Time O(L), Space O(L)
1661
1637
  protected _createInstance(options?): this;
1662
1638
  ```
1663
1639
 
1664
- Defined in: [data-structures/trie/trie.ts:1229](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L1229)
1640
+ Defined in: [data-structures/trie/trie.ts:706](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L706)
1665
1641
 
1666
1642
  (Protected) Create an empty instance of the same concrete class.
1667
1643
 
@@ -1691,7 +1667,7 @@ Time O(1), Space O(1)
1691
1667
  protected _createLike<RM>(elements?, options?): Trie<RM>;
1692
1668
  ```
1693
1669
 
1694
- Defined in: [data-structures/trie/trie.ts:1250](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L1250)
1670
+ Defined in: [data-structures/trie/trie.ts:723](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L723)
1695
1671
 
1696
1672
  (Protected) Create a like-kind trie and seed it from an iterable.
1697
1673
 
@@ -1733,7 +1709,7 @@ Time O(ΣL), Space O(ΣL)
1733
1709
  protected _getIterator(): IterableIterator<string>;
1734
1710
  ```
1735
1711
 
1736
- Defined in: [data-structures/trie/trie.ts:1276](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L1276)
1712
+ Defined in: [data-structures/trie/trie.ts:747](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L747)
1737
1713
 
1738
1714
  (Protected) Iterate all words in lexicographic order of edges.
1739
1715
 
@@ -1759,7 +1735,7 @@ Time O(ΣL), Space O(H)
1759
1735
  protected _spawnLike<RM>(options?): Trie<RM>;
1760
1736
  ```
1761
1737
 
1762
- Defined in: [data-structures/trie/trie.ts:1266](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L1266)
1738
+ Defined in: [data-structures/trie/trie.ts:738](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L738)
1763
1739
 
1764
1740
  (Protected) Spawn an empty like-kind trie instance.
1765
1741
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  # Class: TrieNode
8
8
 
9
- Defined in: [data-structures/trie/trie.ts:17](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L17)
9
+ Defined in: [data-structures/trie/trie.ts:16](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L16)
10
10
 
11
11
  Node used by Trie to store one character and its children.
12
12
 
@@ -22,7 +22,7 @@ Time O(1), Space O(1)
22
22
  new TrieNode(key): TrieNode;
23
23
  ```
24
24
 
25
- Defined in: [data-structures/trie/trie.ts:24](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L24)
25
+ Defined in: [data-structures/trie/trie.ts:22](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L22)
26
26
 
27
27
  Create a Trie node with a character key.
28
28
 
@@ -52,7 +52,7 @@ Time O(1), Space O(1)
52
52
  get children(): Map<string, TrieNode>;
53
53
  ```
54
54
 
55
- Defined in: [data-structures/trie/trie.ts:61](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L61)
55
+ Defined in: [data-structures/trie/trie.ts:56](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L56)
56
56
 
57
57
  Get the child map of this node.
58
58
 
@@ -72,7 +72,7 @@ Map from character to child node.
72
72
  set children(value): void;
73
73
  ```
74
74
 
75
- Defined in: [data-structures/trie/trie.ts:72](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L72)
75
+ Defined in: [data-structures/trie/trie.ts:66](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L66)
76
76
 
77
77
  Replace the child map of this node.
78
78
 
@@ -104,7 +104,7 @@ void
104
104
  get isEnd(): boolean;
105
105
  ```
106
106
 
107
- Defined in: [data-structures/trie/trie.ts:84](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L84)
107
+ Defined in: [data-structures/trie/trie.ts:77](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L77)
108
108
 
109
109
  Check whether this node marks the end of a word.
110
110
 
@@ -124,7 +124,7 @@ True if this node ends a word.
124
124
  set isEnd(value): void;
125
125
  ```
126
126
 
127
- Defined in: [data-structures/trie/trie.ts:95](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L95)
127
+ Defined in: [data-structures/trie/trie.ts:87](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L87)
128
128
 
129
129
  Mark this node as the end of a word or not.
130
130
 
@@ -156,7 +156,7 @@ void
156
156
  get key(): string;
157
157
  ```
158
158
 
159
- Defined in: [data-structures/trie/trie.ts:38](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L38)
159
+ Defined in: [data-structures/trie/trie.ts:35](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L35)
160
160
 
161
161
  Get the character key of this node.
162
162
 
@@ -176,7 +176,7 @@ Character key string.
176
176
  set key(value): void;
177
177
  ```
178
178
 
179
- Defined in: [data-structures/trie/trie.ts:49](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L49)
179
+ Defined in: [data-structures/trie/trie.ts:45](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/trie/trie.ts#L45)
180
180
 
181
181
  Set the character key of this node.
182
182