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.
- package/CHANGELOG.md +9 -1
- package/dist/cjs/binary-tree.cjs +2927 -23688
- package/dist/cjs/graph.cjs +845 -2634
- package/dist/cjs/hash.cjs +185 -616
- package/dist/cjs/heap.cjs +266 -818
- package/dist/cjs/index.cjs +5116 -31358
- package/dist/cjs/linked-list.cjs +644 -2615
- package/dist/cjs/matrix.cjs +220 -535
- package/dist/cjs/priority-queue.cjs +266 -818
- package/dist/cjs/queue.cjs +637 -2343
- package/dist/cjs/stack.cjs +124 -530
- package/dist/cjs/trie.cjs +145 -592
- package/dist/cjs-legacy/binary-tree.cjs +4352 -25113
- package/dist/cjs-legacy/graph.cjs +847 -2636
- package/dist/cjs-legacy/hash.cjs +181 -612
- package/dist/cjs-legacy/heap.cjs +266 -818
- package/dist/cjs-legacy/index.cjs +6657 -32899
- package/dist/cjs-legacy/linked-list.cjs +640 -2611
- package/dist/cjs-legacy/matrix.cjs +220 -535
- package/dist/cjs-legacy/priority-queue.cjs +266 -818
- package/dist/cjs-legacy/queue.cjs +634 -2340
- package/dist/cjs-legacy/stack.cjs +124 -530
- package/dist/cjs-legacy/trie.cjs +145 -592
- package/dist/esm/binary-tree.mjs +2927 -23688
- package/dist/esm/graph.mjs +845 -2634
- package/dist/esm/hash.mjs +185 -616
- package/dist/esm/heap.mjs +266 -818
- package/dist/esm/index.mjs +5116 -31358
- package/dist/esm/linked-list.mjs +644 -2615
- package/dist/esm/matrix.mjs +220 -535
- package/dist/esm/priority-queue.mjs +266 -818
- package/dist/esm/queue.mjs +637 -2343
- package/dist/esm/stack.mjs +124 -530
- package/dist/esm/trie.mjs +145 -592
- package/dist/esm-legacy/binary-tree.mjs +4352 -25113
- package/dist/esm-legacy/graph.mjs +847 -2636
- package/dist/esm-legacy/hash.mjs +181 -612
- package/dist/esm-legacy/heap.mjs +266 -818
- package/dist/esm-legacy/index.mjs +6657 -32899
- package/dist/esm-legacy/linked-list.mjs +640 -2611
- package/dist/esm-legacy/matrix.mjs +220 -535
- package/dist/esm-legacy/priority-queue.mjs +266 -818
- package/dist/esm-legacy/queue.mjs +634 -2340
- package/dist/esm-legacy/stack.mjs +124 -530
- package/dist/esm-legacy/trie.mjs +145 -592
- package/dist/types/data-structures/binary-tree/avl-tree.d.ts +29 -500
- package/dist/types/data-structures/binary-tree/binary-indexed-tree.d.ts +38 -563
- package/dist/types/data-structures/binary-tree/binary-tree.d.ts +230 -1212
- package/dist/types/data-structures/binary-tree/bst.d.ts +124 -1063
- package/dist/types/data-structures/binary-tree/red-black-tree.d.ts +99 -854
- package/dist/types/data-structures/binary-tree/segment-tree.d.ts +62 -314
- package/dist/types/data-structures/binary-tree/tree-map.d.ts +366 -5057
- package/dist/types/data-structures/binary-tree/tree-multi-map.d.ts +277 -4885
- package/dist/types/data-structures/binary-tree/tree-multi-set.d.ts +253 -3929
- package/dist/types/data-structures/binary-tree/tree-set.d.ts +261 -4782
- package/dist/types/data-structures/graph/abstract-graph.d.ts +44 -44
- package/dist/types/data-structures/graph/directed-graph.d.ts +130 -527
- package/dist/types/data-structures/graph/undirected-graph.d.ts +125 -482
- package/dist/types/data-structures/hash/hash-map.d.ts +132 -562
- package/dist/types/data-structures/heap/heap.d.ts +194 -746
- package/dist/types/data-structures/linked-list/doubly-linked-list.d.ts +120 -809
- package/dist/types/data-structures/linked-list/singly-linked-list.d.ts +121 -733
- package/dist/types/data-structures/linked-list/skip-linked-list.d.ts +193 -863
- package/dist/types/data-structures/matrix/matrix.d.ts +159 -474
- package/dist/types/data-structures/priority-queue/max-priority-queue.d.ts +1 -6
- package/dist/types/data-structures/priority-queue/min-priority-queue.d.ts +6 -11
- package/dist/types/data-structures/priority-queue/priority-queue.d.ts +1 -1
- package/dist/types/data-structures/queue/deque.d.ts +196 -804
- package/dist/types/data-structures/queue/queue.d.ts +99 -585
- package/dist/types/data-structures/stack/stack.d.ts +75 -481
- package/dist/types/data-structures/trie/trie.d.ts +98 -584
- package/dist/umd/data-structure-typed.js +6580 -32822
- package/dist/umd/data-structure-typed.min.js +3 -3
- package/docs-site-docusaurus/docs/api/classes/AVLTree.md +162 -215
- package/docs-site-docusaurus/docs/api/classes/AVLTreeNode.md +9 -9
- package/docs-site-docusaurus/docs/api/classes/AbstractGraph.md +47 -47
- package/docs-site-docusaurus/docs/api/classes/BST.md +155 -208
- package/docs-site-docusaurus/docs/api/classes/BSTNode.md +7 -7
- package/docs-site-docusaurus/docs/api/classes/BinaryIndexedTree.md +13 -29
- package/docs-site-docusaurus/docs/api/classes/BinaryTree.md +104 -158
- package/docs-site-docusaurus/docs/api/classes/BinaryTreeNode.md +13 -13
- package/docs-site-docusaurus/docs/api/classes/Deque.md +72 -104
- package/docs-site-docusaurus/docs/api/classes/DirectedGraph.md +60 -80
- package/docs-site-docusaurus/docs/api/classes/DoublyLinkedList.md +67 -101
- package/docs-site-docusaurus/docs/api/classes/DoublyLinkedListNode.md +6 -6
- package/docs-site-docusaurus/docs/api/classes/FibonacciHeap.md +9 -9
- package/docs-site-docusaurus/docs/api/classes/FibonacciHeapNode.md +1 -1
- package/docs-site-docusaurus/docs/api/classes/HashMap.md +52 -48
- package/docs-site-docusaurus/docs/api/classes/Heap.md +40 -68
- package/docs-site-docusaurus/docs/api/classes/IterableElementBase.md +17 -17
- package/docs-site-docusaurus/docs/api/classes/LinearBase.md +38 -38
- package/docs-site-docusaurus/docs/api/classes/LinearLinkedBase.md +45 -45
- package/docs-site-docusaurus/docs/api/classes/LinkedHashMap.md +23 -23
- package/docs-site-docusaurus/docs/api/classes/LinkedListQueue.md +68 -96
- package/docs-site-docusaurus/docs/api/classes/MapGraph.md +60 -80
- package/docs-site-docusaurus/docs/api/classes/Matrix.md +57 -52
- package/docs-site-docusaurus/docs/api/classes/MaxHeap.md +38 -66
- package/docs-site-docusaurus/docs/api/classes/MaxPriorityQueue.md +41 -74
- package/docs-site-docusaurus/docs/api/classes/MinHeap.md +38 -66
- package/docs-site-docusaurus/docs/api/classes/MinPriorityQueue.md +46 -79
- package/docs-site-docusaurus/docs/api/classes/PriorityQueue.md +40 -68
- package/docs-site-docusaurus/docs/api/classes/Queue.md +54 -78
- package/docs-site-docusaurus/docs/api/classes/RedBlackTree.md +171 -225
- package/docs-site-docusaurus/docs/api/classes/SegmentTree.md +10 -22
- package/docs-site-docusaurus/docs/api/classes/SinglyLinkedList.md +68 -98
- package/docs-site-docusaurus/docs/api/classes/SinglyLinkedListNode.md +4 -4
- package/docs-site-docusaurus/docs/api/classes/SkipList.md +98 -75
- package/docs-site-docusaurus/docs/api/classes/Stack.md +33 -53
- package/docs-site-docusaurus/docs/api/classes/TreeMap.md +104 -129
- package/docs-site-docusaurus/docs/api/classes/TreeMultiMap.md +57 -124
- package/docs-site-docusaurus/docs/api/classes/TreeSet.md +45 -116
- package/docs-site-docusaurus/docs/api/classes/Trie.md +37 -61
- package/docs-site-docusaurus/docs/api/classes/TrieNode.md +8 -8
- package/docs-site-docusaurus/docs/api/classes/UndirectedGraph.md +59 -77
- package/package.json +1 -1
- package/src/data-structures/binary-tree/tree-multi-set.ts +15 -11
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Abstract Class: LinearLinkedBase\<E, R, NODE\>
|
|
8
8
|
|
|
9
|
-
Defined in: [data-structures/base/linear-base.ts:
|
|
9
|
+
Defined in: [data-structures/base/linear-base.ts:397](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/linear-base.ts#L397)
|
|
10
10
|
|
|
11
11
|
Linked-list specialized linear container.
|
|
12
12
|
|
|
@@ -169,7 +169,7 @@ Producing the iterator is O(1); consuming the entire iterator is Time O(n) with
|
|
|
169
169
|
abstract addAfter(existingElementOrNode, newElementOrNode): boolean;
|
|
170
170
|
```
|
|
171
171
|
|
|
172
|
-
Defined in: [data-structures/base/linear-base.ts:
|
|
172
|
+
Defined in: [data-structures/base/linear-base.ts:586](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/linear-base.ts#L586)
|
|
173
173
|
|
|
174
174
|
Insert new element/node after an existing node.
|
|
175
175
|
|
|
@@ -205,7 +205,7 @@ Time O(1)~O(n) depending on reference access, Space O(1)
|
|
|
205
205
|
abstract addAt(index, newElementOrNode): boolean;
|
|
206
206
|
```
|
|
207
207
|
|
|
208
|
-
Defined in: [data-structures/base/linear-base.ts:
|
|
208
|
+
Defined in: [data-structures/base/linear-base.ts:372](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/linear-base.ts#L372)
|
|
209
209
|
|
|
210
210
|
Insert an element/node at a position.
|
|
211
211
|
|
|
@@ -245,7 +245,7 @@ Time O(1)~O(n) depending on implementation, Space O(1)
|
|
|
245
245
|
abstract addBefore(existingElementOrNode, newElementOrNode): boolean;
|
|
246
246
|
```
|
|
247
247
|
|
|
248
|
-
Defined in: [data-structures/base/linear-base.ts:
|
|
248
|
+
Defined in: [data-structures/base/linear-base.ts:577](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/linear-base.ts#L577)
|
|
249
249
|
|
|
250
250
|
Insert new element/node before an existing node.
|
|
251
251
|
|
|
@@ -281,7 +281,7 @@ Time O(1)~O(n) depending on reference access, Space O(1)
|
|
|
281
281
|
abstract at(index): E | undefined;
|
|
282
282
|
```
|
|
283
283
|
|
|
284
|
-
Defined in: [data-structures/base/linear-base.ts:
|
|
284
|
+
Defined in: [data-structures/base/linear-base.ts:355](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/linear-base.ts#L355)
|
|
285
285
|
|
|
286
286
|
Get element at an index.
|
|
287
287
|
|
|
@@ -315,7 +315,7 @@ Time O(1)~O(n) depending on implementation, Space O(1)
|
|
|
315
315
|
abstract clear(): void;
|
|
316
316
|
```
|
|
317
317
|
|
|
318
|
-
Defined in: [data-structures/base/iterable-element-base.ts:
|
|
318
|
+
Defined in: [data-structures/base/iterable-element-base.ts:318](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-element-base.ts#L318)
|
|
319
319
|
|
|
320
320
|
Removes all elements from the structure.
|
|
321
321
|
|
|
@@ -341,7 +341,7 @@ Expected Time O(1) or O(n) depending on the implementation; Space O(1).
|
|
|
341
341
|
abstract clone(): this;
|
|
342
342
|
```
|
|
343
343
|
|
|
344
|
-
Defined in: [data-structures/base/linear-base.ts:
|
|
344
|
+
Defined in: [data-structures/base/linear-base.ts:305](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/linear-base.ts#L305)
|
|
345
345
|
|
|
346
346
|
Deep clone while preserving concrete subtype.
|
|
347
347
|
|
|
@@ -367,7 +367,7 @@ Time O(n), Space O(n)
|
|
|
367
367
|
concat(...items): this;
|
|
368
368
|
```
|
|
369
369
|
|
|
370
|
-
Defined in: [data-structures/base/linear-base.ts:
|
|
370
|
+
Defined in: [data-structures/base/linear-base.ts:462](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/linear-base.ts#L462)
|
|
371
371
|
|
|
372
372
|
Concatenate lists/elements preserving order.
|
|
373
373
|
|
|
@@ -403,7 +403,7 @@ Time O(sum(length)), Space O(sum(length))
|
|
|
403
403
|
abstract delete(elementOrNode): boolean;
|
|
404
404
|
```
|
|
405
405
|
|
|
406
|
-
Defined in: [data-structures/base/linear-base.ts:
|
|
406
|
+
Defined in: [data-structures/base/linear-base.ts:568](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/linear-base.ts#L568)
|
|
407
407
|
|
|
408
408
|
Delete by element or node in a linked list.
|
|
409
409
|
|
|
@@ -437,7 +437,7 @@ Time O(1)~O(n) depending on availability of links, Space O(1)
|
|
|
437
437
|
abstract deleteAt(pos): E | undefined;
|
|
438
438
|
```
|
|
439
439
|
|
|
440
|
-
Defined in: [data-structures/base/linear-base.ts:
|
|
440
|
+
Defined in: [data-structures/base/linear-base.ts:363](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/linear-base.ts#L363)
|
|
441
441
|
|
|
442
442
|
Remove element at a position.
|
|
443
443
|
|
|
@@ -471,7 +471,7 @@ Time O(1)~O(n) depending on implementation, Space O(1)
|
|
|
471
471
|
entries(): IterableIterator<[number, E]>;
|
|
472
472
|
```
|
|
473
473
|
|
|
474
|
-
Defined in: [data-structures/base/iterable-element-base.ts:
|
|
474
|
+
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)
|
|
475
475
|
|
|
476
476
|
Return an iterator of `[index, value]` pairs (Array-compatible).
|
|
477
477
|
|
|
@@ -538,7 +538,7 @@ fill(
|
|
|
538
538
|
end?): this;
|
|
539
539
|
```
|
|
540
540
|
|
|
541
|
-
Defined in: [data-structures/base/linear-base.ts:
|
|
541
|
+
Defined in: [data-structures/base/linear-base.ts:279](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/linear-base.ts#L279)
|
|
542
542
|
|
|
543
543
|
Fill a range with a value.
|
|
544
544
|
|
|
@@ -584,7 +584,7 @@ Time O(n), Space O(1)
|
|
|
584
584
|
abstract filter(predicate, thisArg?): this;
|
|
585
585
|
```
|
|
586
586
|
|
|
587
|
-
Defined in: [data-structures/base/iterable-element-base.ts:
|
|
587
|
+
Defined in: [data-structures/base/iterable-element-base.ts:370](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-element-base.ts#L370)
|
|
588
588
|
|
|
589
589
|
Filters elements using the provided predicate and returns the same concrete structure type.
|
|
590
590
|
|
|
@@ -714,7 +714,7 @@ Time O(n) in the worst case; may exit early on the first match. Space O(1).
|
|
|
714
714
|
findIndex(predicate, thisArg?): number;
|
|
715
715
|
```
|
|
716
716
|
|
|
717
|
-
Defined in: [data-structures/base/linear-base.ts:
|
|
717
|
+
Defined in: [data-structures/base/linear-base.ts:147](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/linear-base.ts#L147)
|
|
718
718
|
|
|
719
719
|
Find the first index matching a predicate.
|
|
720
720
|
|
|
@@ -794,7 +794,7 @@ Time O(n), Space O(1).
|
|
|
794
794
|
abstract getNodeAt(index): NODE | undefined;
|
|
795
795
|
```
|
|
796
796
|
|
|
797
|
-
Defined in: [data-structures/base/linear-base.ts:
|
|
797
|
+
Defined in: [data-structures/base/linear-base.ts:594](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/linear-base.ts#L594)
|
|
798
798
|
|
|
799
799
|
Node at index (for random-access emulation).
|
|
800
800
|
|
|
@@ -824,7 +824,7 @@ Time O(n), Space O(1)
|
|
|
824
824
|
has(element): boolean;
|
|
825
825
|
```
|
|
826
826
|
|
|
827
|
-
Defined in: [data-structures/base/iterable-element-base.ts:
|
|
827
|
+
Defined in: [data-structures/base/iterable-element-base.ts:188](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-element-base.ts#L188)
|
|
828
828
|
|
|
829
829
|
Checks whether a strictly-equal element exists in the structure.
|
|
830
830
|
|
|
@@ -858,7 +858,7 @@ Time O(n) in the worst case. Space O(1).
|
|
|
858
858
|
includes(element): boolean;
|
|
859
859
|
```
|
|
860
860
|
|
|
861
|
-
Defined in: [data-structures/base/iterable-element-base.ts:
|
|
861
|
+
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)
|
|
862
862
|
|
|
863
863
|
Check whether a value exists (Array-compatible alias for `has`).
|
|
864
864
|
|
|
@@ -892,7 +892,7 @@ Provided for familiarity when migrating from Array. Time O(n), Space O(1).
|
|
|
892
892
|
indexOf(searchElement, fromIndex?): number;
|
|
893
893
|
```
|
|
894
894
|
|
|
895
|
-
Defined in: [data-structures/base/linear-base.ts:
|
|
895
|
+
Defined in: [data-structures/base/linear-base.ts:417](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/linear-base.ts#L417)
|
|
896
896
|
|
|
897
897
|
Linked-list optimized `indexOf` (forwards scan).
|
|
898
898
|
|
|
@@ -932,7 +932,7 @@ Time O(n), Space O(1)
|
|
|
932
932
|
abstract isEmpty(): boolean;
|
|
933
933
|
```
|
|
934
934
|
|
|
935
|
-
Defined in: [data-structures/base/iterable-element-base.ts:
|
|
935
|
+
Defined in: [data-structures/base/iterable-element-base.ts:309](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-element-base.ts#L309)
|
|
936
936
|
|
|
937
937
|
Indicates whether the structure currently contains no elements.
|
|
938
938
|
|
|
@@ -958,7 +958,7 @@ Expected Time O(1), Space O(1) for most implementations.
|
|
|
958
958
|
join(separator?): string;
|
|
959
959
|
```
|
|
960
960
|
|
|
961
|
-
Defined in: [data-structures/base/linear-base.ts:
|
|
961
|
+
Defined in: [data-structures/base/linear-base.ts:218](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/linear-base.ts#L218)
|
|
962
962
|
|
|
963
963
|
Join all elements into a string.
|
|
964
964
|
|
|
@@ -992,7 +992,7 @@ Time O(n), Space O(n)
|
|
|
992
992
|
keys(): IterableIterator<number>;
|
|
993
993
|
```
|
|
994
994
|
|
|
995
|
-
Defined in: [data-structures/base/iterable-element-base.ts:
|
|
995
|
+
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)
|
|
996
996
|
|
|
997
997
|
Return an iterator of numeric indices (Array-compatible).
|
|
998
998
|
|
|
@@ -1016,7 +1016,7 @@ Provided for familiarity when migrating from Array. Time O(n), Space O(1) per st
|
|
|
1016
1016
|
lastIndexOf(searchElement, fromIndex?): number;
|
|
1017
1017
|
```
|
|
1018
1018
|
|
|
1019
|
-
Defined in: [data-structures/base/linear-base.ts:
|
|
1019
|
+
Defined in: [data-structures/base/linear-base.ts:440](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/linear-base.ts#L440)
|
|
1020
1020
|
|
|
1021
1021
|
Linked-list optimized `lastIndexOf` (reverse scan).
|
|
1022
1022
|
|
|
@@ -1059,7 +1059,7 @@ abstract map<EM, RM>(
|
|
|
1059
1059
|
thisArg?): IterableElementBase<EM, RM>;
|
|
1060
1060
|
```
|
|
1061
1061
|
|
|
1062
|
-
Defined in: [data-structures/base/iterable-element-base.ts:
|
|
1062
|
+
Defined in: [data-structures/base/iterable-element-base.ts:342](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-element-base.ts#L342)
|
|
1063
1063
|
|
|
1064
1064
|
Maps each element to a new element and returns a new iterable structure.
|
|
1065
1065
|
|
|
@@ -1119,7 +1119,7 @@ Time O(n), Space O(n).
|
|
|
1119
1119
|
abstract mapSame(callback, thisArg?): this;
|
|
1120
1120
|
```
|
|
1121
1121
|
|
|
1122
|
-
Defined in: [data-structures/base/iterable-element-base.ts:
|
|
1122
|
+
Defined in: [data-structures/base/iterable-element-base.ts:358](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-element-base.ts#L358)
|
|
1123
1123
|
|
|
1124
1124
|
Maps each element to the same element type and returns the same concrete structure type.
|
|
1125
1125
|
|
|
@@ -1159,7 +1159,7 @@ Time O(n), Space O(n).
|
|
|
1159
1159
|
print(): void;
|
|
1160
1160
|
```
|
|
1161
1161
|
|
|
1162
|
-
Defined in: [data-structures/base/iterable-element-base.ts:
|
|
1162
|
+
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)
|
|
1163
1163
|
|
|
1164
1164
|
Prints `toVisual()` to the console. Intended for quick debugging.
|
|
1165
1165
|
|
|
@@ -1185,7 +1185,7 @@ Time O(n) due to materialization, Space O(n) for the intermediate representation
|
|
|
1185
1185
|
abstract push(elementOrNode): boolean;
|
|
1186
1186
|
```
|
|
1187
1187
|
|
|
1188
|
-
Defined in: [data-structures/base/linear-base.ts:
|
|
1188
|
+
Defined in: [data-structures/base/linear-base.ts:331](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/linear-base.ts#L331)
|
|
1189
1189
|
|
|
1190
1190
|
Append one element or node to the tail.
|
|
1191
1191
|
|
|
@@ -1219,7 +1219,7 @@ Time O(1) amortized typical, Space O(1)
|
|
|
1219
1219
|
abstract pushMany(elements): boolean[];
|
|
1220
1220
|
```
|
|
1221
1221
|
|
|
1222
|
-
Defined in: [data-structures/base/linear-base.ts:
|
|
1222
|
+
Defined in: [data-structures/base/linear-base.ts:339](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/linear-base.ts#L339)
|
|
1223
1223
|
|
|
1224
1224
|
Append many elements/nodes at once.
|
|
1225
1225
|
|
|
@@ -1287,7 +1287,7 @@ Time O(n), Space O(1). Throws if called on an empty structure without `initialVa
|
|
|
1287
1287
|
reduce(callbackfn): E;
|
|
1288
1288
|
```
|
|
1289
1289
|
|
|
1290
|
-
Defined in: [data-structures/base/iterable-element-base.ts:
|
|
1290
|
+
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)
|
|
1291
1291
|
|
|
1292
1292
|
##### Parameters
|
|
1293
1293
|
|
|
@@ -1309,7 +1309,7 @@ Defined in: [data-structures/base/iterable-element-base.ts:226](https://github.c
|
|
|
1309
1309
|
reduce(callbackfn, initialValue): E;
|
|
1310
1310
|
```
|
|
1311
1311
|
|
|
1312
|
-
Defined in: [data-structures/base/iterable-element-base.ts:
|
|
1312
|
+
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)
|
|
1313
1313
|
|
|
1314
1314
|
##### Parameters
|
|
1315
1315
|
|
|
@@ -1335,7 +1335,7 @@ Defined in: [data-structures/base/iterable-element-base.ts:227](https://github.c
|
|
|
1335
1335
|
reduce<U>(callbackfn, initialValue): U;
|
|
1336
1336
|
```
|
|
1337
1337
|
|
|
1338
|
-
Defined in: [data-structures/base/iterable-element-base.ts:
|
|
1338
|
+
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)
|
|
1339
1339
|
|
|
1340
1340
|
##### Type Parameters
|
|
1341
1341
|
|
|
@@ -1369,7 +1369,7 @@ Defined in: [data-structures/base/iterable-element-base.ts:228](https://github.c
|
|
|
1369
1369
|
reduceRight<U>(callbackfn, initialValue): U;
|
|
1370
1370
|
```
|
|
1371
1371
|
|
|
1372
|
-
Defined in: [data-structures/base/linear-base.ts:
|
|
1372
|
+
Defined in: [data-structures/base/linear-base.ts:552](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/linear-base.ts#L552)
|
|
1373
1373
|
|
|
1374
1374
|
Right-to-left reduction using reverse iterator.
|
|
1375
1375
|
|
|
@@ -1415,7 +1415,7 @@ Time O(n), Space O(1)
|
|
|
1415
1415
|
abstract reverse(): this;
|
|
1416
1416
|
```
|
|
1417
1417
|
|
|
1418
|
-
Defined in: [data-structures/base/linear-base.ts:
|
|
1418
|
+
Defined in: [data-structures/base/linear-base.ts:312](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/linear-base.ts#L312)
|
|
1419
1419
|
|
|
1420
1420
|
Reverse the order of elements in-place (or equivalent).
|
|
1421
1421
|
|
|
@@ -1441,7 +1441,7 @@ Time O(n), Space O(1)
|
|
|
1441
1441
|
abstract setAt(index, value): boolean;
|
|
1442
1442
|
```
|
|
1443
1443
|
|
|
1444
|
-
Defined in: [data-structures/base/linear-base.ts:
|
|
1444
|
+
Defined in: [data-structures/base/linear-base.ts:298](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/linear-base.ts#L298)
|
|
1445
1445
|
|
|
1446
1446
|
Set the value at an index.
|
|
1447
1447
|
|
|
@@ -1481,7 +1481,7 @@ Time O(1) typical, Space O(1)
|
|
|
1481
1481
|
slice(start?, end?): this;
|
|
1482
1482
|
```
|
|
1483
1483
|
|
|
1484
|
-
Defined in: [data-structures/base/linear-base.ts:
|
|
1484
|
+
Defined in: [data-structures/base/linear-base.ts:481](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/linear-base.ts#L481)
|
|
1485
1485
|
|
|
1486
1486
|
Slice via forward iteration (no random access required).
|
|
1487
1487
|
|
|
@@ -1561,7 +1561,7 @@ Time O(n) in the worst case; may exit early on first success. Space O(1).
|
|
|
1561
1561
|
sort(compareFn?): this;
|
|
1562
1562
|
```
|
|
1563
1563
|
|
|
1564
|
-
Defined in: [data-structures/base/linear-base.ts:
|
|
1564
|
+
Defined in: [data-structures/base/linear-base.ts:179](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/linear-base.ts#L179)
|
|
1565
1565
|
|
|
1566
1566
|
In-place stable order via array sort semantics.
|
|
1567
1567
|
|
|
@@ -1598,7 +1598,7 @@ splice(
|
|
|
1598
1598
|
items): this;
|
|
1599
1599
|
```
|
|
1600
1600
|
|
|
1601
|
-
Defined in: [data-structures/base/linear-base.ts:
|
|
1601
|
+
Defined in: [data-structures/base/linear-base.ts:507](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/linear-base.ts#L507)
|
|
1602
1602
|
|
|
1603
1603
|
Splice by walking node iterators from the start index.
|
|
1604
1604
|
|
|
@@ -1644,7 +1644,7 @@ Time O(n + m), Space O(min(n, m)) where `m = items.length`
|
|
|
1644
1644
|
toArray(): E[];
|
|
1645
1645
|
```
|
|
1646
1646
|
|
|
1647
|
-
Defined in: [data-structures/base/iterable-element-base.ts:
|
|
1647
|
+
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)
|
|
1648
1648
|
|
|
1649
1649
|
Materializes the elements into a new array.
|
|
1650
1650
|
|
|
@@ -1670,7 +1670,7 @@ Time O(n), Space O(n).
|
|
|
1670
1670
|
toReversed(): this;
|
|
1671
1671
|
```
|
|
1672
1672
|
|
|
1673
|
-
Defined in: [data-structures/base/linear-base.ts:
|
|
1673
|
+
Defined in: [data-structures/base/linear-base.ts:319](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/linear-base.ts#L319)
|
|
1674
1674
|
|
|
1675
1675
|
Return a new instance of the same type with elements in reverse order (non-mutating).
|
|
1676
1676
|
|
|
@@ -1696,7 +1696,7 @@ Provided for familiarity when migrating from Array (ES2023 `toReversed`). Time O
|
|
|
1696
1696
|
toReversedArray(): E[];
|
|
1697
1697
|
```
|
|
1698
1698
|
|
|
1699
|
-
Defined in: [data-structures/base/linear-base.ts:
|
|
1699
|
+
Defined in: [data-structures/base/linear-base.ts:227](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/linear-base.ts#L227)
|
|
1700
1700
|
|
|
1701
1701
|
Snapshot elements into a reversed array.
|
|
1702
1702
|
|
|
@@ -1722,7 +1722,7 @@ Time O(n), Space O(n)
|
|
|
1722
1722
|
toVisual(): E[];
|
|
1723
1723
|
```
|
|
1724
1724
|
|
|
1725
|
-
Defined in: [data-structures/base/iterable-element-base.ts:
|
|
1725
|
+
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)
|
|
1726
1726
|
|
|
1727
1727
|
Returns a representation of the structure suitable for quick visualization.
|
|
1728
1728
|
Defaults to an array of elements; subclasses may override to provide richer visuals.
|
|
@@ -1808,7 +1808,7 @@ Time O(1), Space O(1).
|
|
|
1808
1808
|
abstract protected _createInstance(options?): this;
|
|
1809
1809
|
```
|
|
1810
1810
|
|
|
1811
|
-
Defined in: [data-structures/base/linear-base.ts:
|
|
1811
|
+
Defined in: [data-structures/base/linear-base.ts:380](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/linear-base.ts#L380)
|
|
1812
1812
|
|
|
1813
1813
|
Create an empty list of the same species.
|
|
1814
1814
|
|
|
@@ -1842,7 +1842,7 @@ Time O(1), Space O(1)
|
|
|
1842
1842
|
abstract protected _getIterator(...args): IterableIterator<E>;
|
|
1843
1843
|
```
|
|
1844
1844
|
|
|
1845
|
-
Defined in: [data-structures/base/iterable-element-base.ts:
|
|
1845
|
+
Defined in: [data-structures/base/iterable-element-base.ts:381](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/iterable-element-base.ts#L381)
|
|
1846
1846
|
|
|
1847
1847
|
Internal iterator factory used by the default iterator.
|
|
1848
1848
|
|
|
@@ -1876,7 +1876,7 @@ Implementations should yield in O(1) per element with O(1) extra space when poss
|
|
|
1876
1876
|
abstract protected _getNodeIterator(...args): IterableIterator<NODE>;
|
|
1877
1877
|
```
|
|
1878
1878
|
|
|
1879
|
-
Defined in: [data-structures/base/linear-base.ts:
|
|
1879
|
+
Defined in: [data-structures/base/linear-base.ts:601](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/linear-base.ts#L601)
|
|
1880
1880
|
|
|
1881
1881
|
Iterate linked nodes from head to tail.
|
|
1882
1882
|
|
|
@@ -1904,7 +1904,7 @@ Time O(n), Space O(1)
|
|
|
1904
1904
|
abstract protected _getPrevNode(node): NODE | undefined;
|
|
1905
1905
|
```
|
|
1906
1906
|
|
|
1907
|
-
Defined in: [data-structures/base/linear-base.ts:
|
|
1907
|
+
Defined in: [data-structures/base/linear-base.ts:609](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/linear-base.ts#L609)
|
|
1908
1908
|
|
|
1909
1909
|
Get previous node of a given node.
|
|
1910
1910
|
|
|
@@ -1934,7 +1934,7 @@ Time O(1)~O(n) depending on list variant (singly vs doubly), Space O(1)
|
|
|
1934
1934
|
abstract protected _getReverseIterator(...args): IterableIterator<E>;
|
|
1935
1935
|
```
|
|
1936
1936
|
|
|
1937
|
-
Defined in: [data-structures/base/linear-base.ts:
|
|
1937
|
+
Defined in: [data-structures/base/linear-base.ts:387](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/base/linear-base.ts#L387)
|
|
1938
1938
|
|
|
1939
1939
|
Reverse-direction iterator over elements.
|
|
1940
1940
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Class: LinkedHashMap\<K, V, R\>
|
|
8
8
|
|
|
9
|
-
Defined in: [data-structures/hash/hash-map.ts:
|
|
9
|
+
Defined in: [data-structures/hash/hash-map.ts:523](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L523)
|
|
10
10
|
|
|
11
11
|
Hash-based map that preserves insertion order via a doubly-linked list.
|
|
12
12
|
|
|
@@ -46,7 +46,7 @@ examples will be generated by unit test
|
|
|
46
46
|
new LinkedHashMap<K, V, R>(entryOrRawElements?, options?): LinkedHashMap<K, V, R>;
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
-
Defined in: [data-structures/hash/hash-map.ts:
|
|
49
|
+
Defined in: [data-structures/hash/hash-map.ts:533](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L533)
|
|
50
50
|
|
|
51
51
|
Create a LinkedHashMap and optionally bulk-insert entries.
|
|
52
52
|
|
|
@@ -90,7 +90,7 @@ IterableEntryBase<K, V>.constructor
|
|
|
90
90
|
get first(): [K, V] | undefined;
|
|
91
91
|
```
|
|
92
92
|
|
|
93
|
-
Defined in: [data-structures/hash/hash-map.ts:
|
|
93
|
+
Defined in: [data-structures/hash/hash-map.ts:615](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L615)
|
|
94
94
|
|
|
95
95
|
Get the first [key, value] pair.
|
|
96
96
|
|
|
@@ -114,7 +114,7 @@ First entry or undefined when empty.
|
|
|
114
114
|
get head(): HashMapLinkedNode<K, V | undefined>;
|
|
115
115
|
```
|
|
116
116
|
|
|
117
|
-
Defined in: [data-structures/hash/hash-map.ts:
|
|
117
|
+
Defined in: [data-structures/hash/hash-map.ts:585](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L585)
|
|
118
118
|
|
|
119
119
|
Get the head node (first entry) sentinel link.
|
|
120
120
|
|
|
@@ -138,7 +138,7 @@ Head node or sentinel.
|
|
|
138
138
|
get last(): [K, V] | undefined;
|
|
139
139
|
```
|
|
140
140
|
|
|
141
|
-
Defined in: [data-structures/hash/hash-map.ts:
|
|
141
|
+
Defined in: [data-structures/hash/hash-map.ts:625](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L625)
|
|
142
142
|
|
|
143
143
|
Get the last [key, value] pair.
|
|
144
144
|
|
|
@@ -162,7 +162,7 @@ Last entry or undefined when empty.
|
|
|
162
162
|
get noObjMap(): Record<string, HashMapLinkedNode<K, V | undefined>>;
|
|
163
163
|
```
|
|
164
164
|
|
|
165
|
-
Defined in: [data-structures/hash/hash-map.ts:
|
|
165
|
+
Defined in: [data-structures/hash/hash-map.ts:569](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L569)
|
|
166
166
|
|
|
167
167
|
Get the internal record for non-object keys.
|
|
168
168
|
|
|
@@ -186,7 +186,7 @@ Record of hash→node.
|
|
|
186
186
|
get objHashFn(): (key) => object;
|
|
187
187
|
```
|
|
188
188
|
|
|
189
|
-
Defined in: [data-structures/hash/hash-map.ts:
|
|
189
|
+
Defined in: [data-structures/hash/hash-map.ts:558](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L558)
|
|
190
190
|
|
|
191
191
|
Get the hash function for object/weak keys.
|
|
192
192
|
|
|
@@ -210,7 +210,7 @@ Object-hash function.
|
|
|
210
210
|
get size(): number;
|
|
211
211
|
```
|
|
212
212
|
|
|
213
|
-
Defined in: [data-structures/hash/hash-map.ts:
|
|
213
|
+
Defined in: [data-structures/hash/hash-map.ts:606](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L606)
|
|
214
214
|
|
|
215
215
|
Total number of entries.
|
|
216
216
|
|
|
@@ -238,7 +238,7 @@ Entry count.
|
|
|
238
238
|
get tail(): HashMapLinkedNode<K, V | undefined>;
|
|
239
239
|
```
|
|
240
240
|
|
|
241
|
-
Defined in: [data-structures/hash/hash-map.ts:
|
|
241
|
+
Defined in: [data-structures/hash/hash-map.ts:596](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L596)
|
|
242
242
|
|
|
243
243
|
Get the tail node (last entry) sentinel link.
|
|
244
244
|
|
|
@@ -292,7 +292,7 @@ Time O(n) to iterate, Space O(1)
|
|
|
292
292
|
at(index): V | undefined;
|
|
293
293
|
```
|
|
294
294
|
|
|
295
|
-
Defined in: [data-structures/hash/hash-map.ts:
|
|
295
|
+
Defined in: [data-structures/hash/hash-map.ts:740](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L740)
|
|
296
296
|
|
|
297
297
|
Get the value at a given index in insertion order.
|
|
298
298
|
|
|
@@ -322,7 +322,7 @@ Time O(N), Space O(1)
|
|
|
322
322
|
begin(): Generator<(K | V | undefined)[], void, unknown>;
|
|
323
323
|
```
|
|
324
324
|
|
|
325
|
-
Defined in: [data-structures/hash/hash-map.ts:
|
|
325
|
+
Defined in: [data-structures/hash/hash-map.ts:635](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L635)
|
|
326
326
|
|
|
327
327
|
Iterate from head → tail.
|
|
328
328
|
|
|
@@ -344,7 +344,7 @@ Time O(N), Space O(1)
|
|
|
344
344
|
clear(): void;
|
|
345
345
|
```
|
|
346
346
|
|
|
347
|
-
Defined in: [data-structures/hash/hash-map.ts:
|
|
347
|
+
Defined in: [data-structures/hash/hash-map.ts:813](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L813)
|
|
348
348
|
|
|
349
349
|
Remove all entries.
|
|
350
350
|
|
|
@@ -368,7 +368,7 @@ Time O(n) typical, Space O(1)
|
|
|
368
368
|
clone(): this;
|
|
369
369
|
```
|
|
370
370
|
|
|
371
|
-
Defined in: [data-structures/hash/hash-map.ts:
|
|
371
|
+
Defined in: [data-structures/hash/hash-map.ts:819](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L819)
|
|
372
372
|
|
|
373
373
|
Deep clone preserving the concrete subtype.
|
|
374
374
|
|
|
@@ -394,7 +394,7 @@ Time O(n) typical, Space O(n)
|
|
|
394
394
|
deleteAt(index): [K, V | undefined];
|
|
395
395
|
```
|
|
396
396
|
|
|
397
|
-
Defined in: [data-structures/hash/hash-map.ts:
|
|
397
|
+
Defined in: [data-structures/hash/hash-map.ts:796](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L796)
|
|
398
398
|
|
|
399
399
|
Delete the entry at a given index.
|
|
400
400
|
|
|
@@ -428,7 +428,7 @@ If index is out of bounds.
|
|
|
428
428
|
deleteWhere(predicate): boolean;
|
|
429
429
|
```
|
|
430
430
|
|
|
431
|
-
Defined in: [data-structures/hash/hash-map.ts:
|
|
431
|
+
Defined in: [data-structures/hash/hash-map.ts:769](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L769)
|
|
432
432
|
|
|
433
433
|
Delete the first entry that matches a predicate.
|
|
434
434
|
|
|
@@ -524,7 +524,7 @@ Time O(n), Space O(1)
|
|
|
524
524
|
filter(predicate, thisArg?): this;
|
|
525
525
|
```
|
|
526
526
|
|
|
527
|
-
Defined in: [data-structures/hash/hash-map.ts:
|
|
527
|
+
Defined in: [data-structures/hash/hash-map.ts:824](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L824)
|
|
528
528
|
|
|
529
529
|
Filter entries and return the same-species structure.
|
|
530
530
|
|
|
@@ -638,7 +638,7 @@ Time O(n), Space O(1)
|
|
|
638
638
|
get(key): V | undefined;
|
|
639
639
|
```
|
|
640
640
|
|
|
641
|
-
Defined in: [data-structures/hash/hash-map.ts:
|
|
641
|
+
Defined in: [data-structures/hash/hash-map.ts:723](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L723)
|
|
642
642
|
|
|
643
643
|
Get the value under a key.
|
|
644
644
|
|
|
@@ -672,7 +672,7 @@ Time O(n) generic, Space O(1)
|
|
|
672
672
|
has(key): boolean;
|
|
673
673
|
```
|
|
674
674
|
|
|
675
|
-
Defined in: [data-structures/hash/hash-map.ts:
|
|
675
|
+
Defined in: [data-structures/hash/hash-map.ts:714](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L714)
|
|
676
676
|
|
|
677
677
|
Whether the given key exists.
|
|
678
678
|
|
|
@@ -740,7 +740,7 @@ Time O(n), Space O(1)
|
|
|
740
740
|
isEmpty(): boolean;
|
|
741
741
|
```
|
|
742
742
|
|
|
743
|
-
Defined in: [data-structures/hash/hash-map.ts:
|
|
743
|
+
Defined in: [data-structures/hash/hash-map.ts:805](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L805)
|
|
744
744
|
|
|
745
745
|
Whether there are no entries.
|
|
746
746
|
|
|
@@ -792,7 +792,7 @@ Time O(n), Space O(1)
|
|
|
792
792
|
map<MK, MV>(callback, thisArg?): LinkedHashMap<MK, MV>;
|
|
793
793
|
```
|
|
794
794
|
|
|
795
|
-
Defined in: [data-structures/hash/hash-map.ts:
|
|
795
|
+
Defined in: [data-structures/hash/hash-map.ts:843](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L843)
|
|
796
796
|
|
|
797
797
|
Map each entry to a new [key, value] pair and preserve order.
|
|
798
798
|
|
|
@@ -912,7 +912,7 @@ Time O(n), Space O(1)
|
|
|
912
912
|
reverseBegin(): Generator<(K | V | undefined)[], void, unknown>;
|
|
913
913
|
```
|
|
914
914
|
|
|
915
|
-
Defined in: [data-structures/hash/hash-map.ts:
|
|
915
|
+
Defined in: [data-structures/hash/hash-map.ts:648](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L648)
|
|
916
916
|
|
|
917
917
|
Iterate from tail → head.
|
|
918
918
|
|
|
@@ -934,7 +934,7 @@ Time O(N), Space O(1)
|
|
|
934
934
|
set(key, value?): this;
|
|
935
935
|
```
|
|
936
936
|
|
|
937
|
-
Defined in: [data-structures/hash/hash-map.ts:
|
|
937
|
+
Defined in: [data-structures/hash/hash-map.ts:663](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L663)
|
|
938
938
|
|
|
939
939
|
Insert or replace a single entry; preserves insertion order.
|
|
940
940
|
|
|
@@ -1091,7 +1091,7 @@ Time O(n), Space O(1)
|
|
|
1091
1091
|
protected _getIterator(): IterableIterator<[K, V]>;
|
|
1092
1092
|
```
|
|
1093
1093
|
|
|
1094
|
-
Defined in: [data-structures/hash/hash-map.ts:
|
|
1094
|
+
Defined in: [data-structures/hash/hash-map.ts:867](https://github.com/zrwusa/data-structure-typed/blob/main/src/data-structures/hash/hash-map.ts#L867)
|
|
1095
1095
|
|
|
1096
1096
|
Underlying iterator for the default iteration protocol.
|
|
1097
1097
|
|