data-structure-typed 1.16.1 → 1.17.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.
- package/README.md +1 -1
- package/dist/data-structures/linked-list/doubly-linked-list.d.ts +178 -70
- package/dist/data-structures/linked-list/doubly-linked-list.js +475 -244
- package/dist/data-structures/linked-list/index.d.ts +1 -0
- package/dist/data-structures/linked-list/index.js +1 -0
- package/dist/data-structures/linked-list/singly-linked-list.d.ts +111 -248
- package/dist/data-structures/linked-list/singly-linked-list.js +338 -619
- package/dist/data-structures/linked-list/skip-linked-list.d.ts +2 -1
- package/dist/data-structures/linked-list/skip-linked-list.js +7 -0
- package/dist/data-structures/matrix/vector2d.js +2 -2
- package/dist/data-structures/types/binary-tree.d.ts +0 -5
- package/docs/assets/search.js +1 -1
- package/docs/classes/AVLTree.html +94 -94
- package/docs/classes/AVLTreeNode.html +37 -37
- package/docs/classes/AaTree.html +2 -2
- package/docs/classes/AbstractEdge.html +12 -12
- package/docs/classes/AbstractGraph.html +30 -30
- package/docs/classes/AbstractVertex.html +7 -7
- package/docs/classes/ArrayDeque.html +15 -15
- package/docs/classes/BST.html +87 -87
- package/docs/classes/BSTNode.html +37 -37
- package/docs/classes/BTree.html +2 -2
- package/docs/classes/BinaryIndexedTree.html +8 -8
- package/docs/classes/BinaryTree.html +83 -83
- package/docs/classes/BinaryTreeNode.html +37 -37
- package/docs/classes/Character.html +5 -5
- package/docs/classes/CoordinateMap.html +11 -11
- package/docs/classes/CoordinateSet.html +10 -10
- package/docs/classes/Deque.html +564 -356
- package/docs/classes/DirectedEdge.html +18 -18
- package/docs/classes/DirectedGraph.html +42 -42
- package/docs/classes/DirectedVertex.html +7 -7
- package/docs/classes/DoublyLinkedList.html +546 -313
- package/docs/classes/DoublyLinkedListNode.html +53 -36
- package/docs/classes/Heap.html +21 -21
- package/docs/classes/HeapItem.html +9 -9
- package/docs/classes/Matrix2D.html +17 -17
- package/docs/classes/MatrixNTI2D.html +5 -5
- package/docs/classes/MaxHeap.html +21 -21
- package/docs/classes/MaxPriorityQueue.html +35 -35
- package/docs/classes/MinHeap.html +21 -21
- package/docs/classes/MinPriorityQueue.html +35 -35
- package/docs/classes/Navigator.html +11 -11
- package/docs/classes/ObjectDeque.html +26 -26
- package/docs/classes/PriorityQueue.html +33 -33
- package/docs/classes/Queue.html +15 -15
- package/docs/classes/RBTree.html +2 -2
- package/docs/classes/SegmentTree.html +13 -13
- package/docs/classes/SegmentTreeNode.html +27 -27
- package/docs/classes/SinglyLinkedList.html +277 -606
- package/docs/classes/SinglyLinkedListNode.html +40 -167
- package/docs/classes/SkipLinkedList.html +150 -0
- package/docs/classes/SplayTree.html +2 -2
- package/docs/classes/Stack.html +13 -13
- package/docs/classes/TreeMultiSet.html +87 -87
- package/docs/classes/TreeNode.html +9 -9
- package/docs/classes/Trie.html +14 -14
- package/docs/classes/TrieNode.html +12 -12
- package/docs/classes/TwoThreeTree.html +2 -2
- package/docs/classes/UndirectedEdge.html +14 -14
- package/docs/classes/UndirectedGraph.html +36 -36
- package/docs/classes/UndirectedVertex.html +7 -7
- package/docs/classes/Vector2D.html +29 -29
- package/docs/enums/CP.html +5 -5
- package/docs/enums/FamilyPosition.html +5 -5
- package/docs/enums/LoopType.html +4 -4
- package/docs/index.html +3 -3
- package/docs/interfaces/AVLTreeDeleted.html +4 -4
- package/docs/interfaces/HeapOptions.html +3 -3
- package/docs/interfaces/IDirectedGraph.html +8 -8
- package/docs/interfaces/IGraph.html +20 -20
- package/docs/interfaces/NavigatorParams.html +6 -6
- package/docs/interfaces/PriorityQueueOptions.html +5 -5
- package/docs/modules.html +2 -2
- package/docs/types/BSTComparator.html +2 -2
- package/docs/types/BSTDeletedResult.html +2 -2
- package/docs/types/BinaryTreeDeleted.html +2 -2
- package/docs/types/BinaryTreeNodeId.html +2 -2
- package/docs/types/BinaryTreeNodePropertyName.html +2 -2
- package/docs/types/DFSOrderPattern.html +2 -2
- package/docs/types/DijkstraResult.html +2 -2
- package/docs/types/Direction.html +2 -2
- package/docs/types/DoublyLinkedListGetBy.html +2 -2
- package/docs/types/NodeOrPropertyName.html +2 -2
- package/docs/types/PriorityQueueComparator.html +2 -2
- package/docs/types/PriorityQueueDFSOrderPattern.html +2 -2
- package/docs/types/ResultByProperty.html +2 -2
- package/docs/types/ResultsByProperty.html +2 -2
- package/docs/types/SegmentTreeNodeVal.html +2 -2
- package/docs/types/SpecifyOptional.html +2 -2
- package/docs/types/Thunk.html +2 -2
- package/docs/types/ToThunkFn.html +2 -2
- package/docs/types/TopologicalStatus.html +2 -2
- package/docs/types/TreeMultiSetDeletedResult.html +2 -2
- package/docs/types/TrlAsyncFn.html +2 -2
- package/docs/types/TrlFn.html +2 -2
- package/docs/types/Turning.html +2 -2
- package/docs/types/VertexId.html +2 -2
- package/package.json +1 -3
- package/docs/interfaces/BinaryTreeNodeObj.html +0 -168
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<ul class="tsd-hierarchy">
|
|
28
28
|
<li><a href="Deque.html" class="tsd-signature-type tsd-kind-class">Deque</a></li></ul></li></ul></section><aside class="tsd-sources">
|
|
29
29
|
<ul>
|
|
30
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
30
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/doubly-linked-list.ts#L52">src/data-structures/linked-list/doubly-linked-list.ts:52</a></li></ul></aside>
|
|
31
31
|
<section class="tsd-panel-group tsd-index-group">
|
|
32
32
|
<section class="tsd-panel tsd-index-panel">
|
|
33
33
|
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
|
@@ -39,32 +39,43 @@
|
|
|
39
39
|
</div></section>
|
|
40
40
|
<section class="tsd-index-section">
|
|
41
41
|
<h3 class="tsd-index-heading">Properties</h3>
|
|
42
|
-
<div class="tsd-index-list"><a href="DoublyLinkedList.html#
|
|
43
|
-
<a href="DoublyLinkedList.html#
|
|
44
|
-
<a href="DoublyLinkedList.html#
|
|
42
|
+
<div class="tsd-index-list"><a href="DoublyLinkedList.html#_head" class="tsd-index-link tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-1024"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)"></path></g></svg><span>_head</span></a>
|
|
43
|
+
<a href="DoublyLinkedList.html#_length" class="tsd-index-link tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_length</span></a>
|
|
44
|
+
<a href="DoublyLinkedList.html#_tail" class="tsd-index-link tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_tail</span></a>
|
|
45
45
|
</div></section>
|
|
46
46
|
<section class="tsd-index-section">
|
|
47
47
|
<h3 class="tsd-index-heading">Accessors</h3>
|
|
48
|
-
<div class="tsd-index-list"><a href="DoublyLinkedList.html#
|
|
49
|
-
<a href="DoublyLinkedList.html#
|
|
50
|
-
<a href="DoublyLinkedList.html#
|
|
48
|
+
<div class="tsd-index-list"><a href="DoublyLinkedList.html#head" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-262144"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)"></path></g></svg><span>head</span></a>
|
|
49
|
+
<a href="DoublyLinkedList.html#length" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>length</span></a>
|
|
50
|
+
<a href="DoublyLinkedList.html#tail" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>tail</span></a>
|
|
51
51
|
</div></section>
|
|
52
52
|
<section class="tsd-index-section">
|
|
53
53
|
<h3 class="tsd-index-heading">Methods</h3>
|
|
54
|
-
<div class="tsd-index-list"><a href="DoublyLinkedList.html#
|
|
55
|
-
<a href="DoublyLinkedList.html#
|
|
56
|
-
<a href="DoublyLinkedList.html#
|
|
57
|
-
<a href="DoublyLinkedList.html#
|
|
58
|
-
<a href="DoublyLinkedList.html#
|
|
59
|
-
<a href="DoublyLinkedList.html#
|
|
60
|
-
<a href="DoublyLinkedList.html#
|
|
61
|
-
<a href="DoublyLinkedList.html#
|
|
62
|
-
<a href="DoublyLinkedList.html#
|
|
63
|
-
<a href="DoublyLinkedList.html#
|
|
64
|
-
<a href="DoublyLinkedList.html#
|
|
65
|
-
<a href="DoublyLinkedList.html#
|
|
66
|
-
<a href="DoublyLinkedList.html#
|
|
67
|
-
<a href="DoublyLinkedList.html#
|
|
54
|
+
<div class="tsd-index-list"><a href="DoublyLinkedList.html#clear" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-2048"><rect fill="var(--color-icon-background)" stroke="#FF4DB8" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)"></path></g></svg><span>clear</span></a>
|
|
55
|
+
<a href="DoublyLinkedList.html#delete" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>delete</span></a>
|
|
56
|
+
<a href="DoublyLinkedList.html#deleteAt" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>delete<wbr/>At</span></a>
|
|
57
|
+
<a href="DoublyLinkedList.html#filter" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>filter</span></a>
|
|
58
|
+
<a href="DoublyLinkedList.html#find" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>find</span></a>
|
|
59
|
+
<a href="DoublyLinkedList.html#findLast" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>find<wbr/>Last</span></a>
|
|
60
|
+
<a href="DoublyLinkedList.html#findNode" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>find<wbr/>Node</span></a>
|
|
61
|
+
<a href="DoublyLinkedList.html#forEach" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>for<wbr/>Each</span></a>
|
|
62
|
+
<a href="DoublyLinkedList.html#getAt" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>At</span></a>
|
|
63
|
+
<a href="DoublyLinkedList.html#getLength" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Length</span></a>
|
|
64
|
+
<a href="DoublyLinkedList.html#getNodeAt" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Node<wbr/>At</span></a>
|
|
65
|
+
<a href="DoublyLinkedList.html#indexOf" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>index<wbr/>Of</span></a>
|
|
66
|
+
<a href="DoublyLinkedList.html#insertAfter" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>insert<wbr/>After</span></a>
|
|
67
|
+
<a href="DoublyLinkedList.html#insertAt" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>insert<wbr/>At</span></a>
|
|
68
|
+
<a href="DoublyLinkedList.html#insertBefore" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>insert<wbr/>Before</span></a>
|
|
69
|
+
<a href="DoublyLinkedList.html#map" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>map</span></a>
|
|
70
|
+
<a href="DoublyLinkedList.html#pop" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>pop</span></a>
|
|
71
|
+
<a href="DoublyLinkedList.html#push" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>push</span></a>
|
|
72
|
+
<a href="DoublyLinkedList.html#reduce" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>reduce</span></a>
|
|
73
|
+
<a href="DoublyLinkedList.html#reverse" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>reverse</span></a>
|
|
74
|
+
<a href="DoublyLinkedList.html#shift" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>shift</span></a>
|
|
75
|
+
<a href="DoublyLinkedList.html#toArray" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>to<wbr/>Array</span></a>
|
|
76
|
+
<a href="DoublyLinkedList.html#toArrayReverse" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>to<wbr/>Array<wbr/>Reverse</span></a>
|
|
77
|
+
<a href="DoublyLinkedList.html#unshift" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>unshift</span></a>
|
|
78
|
+
<a href="DoublyLinkedList.html#fromArray" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>from<wbr/>Array</span></a>
|
|
68
79
|
</div></section></div></details></section></section>
|
|
69
80
|
<section class="tsd-panel-group tsd-member-group">
|
|
70
81
|
<h2>Constructors</h2>
|
|
@@ -73,534 +84,745 @@
|
|
|
73
84
|
<ul class="tsd-signatures">
|
|
74
85
|
<li class="tsd-signature tsd-anchor-link" id="constructor.new_DoublyLinkedList"><span class="tsd-kind-constructor-signature">new <wbr/>Doubly<wbr/>Linked<wbr/>List</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="DoublyLinkedList.html" class="tsd-signature-type tsd-kind-class">DoublyLinkedList</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span><a href="#constructor.new_DoublyLinkedList" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
75
86
|
<li class="tsd-description">
|
|
87
|
+
<div class="tsd-comment tsd-typography"><p>The constructor initializes the linked list with an empty head, tail, and length.</p>
|
|
88
|
+
</div>
|
|
76
89
|
<section class="tsd-panel">
|
|
77
90
|
<h4>Type Parameters</h4>
|
|
78
91
|
<ul class="tsd-type-parameter-list">
|
|
79
92
|
<li>
|
|
80
93
|
<h4><span class="tsd-kind-type-parameter">T</span></h4></li></ul></section>
|
|
81
|
-
<h4 class="tsd-returns-title">Returns <a href="DoublyLinkedList.html" class="tsd-signature-type tsd-kind-class">DoublyLinkedList</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span></h4
|
|
94
|
+
<h4 class="tsd-returns-title">Returns <a href="DoublyLinkedList.html" class="tsd-signature-type tsd-kind-class">DoublyLinkedList</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span></h4>
|
|
95
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
82
96
|
<ul>
|
|
83
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
97
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/doubly-linked-list.ts#L57">src/data-structures/linked-list/doubly-linked-list.ts:57</a></li></ul></aside></li></ul></section></section>
|
|
84
98
|
<section class="tsd-panel-group tsd-member-group">
|
|
85
99
|
<h2>Properties</h2>
|
|
86
|
-
<section class="tsd-panel tsd-member tsd-is-
|
|
87
|
-
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-
|
|
88
|
-
<div class="tsd-signature"><span class="tsd-kind-property">
|
|
100
|
+
<section class="tsd-panel tsd-member tsd-is-private"><a id="_head" class="tsd-anchor"></a>
|
|
101
|
+
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>_head</span><a href="#_head" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
102
|
+
<div class="tsd-signature"><span class="tsd-kind-property">_head</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="DoublyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">DoublyLinkedListNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span></div><aside class="tsd-sources">
|
|
89
103
|
<ul>
|
|
90
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
91
|
-
<section class="tsd-panel tsd-member tsd-is-
|
|
92
|
-
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-
|
|
93
|
-
<div class="tsd-signature"><span class="tsd-kind-property">
|
|
104
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/doubly-linked-list.ts#L63">src/data-structures/linked-list/doubly-linked-list.ts:63</a></li></ul></aside></section>
|
|
105
|
+
<section class="tsd-panel tsd-member tsd-is-private"><a id="_length" class="tsd-anchor"></a>
|
|
106
|
+
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>_length</span><a href="#_length" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
107
|
+
<div class="tsd-signature"><span class="tsd-kind-property">_length</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources">
|
|
94
108
|
<ul>
|
|
95
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
96
|
-
<section class="tsd-panel tsd-member tsd-is-
|
|
97
|
-
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-
|
|
98
|
-
<div class="tsd-signature"><span class="tsd-kind-property">
|
|
109
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/doubly-linked-list.ts#L83">src/data-structures/linked-list/doubly-linked-list.ts:83</a></li></ul></aside></section>
|
|
110
|
+
<section class="tsd-panel tsd-member tsd-is-private"><a id="_tail" class="tsd-anchor"></a>
|
|
111
|
+
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>_tail</span><a href="#_tail" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
112
|
+
<div class="tsd-signature"><span class="tsd-kind-property">_tail</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="DoublyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">DoublyLinkedListNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span></div><aside class="tsd-sources">
|
|
99
113
|
<ul>
|
|
100
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
114
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/doubly-linked-list.ts#L73">src/data-structures/linked-list/doubly-linked-list.ts:73</a></li></ul></aside></section></section>
|
|
101
115
|
<section class="tsd-panel-group tsd-member-group">
|
|
102
116
|
<h2>Accessors</h2>
|
|
103
|
-
<section class="tsd-panel tsd-member"><a id="
|
|
104
|
-
<h3 class="tsd-anchor-link"><span>
|
|
117
|
+
<section class="tsd-panel tsd-member"><a id="head" class="tsd-anchor"></a>
|
|
118
|
+
<h3 class="tsd-anchor-link"><span>head</span><a href="#head" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
105
119
|
<ul class="tsd-signatures">
|
|
106
|
-
<li class="tsd-signature" id="
|
|
120
|
+
<li class="tsd-signature" id="head.head-1"><span class="tsd-signature-symbol">get</span> head<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="DoublyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">DoublyLinkedListNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span></li>
|
|
107
121
|
<li class="tsd-description">
|
|
108
122
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="DoublyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">DoublyLinkedListNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources">
|
|
109
123
|
<ul>
|
|
110
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
111
|
-
<li class="tsd-signature" id="
|
|
124
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/doubly-linked-list.ts#L65">src/data-structures/linked-list/doubly-linked-list.ts:65</a></li></ul></aside></li>
|
|
125
|
+
<li class="tsd-signature" id="head.head-2"><span class="tsd-signature-symbol">set</span> head<span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
112
126
|
<li class="tsd-description">
|
|
113
127
|
<div class="tsd-parameters">
|
|
114
128
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
115
129
|
<ul class="tsd-parameter-list">
|
|
116
130
|
<li>
|
|
117
|
-
<h5><span class="tsd-kind-parameter">
|
|
131
|
+
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="DoublyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">DoublyLinkedListNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span></h5></li></ul></div>
|
|
118
132
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
119
133
|
<ul>
|
|
120
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
121
|
-
<section class="tsd-panel tsd-member"><a id="
|
|
122
|
-
<h3 class="tsd-anchor-link"><span>
|
|
134
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/doubly-linked-list.ts#L69">src/data-structures/linked-list/doubly-linked-list.ts:69</a></li></ul></aside></li></ul></section>
|
|
135
|
+
<section class="tsd-panel tsd-member"><a id="length" class="tsd-anchor"></a>
|
|
136
|
+
<h3 class="tsd-anchor-link"><span>length</span><a href="#length" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
123
137
|
<ul class="tsd-signatures">
|
|
124
|
-
<li class="tsd-signature" id="
|
|
138
|
+
<li class="tsd-signature" id="length.length-1"><span class="tsd-signature-symbol">get</span> length<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
|
|
125
139
|
<li class="tsd-description">
|
|
126
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">
|
|
140
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
127
141
|
<ul>
|
|
128
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
129
|
-
<li class="tsd-signature" id="
|
|
142
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/doubly-linked-list.ts#L85">src/data-structures/linked-list/doubly-linked-list.ts:85</a></li></ul></aside></li>
|
|
143
|
+
<li class="tsd-signature" id="length.length-2"><span class="tsd-signature-symbol">set</span> length<span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
130
144
|
<li class="tsd-description">
|
|
131
145
|
<div class="tsd-parameters">
|
|
132
146
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
133
147
|
<ul class="tsd-parameter-list">
|
|
134
148
|
<li>
|
|
135
|
-
<h5><span class="tsd-kind-parameter">
|
|
149
|
+
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
|
136
150
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
137
151
|
<ul>
|
|
138
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
139
|
-
<section class="tsd-panel tsd-member"><a id="
|
|
140
|
-
<h3 class="tsd-anchor-link"><span>
|
|
152
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/doubly-linked-list.ts#L89">src/data-structures/linked-list/doubly-linked-list.ts:89</a></li></ul></aside></li></ul></section>
|
|
153
|
+
<section class="tsd-panel tsd-member"><a id="tail" class="tsd-anchor"></a>
|
|
154
|
+
<h3 class="tsd-anchor-link"><span>tail</span><a href="#tail" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
141
155
|
<ul class="tsd-signatures">
|
|
142
|
-
<li class="tsd-signature" id="
|
|
156
|
+
<li class="tsd-signature" id="tail.tail-1"><span class="tsd-signature-symbol">get</span> tail<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="DoublyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">DoublyLinkedListNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span></li>
|
|
143
157
|
<li class="tsd-description">
|
|
144
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">
|
|
158
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="DoublyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">DoublyLinkedListNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources">
|
|
145
159
|
<ul>
|
|
146
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
147
|
-
<li class="tsd-signature" id="
|
|
160
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/doubly-linked-list.ts#L75">src/data-structures/linked-list/doubly-linked-list.ts:75</a></li></ul></aside></li>
|
|
161
|
+
<li class="tsd-signature" id="tail.tail-2"><span class="tsd-signature-symbol">set</span> tail<span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
148
162
|
<li class="tsd-description">
|
|
149
163
|
<div class="tsd-parameters">
|
|
150
164
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
151
165
|
<ul class="tsd-parameter-list">
|
|
152
166
|
<li>
|
|
153
|
-
<h5><span class="tsd-kind-parameter">
|
|
167
|
+
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="DoublyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">DoublyLinkedListNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span></h5></li></ul></div>
|
|
154
168
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
155
169
|
<ul>
|
|
156
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
170
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/doubly-linked-list.ts#L79">src/data-structures/linked-list/doubly-linked-list.ts:79</a></li></ul></aside></li></ul></section></section>
|
|
157
171
|
<section class="tsd-panel-group tsd-member-group">
|
|
158
172
|
<h2>Methods</h2>
|
|
159
|
-
<section class="tsd-panel tsd-member"><a id="
|
|
160
|
-
<h3 class="tsd-anchor-link"><span>
|
|
173
|
+
<section class="tsd-panel tsd-member"><a id="clear" class="tsd-anchor"></a>
|
|
174
|
+
<h3 class="tsd-anchor-link"><span>clear</span><a href="#clear" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
161
175
|
<ul class="tsd-signatures">
|
|
162
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
176
|
+
<li class="tsd-signature tsd-anchor-link" id="clear.clear-1"><span class="tsd-kind-call-signature">clear</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#clear.clear-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
163
177
|
<li class="tsd-description">
|
|
164
|
-
<div class="tsd-comment tsd-typography"><p>The function
|
|
178
|
+
<div class="tsd-comment tsd-typography"><p>The <code>clear</code> function resets the linked list by setting the head, tail, and length to null and 0 respectively.</p>
|
|
179
|
+
</div>
|
|
180
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
181
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
182
|
+
<ul>
|
|
183
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/doubly-linked-list.ts#L341">src/data-structures/linked-list/doubly-linked-list.ts:341</a></li></ul></aside></li></ul></section>
|
|
184
|
+
<section class="tsd-panel tsd-member"><a id="delete" class="tsd-anchor"></a>
|
|
185
|
+
<h3 class="tsd-anchor-link"><span>delete</span><a href="#delete" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
186
|
+
<ul class="tsd-signatures">
|
|
187
|
+
<li class="tsd-signature tsd-anchor-link" id="delete.delete-1"><span class="tsd-kind-call-signature">delete</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">valOrNode</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#delete.delete-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
188
|
+
<li class="tsd-description">
|
|
189
|
+
<div class="tsd-comment tsd-typography"><p>The <code>delete</code> function removes a node from a doubly linked list based on either the node itself or its value.</p>
|
|
165
190
|
</div>
|
|
166
191
|
<div class="tsd-parameters">
|
|
167
192
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
168
193
|
<ul class="tsd-parameter-list">
|
|
169
194
|
<li>
|
|
170
|
-
<h5><span class="tsd-kind-parameter">
|
|
171
|
-
<div class="tsd-comment tsd-typography"><p>The <code>
|
|
172
|
-
|
|
195
|
+
<h5><span class="tsd-kind-parameter">valOrNode</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
196
|
+
<div class="tsd-comment tsd-typography"><p>The <code>valOrNode</code> parameter can accept either a value of type <code>T</code> or
|
|
197
|
+
a <code>DoublyLinkedListNode<T></code> object.</p>
|
|
173
198
|
</div>
|
|
174
199
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
175
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>
|
|
200
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The <code>delete</code> method returns a boolean value. It returns <code>true</code> if the value or node was successfully
|
|
201
|
+
deleted from the doubly linked list, and <code>false</code> if the value or node was not found in the list.</p>
|
|
176
202
|
|
|
177
203
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
178
204
|
<ul>
|
|
179
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
180
|
-
<
|
|
181
|
-
<h3 class="tsd-anchor-link"><span>add<wbr/>Last</span><a href="#addLast" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
182
|
-
<ul class="tsd-signatures">
|
|
183
|
-
<li class="tsd-signature tsd-anchor-link" id="addLast.addLast-1"><span class="tsd-kind-call-signature">add<wbr/>Last</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#addLast.addLast-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
205
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/doubly-linked-list.ts#L289">src/data-structures/linked-list/doubly-linked-list.ts:289</a></li></ul></aside></li>
|
|
206
|
+
<li class="tsd-signature tsd-anchor-link" id="delete.delete-2"><span class="tsd-kind-call-signature">delete</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">valOrNode</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#delete.delete-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
184
207
|
<li class="tsd-description">
|
|
185
|
-
<div class="tsd-comment tsd-typography"><p>The function
|
|
208
|
+
<div class="tsd-comment tsd-typography"><p>The <code>delete</code> function removes a node from a doubly linked list based on either the node itself or its value.</p>
|
|
186
209
|
</div>
|
|
187
210
|
<div class="tsd-parameters">
|
|
188
211
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
189
212
|
<ul class="tsd-parameter-list">
|
|
190
213
|
<li>
|
|
191
|
-
<h5><span class="tsd-kind-parameter">
|
|
192
|
-
<div class="tsd-comment tsd-typography"><p>The <code>
|
|
193
|
-
|
|
214
|
+
<h5><span class="tsd-kind-parameter">valOrNode</span>: <a href="DoublyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">DoublyLinkedListNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span></h5>
|
|
215
|
+
<div class="tsd-comment tsd-typography"><p>The <code>valOrNode</code> parameter can accept either a value of type <code>T</code> or
|
|
216
|
+
a <code>DoublyLinkedListNode<T></code> object.</p>
|
|
194
217
|
</div>
|
|
195
218
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
196
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>a boolean value
|
|
219
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The <code>delete</code> method returns a boolean value. It returns <code>true</code> if the value or node was successfully
|
|
220
|
+
deleted from the doubly linked list, and <code>false</code> if the value or node was not found in the list.</p>
|
|
197
221
|
|
|
198
222
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
199
223
|
<ul>
|
|
200
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
201
|
-
<section class="tsd-panel tsd-member"><a id="
|
|
202
|
-
<h3 class="tsd-anchor-link"><span>
|
|
224
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/doubly-linked-list.ts#L290">src/data-structures/linked-list/doubly-linked-list.ts:290</a></li></ul></aside></li></ul></section>
|
|
225
|
+
<section class="tsd-panel tsd-member"><a id="deleteAt" class="tsd-anchor"></a>
|
|
226
|
+
<h3 class="tsd-anchor-link"><span>delete<wbr/>At</span><a href="#deleteAt" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
203
227
|
<ul class="tsd-signatures">
|
|
204
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
228
|
+
<li class="tsd-signature tsd-anchor-link" id="deleteAt.deleteAt-1"><span class="tsd-kind-call-signature">delete<wbr/>At</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">index</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><a href="#deleteAt.deleteAt-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
205
229
|
<li class="tsd-description">
|
|
206
|
-
<div class="tsd-comment tsd-typography"><p>
|
|
207
|
-
If index = 0; first element in the list is returned.
|
|
208
|
-
If index = 3; fourth element in the list is returned.</p>
|
|
230
|
+
<div class="tsd-comment tsd-typography"><p>The <code>deleteAt</code> function removes an element at a specified index from a linked list and returns the removed element.</p>
|
|
209
231
|
</div>
|
|
210
232
|
<div class="tsd-parameters">
|
|
211
233
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
212
234
|
<ul class="tsd-parameter-list">
|
|
213
235
|
<li>
|
|
214
236
|
<h5><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></h5>
|
|
215
|
-
<div class="tsd-comment tsd-typography"><p>
|
|
237
|
+
<div class="tsd-comment tsd-typography"><p>The index parameter represents the position of the element that needs to be deleted in the
|
|
238
|
+
data structure. It is of type number.</p>
|
|
216
239
|
</div>
|
|
217
240
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
218
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span></h4>
|
|
241
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span></h4><p>The method <code>deleteAt</code> returns the value of the node that was deleted, or <code>null</code> if the index is out of
|
|
242
|
+
bounds.</p>
|
|
243
|
+
|
|
219
244
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
220
245
|
<ul>
|
|
221
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
222
|
-
<
|
|
246
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/doubly-linked-list.ts#L275">src/data-structures/linked-list/doubly-linked-list.ts:275</a></li></ul></aside></li></ul></section>
|
|
247
|
+
<section class="tsd-panel tsd-member"><a id="filter" class="tsd-anchor"></a>
|
|
248
|
+
<h3 class="tsd-anchor-link"><span>filter</span><a href="#filter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
249
|
+
<ul class="tsd-signatures">
|
|
250
|
+
<li class="tsd-signature tsd-anchor-link" id="filter.filter-1"><span class="tsd-kind-call-signature">filter</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="DoublyLinkedList.html" class="tsd-signature-type tsd-kind-class">DoublyLinkedList</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span><a href="#filter.filter-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
223
251
|
<li class="tsd-description">
|
|
224
|
-
<div class="tsd-comment tsd-typography"><p>
|
|
225
|
-
|
|
226
|
-
If index = 3; fourth element in the list is returned.</p>
|
|
252
|
+
<div class="tsd-comment tsd-typography"><p>The <code>filter</code> function iterates through a DoublyLinkedList and returns a new DoublyLinkedList containing only the
|
|
253
|
+
elements that satisfy the given callback function.</p>
|
|
227
254
|
</div>
|
|
228
255
|
<div class="tsd-parameters">
|
|
229
256
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
230
257
|
<ul class="tsd-parameter-list">
|
|
231
258
|
<li>
|
|
232
|
-
<h5><span class="tsd-kind-parameter">
|
|
233
|
-
<div class="tsd-comment tsd-typography"><p>
|
|
259
|
+
<h5><span class="tsd-kind-parameter">callback</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span></h5>
|
|
260
|
+
<div class="tsd-comment tsd-typography"><p>The <code>callback</code> parameter is a function that takes a value of type <code>T</code> and returns a boolean value.
|
|
261
|
+
It is used to determine whether a value should be included in the filtered list or not.</p>
|
|
234
262
|
</div>
|
|
235
|
-
<div class="tsd-comment tsd-typography"></div
|
|
263
|
+
<div class="tsd-comment tsd-typography"></div>
|
|
264
|
+
<ul class="tsd-parameters">
|
|
265
|
+
<li class="tsd-parameter-signature">
|
|
266
|
+
<ul class="tsd-signatures">
|
|
267
|
+
<li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
|
|
268
|
+
<li class="tsd-description">
|
|
269
|
+
<div class="tsd-parameters">
|
|
270
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
271
|
+
<ul class="tsd-parameter-list">
|
|
236
272
|
<li>
|
|
237
|
-
<h5><span class="tsd-kind-parameter">
|
|
238
|
-
<
|
|
239
|
-
</
|
|
240
|
-
|
|
241
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="DoublyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">DoublyLinkedListNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span></h4>
|
|
273
|
+
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5></li></ul></div>
|
|
274
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></li></ul></li></ul></div>
|
|
275
|
+
<h4 class="tsd-returns-title">Returns <a href="DoublyLinkedList.html" class="tsd-signature-type tsd-kind-class">DoublyLinkedList</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span></h4><p>The filtered list, which is an instance of the DoublyLinkedList class.</p>
|
|
276
|
+
|
|
242
277
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
243
278
|
<ul>
|
|
244
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
245
|
-
<
|
|
279
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/doubly-linked-list.ts#L472">src/data-structures/linked-list/doubly-linked-list.ts:472</a></li></ul></aside></li></ul></section>
|
|
280
|
+
<section class="tsd-panel tsd-member"><a id="find" class="tsd-anchor"></a>
|
|
281
|
+
<h3 class="tsd-anchor-link"><span>find</span><a href="#find" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
282
|
+
<ul class="tsd-signatures">
|
|
283
|
+
<li class="tsd-signature tsd-anchor-link" id="find.find-1"><span class="tsd-kind-call-signature">find</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><a href="#find.find-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
246
284
|
<li class="tsd-description">
|
|
247
|
-
<div class="tsd-comment tsd-typography"><p>
|
|
248
|
-
If index = 0; first element in the list is returned.
|
|
249
|
-
If index = 3; fourth element in the list is returned.</p>
|
|
285
|
+
<div class="tsd-comment tsd-typography"><p>The <code>find</code> function iterates through a linked list and returns the first element that satisfies a given condition.</p>
|
|
250
286
|
</div>
|
|
251
287
|
<div class="tsd-parameters">
|
|
252
288
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
253
289
|
<ul class="tsd-parameter-list">
|
|
254
290
|
<li>
|
|
255
|
-
<h5><span class="tsd-kind-parameter">
|
|
256
|
-
<div class="tsd-comment tsd-typography"><p>
|
|
291
|
+
<h5><span class="tsd-kind-parameter">callback</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span></h5>
|
|
292
|
+
<div class="tsd-comment tsd-typography"><p>A function that takes a value of type T as its parameter and returns a boolean value. This
|
|
293
|
+
function is used to determine whether a particular value in the linked list satisfies a certain condition.</p>
|
|
257
294
|
</div>
|
|
258
|
-
<div class="tsd-comment tsd-typography"></div
|
|
295
|
+
<div class="tsd-comment tsd-typography"></div>
|
|
296
|
+
<ul class="tsd-parameters">
|
|
297
|
+
<li class="tsd-parameter-signature">
|
|
298
|
+
<ul class="tsd-signatures">
|
|
299
|
+
<li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
|
|
300
|
+
<li class="tsd-description">
|
|
301
|
+
<div class="tsd-parameters">
|
|
302
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
303
|
+
<ul class="tsd-parameter-list">
|
|
259
304
|
<li>
|
|
260
|
-
<h5><span class="tsd-kind-parameter">
|
|
261
|
-
<
|
|
262
|
-
</
|
|
263
|
-
|
|
264
|
-
|
|
305
|
+
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5></li></ul></div>
|
|
306
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></li></ul></li></ul></div>
|
|
307
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span></h4><p>The method <code>find</code> returns the first element in the linked list that satisfies the condition specified by
|
|
308
|
+
the callback function. If no element satisfies the condition, it returns <code>null</code>.</p>
|
|
309
|
+
|
|
265
310
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
266
311
|
<ul>
|
|
267
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
268
|
-
<section class="tsd-panel tsd-member"><a id="
|
|
269
|
-
<h3 class="tsd-anchor-link"><span>
|
|
312
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/doubly-linked-list.ts#L354">src/data-structures/linked-list/doubly-linked-list.ts:354</a></li></ul></aside></li></ul></section>
|
|
313
|
+
<section class="tsd-panel tsd-member"><a id="findLast" class="tsd-anchor"></a>
|
|
314
|
+
<h3 class="tsd-anchor-link"><span>find<wbr/>Last</span><a href="#findLast" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
270
315
|
<ul class="tsd-signatures">
|
|
271
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
316
|
+
<li class="tsd-signature tsd-anchor-link" id="findLast.findLast-1"><span class="tsd-kind-call-signature">find<wbr/>Last</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><a href="#findLast.findLast-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
272
317
|
<li class="tsd-description">
|
|
273
|
-
<div class="tsd-comment tsd-typography"><p>
|
|
318
|
+
<div class="tsd-comment tsd-typography"><p>The <code>findLast</code> function iterates through a linked list from the last node to the first node and returns the last
|
|
319
|
+
value that satisfies the given callback function, or null if no value satisfies the callback.</p>
|
|
274
320
|
</div>
|
|
275
|
-
<
|
|
321
|
+
<div class="tsd-parameters">
|
|
322
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
323
|
+
<ul class="tsd-parameter-list">
|
|
324
|
+
<li>
|
|
325
|
+
<h5><span class="tsd-kind-parameter">callback</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span></h5>
|
|
326
|
+
<div class="tsd-comment tsd-typography"><p>A function that takes a value of type T as its parameter and returns a boolean value. This
|
|
327
|
+
function is used to determine whether a given value satisfies a certain condition.</p>
|
|
328
|
+
</div>
|
|
329
|
+
<div class="tsd-comment tsd-typography"></div>
|
|
330
|
+
<ul class="tsd-parameters">
|
|
331
|
+
<li class="tsd-parameter-signature">
|
|
332
|
+
<ul class="tsd-signatures">
|
|
333
|
+
<li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
|
|
334
|
+
<li class="tsd-description">
|
|
335
|
+
<div class="tsd-parameters">
|
|
336
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
337
|
+
<ul class="tsd-parameter-list">
|
|
338
|
+
<li>
|
|
339
|
+
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5></li></ul></div>
|
|
340
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></li></ul></li></ul></div>
|
|
341
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span></h4><p>The method <code>findLast</code> returns the last value in the linked list that satisfies the condition specified by
|
|
342
|
+
the callback function. If no value satisfies the condition, it returns <code>null</code>.</p>
|
|
343
|
+
|
|
276
344
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
277
345
|
<ul>
|
|
278
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
279
|
-
<section class="tsd-panel tsd-member"><a id="
|
|
280
|
-
<h3 class="tsd-anchor-link"><span>
|
|
346
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/doubly-linked-list.ts#L393">src/data-structures/linked-list/doubly-linked-list.ts:393</a></li></ul></aside></li></ul></section>
|
|
347
|
+
<section class="tsd-panel tsd-member"><a id="findNode" class="tsd-anchor"></a>
|
|
348
|
+
<h3 class="tsd-anchor-link"><span>find<wbr/>Node</span><a href="#findNode" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
281
349
|
<ul class="tsd-signatures">
|
|
282
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
350
|
+
<li class="tsd-signature tsd-anchor-link" id="findNode.findNode-1"><span class="tsd-kind-call-signature">find<wbr/>Node</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="DoublyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">DoublyLinkedListNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span><a href="#findNode.findNode-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
283
351
|
<li class="tsd-description">
|
|
284
|
-
<div class="tsd-comment tsd-typography"><p>
|
|
352
|
+
<div class="tsd-comment tsd-typography"><p>The function <code>findNodeByValue</code> searches for a node with a specific value in a doubly linked list and returns the
|
|
353
|
+
node if found, otherwise it returns null.</p>
|
|
354
|
+
</div>
|
|
355
|
+
<div class="tsd-parameters">
|
|
356
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
357
|
+
<ul class="tsd-parameter-list">
|
|
358
|
+
<li>
|
|
359
|
+
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
360
|
+
<div class="tsd-comment tsd-typography"><p>The <code>val</code> parameter is the value that we want to search for in the doubly linked list.</p>
|
|
285
361
|
</div>
|
|
286
|
-
<
|
|
362
|
+
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
363
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="DoublyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">DoublyLinkedListNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span></h4><p>The function <code>findNodeByValue</code> returns a <code>DoublyLinkedListNode<T></code> if a node with the specified value <code>val</code>
|
|
364
|
+
is found in the linked list. If no such node is found, it returns <code>null</code>.</p>
|
|
365
|
+
|
|
287
366
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
288
367
|
<ul>
|
|
289
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
290
|
-
<section class="tsd-panel tsd-member"><a id="
|
|
291
|
-
<h3 class="tsd-anchor-link"><span>
|
|
368
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/doubly-linked-list.ts#L224">src/data-structures/linked-list/doubly-linked-list.ts:224</a></li></ul></aside></li></ul></section>
|
|
369
|
+
<section class="tsd-panel tsd-member"><a id="forEach" class="tsd-anchor"></a>
|
|
370
|
+
<h3 class="tsd-anchor-link"><span>for<wbr/>Each</span><a href="#forEach" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
292
371
|
<ul class="tsd-signatures">
|
|
293
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
372
|
+
<li class="tsd-signature tsd-anchor-link" id="forEach.forEach-1"><span class="tsd-kind-call-signature">for<wbr/>Each</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#forEach.forEach-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
294
373
|
<li class="tsd-description">
|
|
295
|
-
<div class="tsd-comment tsd-typography"><p>
|
|
374
|
+
<div class="tsd-comment tsd-typography"><p>The <code>forEach</code> function iterates over each element in a linked list and applies a callback function to each element.</p>
|
|
296
375
|
</div>
|
|
297
|
-
<
|
|
376
|
+
<div class="tsd-parameters">
|
|
377
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
378
|
+
<ul class="tsd-parameter-list">
|
|
379
|
+
<li>
|
|
380
|
+
<h5><span class="tsd-kind-parameter">callback</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span>, <span class="tsd-kind-parameter">index</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></h5>
|
|
381
|
+
<div class="tsd-comment tsd-typography"><p>The callback parameter is a function that takes two arguments: val and index. The val argument
|
|
382
|
+
represents the value of the current node in the linked list, and the index argument represents the index of the
|
|
383
|
+
current node in the linked list.</p>
|
|
384
|
+
</div>
|
|
385
|
+
<div class="tsd-comment tsd-typography"></div>
|
|
386
|
+
<ul class="tsd-parameters">
|
|
387
|
+
<li class="tsd-parameter-signature">
|
|
388
|
+
<ul class="tsd-signatures">
|
|
389
|
+
<li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span>, <span class="tsd-kind-parameter">index</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
390
|
+
<li class="tsd-description">
|
|
391
|
+
<div class="tsd-parameters">
|
|
392
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
393
|
+
<ul class="tsd-parameter-list">
|
|
394
|
+
<li>
|
|
395
|
+
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5></li>
|
|
396
|
+
<li>
|
|
397
|
+
<h5><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
|
398
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div>
|
|
399
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
298
400
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
299
401
|
<ul>
|
|
300
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
301
|
-
<section class="tsd-panel tsd-member"><a id="
|
|
302
|
-
<h3 class="tsd-anchor-link"><span>
|
|
402
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/doubly-linked-list.ts#L437">src/data-structures/linked-list/doubly-linked-list.ts:437</a></li></ul></aside></li></ul></section>
|
|
403
|
+
<section class="tsd-panel tsd-member"><a id="getAt" class="tsd-anchor"></a>
|
|
404
|
+
<h3 class="tsd-anchor-link"><span>get<wbr/>At</span><a href="#getAt" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
303
405
|
<ul class="tsd-signatures">
|
|
304
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
406
|
+
<li class="tsd-signature tsd-anchor-link" id="getAt.getAt-1"><span class="tsd-kind-call-signature">get<wbr/>At</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">index</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><a href="#getAt.getAt-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
305
407
|
<li class="tsd-description">
|
|
306
|
-
<div class="tsd-comment tsd-typography"><p>
|
|
408
|
+
<div class="tsd-comment tsd-typography"><p>The <code>getAt</code> function returns the value at a specified index in a linked list, or null if the index is out of bounds.</p>
|
|
307
409
|
</div>
|
|
308
410
|
<div class="tsd-parameters">
|
|
309
411
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
310
412
|
<ul class="tsd-parameter-list">
|
|
311
413
|
<li>
|
|
312
414
|
<h5><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></h5>
|
|
313
|
-
<div class="tsd-comment tsd-typography"><p>
|
|
314
|
-
|
|
315
|
-
<div class="tsd-comment tsd-typography"></div></li>
|
|
316
|
-
<li>
|
|
317
|
-
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
318
|
-
<div class="tsd-comment tsd-typography"><p>Value of the new node to be inserted</p>
|
|
415
|
+
<div class="tsd-comment tsd-typography"><p>The index parameter is a number that represents the position of the element we want to
|
|
416
|
+
retrieve from the list.</p>
|
|
319
417
|
</div>
|
|
320
418
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
321
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">
|
|
419
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span></h4><p>The method is returning the value at the specified index in the linked list. If the index is out of bounds
|
|
420
|
+
or the linked list is empty, it will return null.</p>
|
|
421
|
+
|
|
322
422
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
323
423
|
<ul>
|
|
324
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
325
|
-
<section class="tsd-panel tsd-member"><a id="
|
|
326
|
-
<h3 class="tsd-anchor-link"><span>
|
|
424
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/doubly-linked-list.ts#L191">src/data-structures/linked-list/doubly-linked-list.ts:191</a></li></ul></aside></li></ul></section>
|
|
425
|
+
<section class="tsd-panel tsd-member"><a id="getLength" class="tsd-anchor"></a>
|
|
426
|
+
<h3 class="tsd-anchor-link"><span>get<wbr/>Length</span><a href="#getLength" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
327
427
|
<ul class="tsd-signatures">
|
|
328
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
428
|
+
<li class="tsd-signature tsd-anchor-link" id="getLength.getLength-1"><span class="tsd-kind-call-signature">get<wbr/>Length</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#getLength.getLength-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
329
429
|
<li class="tsd-description">
|
|
330
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">
|
|
430
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
331
431
|
<ul>
|
|
332
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
333
|
-
<section class="tsd-panel tsd-member"><a id="
|
|
334
|
-
<h3 class="tsd-anchor-link"><span>
|
|
432
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/doubly-linked-list.ts#L107">src/data-structures/linked-list/doubly-linked-list.ts:107</a></li></ul></aside></li></ul></section>
|
|
433
|
+
<section class="tsd-panel tsd-member"><a id="getNodeAt" class="tsd-anchor"></a>
|
|
434
|
+
<h3 class="tsd-anchor-link"><span>get<wbr/>Node<wbr/>At</span><a href="#getNodeAt" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
335
435
|
<ul class="tsd-signatures">
|
|
336
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
436
|
+
<li class="tsd-signature tsd-anchor-link" id="getNodeAt.getNodeAt-1"><span class="tsd-kind-call-signature">get<wbr/>Node<wbr/>At</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">index</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="DoublyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">DoublyLinkedListNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span><a href="#getNodeAt.getNodeAt-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
337
437
|
<li class="tsd-description">
|
|
338
|
-
<div class="tsd-comment tsd-typography"><p>The <code>
|
|
339
|
-
|
|
340
|
-
</div>
|
|
341
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span></h4><p>The method <code>peekFirst</code> returns either the first node of the doubly linked list (<code>DoublyLinkedListNode<T></code>),
|
|
342
|
-
the value of the first node (<code>T</code>), or <code>null</code> depending on the value of the <code>by</code> parameter.</p>
|
|
343
|
-
|
|
344
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
345
|
-
<ul>
|
|
346
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/doubly-linked-list.ts#L145">src/data-structures/linked-list/doubly-linked-list.ts:145</a></li></ul></aside></li>
|
|
347
|
-
<li class="tsd-signature tsd-anchor-link" id="peekFirst.peekFirst-2"><span class="tsd-kind-call-signature">peek<wbr/>First</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">by</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><a href="#peekFirst.peekFirst-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
348
|
-
<li class="tsd-description">
|
|
349
|
-
<div class="tsd-comment tsd-typography"><p>The <code>peekFirst</code> function returns the first node or value in a doubly linked list, depending on the specified
|
|
350
|
-
parameter.</p>
|
|
438
|
+
<div class="tsd-comment tsd-typography"><p>The function <code>getNodeAt</code> returns the node at a given index in a doubly linked list, or null if the index is out of
|
|
439
|
+
range.</p>
|
|
351
440
|
</div>
|
|
352
441
|
<div class="tsd-parameters">
|
|
353
442
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
354
443
|
<ul class="tsd-parameter-list">
|
|
355
444
|
<li>
|
|
356
|
-
<h5><span class="tsd-kind-parameter">
|
|
357
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
358
|
-
|
|
445
|
+
<h5><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></h5>
|
|
446
|
+
<div class="tsd-comment tsd-typography"><p>The <code>index</code> parameter is a number that represents the position of the node we want to
|
|
447
|
+
retrieve from the doubly linked list. It indicates the zero-based index of the node we want to access.</p>
|
|
359
448
|
</div>
|
|
360
449
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
361
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span></h4><p>The method <code>
|
|
362
|
-
|
|
450
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="DoublyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">DoublyLinkedListNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span></h4><p>The method <code>getNodeAt(index: number)</code> returns a <code>DoublyLinkedListNode<T></code> object if the index is within the
|
|
451
|
+
valid range of the linked list, otherwise it returns <code>null</code>.</p>
|
|
363
452
|
|
|
364
453
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
365
454
|
<ul>
|
|
366
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
367
|
-
<
|
|
455
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/doubly-linked-list.ts#L208">src/data-structures/linked-list/doubly-linked-list.ts:208</a></li></ul></aside></li></ul></section>
|
|
456
|
+
<section class="tsd-panel tsd-member"><a id="indexOf" class="tsd-anchor"></a>
|
|
457
|
+
<h3 class="tsd-anchor-link"><span>index<wbr/>Of</span><a href="#indexOf" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
458
|
+
<ul class="tsd-signatures">
|
|
459
|
+
<li class="tsd-signature tsd-anchor-link" id="indexOf.indexOf-1"><span class="tsd-kind-call-signature">index<wbr/>Of</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#indexOf.indexOf-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
368
460
|
<li class="tsd-description">
|
|
369
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
370
|
-
parameter.</p>
|
|
461
|
+
<div class="tsd-comment tsd-typography"><p>The function returns the index of the first occurrence of a given value in a linked list.</p>
|
|
371
462
|
</div>
|
|
372
463
|
<div class="tsd-parameters">
|
|
373
464
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
374
465
|
<ul class="tsd-parameter-list">
|
|
375
466
|
<li>
|
|
376
|
-
<h5><span class="tsd-kind-parameter">
|
|
377
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
378
|
-
|
|
467
|
+
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
468
|
+
<div class="tsd-comment tsd-typography"><p>The parameter <code>val</code> is of type <code>T</code>, which means it can be any data type. It represents the value
|
|
469
|
+
that we are searching for in the linked list.</p>
|
|
379
470
|
</div>
|
|
380
471
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
381
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">
|
|
382
|
-
the value
|
|
472
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>The method <code>indexOf</code> returns the index of the first occurrence of the specified value <code>val</code> in the linked
|
|
473
|
+
list. If the value is not found, it returns -1.</p>
|
|
383
474
|
|
|
384
475
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
385
476
|
<ul>
|
|
386
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
387
|
-
<section class="tsd-panel tsd-member"><a id="
|
|
388
|
-
<h3 class="tsd-anchor-link"><span>
|
|
477
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/doubly-linked-list.ts#L372">src/data-structures/linked-list/doubly-linked-list.ts:372</a></li></ul></aside></li></ul></section>
|
|
478
|
+
<section class="tsd-panel tsd-member"><a id="insertAfter" class="tsd-anchor"></a>
|
|
479
|
+
<h3 class="tsd-anchor-link"><span>insert<wbr/>After</span><a href="#insertAfter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
389
480
|
<ul class="tsd-signatures">
|
|
390
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
481
|
+
<li class="tsd-signature tsd-anchor-link" id="insertAfter.insertAfter-1"><span class="tsd-kind-call-signature">insert<wbr/>After</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">existingValueOrNode</span>, <span class="tsd-kind-parameter">newValue</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#insertAfter.insertAfter-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
391
482
|
<li class="tsd-description">
|
|
392
|
-
<div class="tsd-comment tsd-typography"><p>The <code>
|
|
483
|
+
<div class="tsd-comment tsd-typography"><p>The <code>insertAfter</code> function inserts a new node with a given value after an existing node in a doubly linked list.</p>
|
|
393
484
|
</div>
|
|
394
|
-
<
|
|
485
|
+
<div class="tsd-parameters">
|
|
486
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
487
|
+
<ul class="tsd-parameter-list">
|
|
488
|
+
<li>
|
|
489
|
+
<h5><span class="tsd-kind-parameter">existingValueOrNode</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
490
|
+
<div class="tsd-comment tsd-typography"><p>The existing value or node in the doubly linked list
|
|
491
|
+
after which the new value will be inserted. It can be either the value of the existing node or the existing node
|
|
492
|
+
itself.</p>
|
|
493
|
+
</div>
|
|
494
|
+
<div class="tsd-comment tsd-typography"></div></li>
|
|
495
|
+
<li>
|
|
496
|
+
<h5><span class="tsd-kind-parameter">newValue</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
497
|
+
<div class="tsd-comment tsd-typography"><p>The value that you want to insert into the doubly linked list.</p>
|
|
498
|
+
</div>
|
|
499
|
+
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
500
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The method returns a boolean value. It returns true if the insertion is successful, and false if the
|
|
501
|
+
existing value or node is not found in the doubly linked list.</p>
|
|
395
502
|
|
|
396
503
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
397
504
|
<ul>
|
|
398
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
399
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
505
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/doubly-linked-list.ts#L504">src/data-structures/linked-list/doubly-linked-list.ts:504</a></li></ul></aside></li>
|
|
506
|
+
<li class="tsd-signature tsd-anchor-link" id="insertAfter.insertAfter-2"><span class="tsd-kind-call-signature">insert<wbr/>After</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">existingValueOrNode</span>, <span class="tsd-kind-parameter">newValue</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#insertAfter.insertAfter-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
400
507
|
<li class="tsd-description">
|
|
401
|
-
<div class="tsd-comment tsd-typography"><p>The <code>
|
|
508
|
+
<div class="tsd-comment tsd-typography"><p>The <code>insertAfter</code> function inserts a new node with a given value after an existing node in a doubly linked list.</p>
|
|
402
509
|
</div>
|
|
403
510
|
<div class="tsd-parameters">
|
|
404
511
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
405
512
|
<ul class="tsd-parameter-list">
|
|
406
513
|
<li>
|
|
407
|
-
<h5><span class="tsd-kind-parameter">
|
|
408
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
409
|
-
|
|
410
|
-
|
|
514
|
+
<h5><span class="tsd-kind-parameter">existingValueOrNode</span>: <a href="DoublyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">DoublyLinkedListNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span></h5>
|
|
515
|
+
<div class="tsd-comment tsd-typography"><p>The existing value or node in the doubly linked list
|
|
516
|
+
after which the new value will be inserted. It can be either the value of the existing node or the existing node
|
|
517
|
+
itself.</p>
|
|
518
|
+
</div>
|
|
519
|
+
<div class="tsd-comment tsd-typography"></div></li>
|
|
520
|
+
<li>
|
|
521
|
+
<h5><span class="tsd-kind-parameter">newValue</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
522
|
+
<div class="tsd-comment tsd-typography"><p>The value that you want to insert into the doubly linked list.</p>
|
|
411
523
|
</div>
|
|
412
524
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
413
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">
|
|
525
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The method returns a boolean value. It returns true if the insertion is successful, and false if the
|
|
526
|
+
existing value or node is not found in the doubly linked list.</p>
|
|
414
527
|
|
|
415
528
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
416
529
|
<ul>
|
|
417
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
418
|
-
<
|
|
530
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/doubly-linked-list.ts#L505">src/data-structures/linked-list/doubly-linked-list.ts:505</a></li></ul></aside></li></ul></section>
|
|
531
|
+
<section class="tsd-panel tsd-member"><a id="insertAt" class="tsd-anchor"></a>
|
|
532
|
+
<h3 class="tsd-anchor-link"><span>insert<wbr/>At</span><a href="#insertAt" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
533
|
+
<ul class="tsd-signatures">
|
|
534
|
+
<li class="tsd-signature tsd-anchor-link" id="insertAt.insertAt-1"><span class="tsd-kind-call-signature">insert<wbr/>At</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">index</span>, <span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#insertAt.insertAt-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
419
535
|
<li class="tsd-description">
|
|
420
|
-
<div class="tsd-comment tsd-typography"><p>The <code>
|
|
536
|
+
<div class="tsd-comment tsd-typography"><p>The <code>insert</code> function inserts a value at a specified index in a doubly linked list.</p>
|
|
421
537
|
</div>
|
|
422
538
|
<div class="tsd-parameters">
|
|
423
539
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
424
540
|
<ul class="tsd-parameter-list">
|
|
425
541
|
<li>
|
|
426
|
-
<h5><span class="tsd-kind-parameter">
|
|
427
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
428
|
-
It
|
|
429
|
-
|
|
542
|
+
<h5><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></h5>
|
|
543
|
+
<div class="tsd-comment tsd-typography"><p>The index parameter represents the position at which the new value should be inserted in the
|
|
544
|
+
DoublyLinkedList. It is of type number.</p>
|
|
545
|
+
</div>
|
|
546
|
+
<div class="tsd-comment tsd-typography"></div></li>
|
|
547
|
+
<li>
|
|
548
|
+
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
549
|
+
<div class="tsd-comment tsd-typography"><p>The <code>val</code> parameter represents the value that you want to insert into the Doubly Linked List at the
|
|
550
|
+
specified index.</p>
|
|
430
551
|
</div>
|
|
431
552
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
432
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">
|
|
553
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The <code>insert</code> method returns a boolean value. It returns <code>true</code> if the insertion is successful, and <code>false</code>
|
|
554
|
+
if the index is out of bounds.</p>
|
|
433
555
|
|
|
434
556
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
435
557
|
<ul>
|
|
436
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
437
|
-
<section class="tsd-panel tsd-member"><a id="
|
|
438
|
-
<h3 class="tsd-anchor-link"><span>
|
|
558
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/doubly-linked-list.ts#L246">src/data-structures/linked-list/doubly-linked-list.ts:246</a></li></ul></aside></li></ul></section>
|
|
559
|
+
<section class="tsd-panel tsd-member"><a id="insertBefore" class="tsd-anchor"></a>
|
|
560
|
+
<h3 class="tsd-anchor-link"><span>insert<wbr/>Before</span><a href="#insertBefore" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
439
561
|
<ul class="tsd-signatures">
|
|
440
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
562
|
+
<li class="tsd-signature tsd-anchor-link" id="insertBefore.insertBefore-1"><span class="tsd-kind-call-signature">insert<wbr/>Before</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">existingValueOrNode</span>, <span class="tsd-kind-parameter">newValue</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#insertBefore.insertBefore-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
441
563
|
<li class="tsd-description">
|
|
442
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
443
|
-
value, depending on the specified parameter.</p>
|
|
564
|
+
<div class="tsd-comment tsd-typography"><p>The <code>insertBefore</code> function inserts a new value before an existing value or node in a doubly linked list.</p>
|
|
444
565
|
</div>
|
|
445
|
-
<
|
|
446
|
-
|
|
447
|
-
|
|
566
|
+
<div class="tsd-parameters">
|
|
567
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
568
|
+
<ul class="tsd-parameter-list">
|
|
569
|
+
<li>
|
|
570
|
+
<h5><span class="tsd-kind-parameter">existingValueOrNode</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
571
|
+
<div class="tsd-comment tsd-typography"><p>The existing value or node in the doubly linked list
|
|
572
|
+
before which the new value will be inserted. It can be either the value of the existing node or the existing node
|
|
573
|
+
itself.</p>
|
|
574
|
+
</div>
|
|
575
|
+
<div class="tsd-comment tsd-typography"></div></li>
|
|
576
|
+
<li>
|
|
577
|
+
<h5><span class="tsd-kind-parameter">newValue</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
578
|
+
<div class="tsd-comment tsd-typography"><p>The <code>newValue</code> parameter represents the value that you want to insert into the doubly linked
|
|
579
|
+
list.</p>
|
|
580
|
+
</div>
|
|
581
|
+
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
582
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The method returns a boolean value. It returns <code>true</code> if the insertion is successful, and <code>false</code> if the
|
|
583
|
+
insertion fails.</p>
|
|
448
584
|
|
|
449
585
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
450
586
|
<ul>
|
|
451
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
452
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
587
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/doubly-linked-list.ts#L542">src/data-structures/linked-list/doubly-linked-list.ts:542</a></li></ul></aside></li>
|
|
588
|
+
<li class="tsd-signature tsd-anchor-link" id="insertBefore.insertBefore-2"><span class="tsd-kind-call-signature">insert<wbr/>Before</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">existingValueOrNode</span>, <span class="tsd-kind-parameter">newValue</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#insertBefore.insertBefore-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
453
589
|
<li class="tsd-description">
|
|
454
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
455
|
-
value, depending on the specified parameter.</p>
|
|
590
|
+
<div class="tsd-comment tsd-typography"><p>The <code>insertBefore</code> function inserts a new value before an existing value or node in a doubly linked list.</p>
|
|
456
591
|
</div>
|
|
457
592
|
<div class="tsd-parameters">
|
|
458
593
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
459
594
|
<ul class="tsd-parameter-list">
|
|
460
595
|
<li>
|
|
461
|
-
<h5><span class="tsd-kind-parameter">
|
|
462
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
463
|
-
|
|
464
|
-
|
|
596
|
+
<h5><span class="tsd-kind-parameter">existingValueOrNode</span>: <a href="DoublyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">DoublyLinkedListNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span></h5>
|
|
597
|
+
<div class="tsd-comment tsd-typography"><p>The existing value or node in the doubly linked list
|
|
598
|
+
before which the new value will be inserted. It can be either the value of the existing node or the existing node
|
|
599
|
+
itself.</p>
|
|
600
|
+
</div>
|
|
601
|
+
<div class="tsd-comment tsd-typography"></div></li>
|
|
602
|
+
<li>
|
|
603
|
+
<h5><span class="tsd-kind-parameter">newValue</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
604
|
+
<div class="tsd-comment tsd-typography"><p>The <code>newValue</code> parameter represents the value that you want to insert into the doubly linked
|
|
605
|
+
list.</p>
|
|
465
606
|
</div>
|
|
466
607
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
467
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">
|
|
468
|
-
|
|
469
|
-
is set to 'node', the method returns the first node. If <code>by</code> is set to 'val', the method returns the value</p>
|
|
608
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The method returns a boolean value. It returns <code>true</code> if the insertion is successful, and <code>false</code> if the
|
|
609
|
+
insertion fails.</p>
|
|
470
610
|
|
|
471
611
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
472
612
|
<ul>
|
|
473
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
474
|
-
<
|
|
613
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/doubly-linked-list.ts#L543">src/data-structures/linked-list/doubly-linked-list.ts:543</a></li></ul></aside></li></ul></section>
|
|
614
|
+
<section class="tsd-panel tsd-member"><a id="map" class="tsd-anchor"></a>
|
|
615
|
+
<h3 class="tsd-anchor-link"><span>map</span><a href="#map" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
616
|
+
<ul class="tsd-signatures">
|
|
617
|
+
<li class="tsd-signature tsd-anchor-link" id="map.map-1"><span class="tsd-kind-call-signature">map</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">U</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="DoublyLinkedList.html" class="tsd-signature-type tsd-kind-class">DoublyLinkedList</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">U</span><span class="tsd-signature-symbol">></span><a href="#map.map-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
475
618
|
<li class="tsd-description">
|
|
476
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
477
|
-
|
|
619
|
+
<div class="tsd-comment tsd-typography"><p>The <code>map</code> function takes a callback function and applies it to each element in the DoublyLinkedList, returning a new
|
|
620
|
+
DoublyLinkedList with the transformed values.</p>
|
|
478
621
|
</div>
|
|
622
|
+
<section class="tsd-panel">
|
|
623
|
+
<h4>Type Parameters</h4>
|
|
624
|
+
<ul class="tsd-type-parameter-list">
|
|
625
|
+
<li>
|
|
626
|
+
<h4><span class="tsd-kind-type-parameter">U</span></h4></li></ul></section>
|
|
479
627
|
<div class="tsd-parameters">
|
|
480
628
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
481
629
|
<ul class="tsd-parameter-list">
|
|
482
630
|
<li>
|
|
483
|
-
<h5><span class="tsd-kind-parameter">
|
|
484
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
</div>
|
|
488
|
-
<div class="tsd-comment tsd-typography"></div
|
|
489
|
-
<
|
|
490
|
-
|
|
491
|
-
|
|
631
|
+
<h5><span class="tsd-kind-parameter">callback</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type tsd-kind-type-parameter">U</span><span class="tsd-signature-symbol">)</span></h5>
|
|
632
|
+
<div class="tsd-comment tsd-typography"><p>The callback parameter is a function that takes a value of type T (the type of values stored in
|
|
633
|
+
the original DoublyLinkedList) and returns a value of type U (the type of values that will be stored in the mapped
|
|
634
|
+
DoublyLinkedList).</p>
|
|
635
|
+
</div>
|
|
636
|
+
<div class="tsd-comment tsd-typography"></div>
|
|
637
|
+
<ul class="tsd-parameters">
|
|
638
|
+
<li class="tsd-parameter-signature">
|
|
639
|
+
<ul class="tsd-signatures">
|
|
640
|
+
<li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">U</span></li>
|
|
641
|
+
<li class="tsd-description">
|
|
642
|
+
<div class="tsd-parameters">
|
|
643
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
644
|
+
<ul class="tsd-parameter-list">
|
|
645
|
+
<li>
|
|
646
|
+
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5></li></ul></div>
|
|
647
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">U</span></h4></li></ul></li></ul></li></ul></div>
|
|
648
|
+
<h4 class="tsd-returns-title">Returns <a href="DoublyLinkedList.html" class="tsd-signature-type tsd-kind-class">DoublyLinkedList</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">U</span><span class="tsd-signature-symbol">></span></h4><p>The <code>map</code> function is returning a new instance of <code>DoublyLinkedList<U></code> that contains the mapped values.</p>
|
|
492
649
|
|
|
493
650
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
494
651
|
<ul>
|
|
495
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
496
|
-
<section class="tsd-panel tsd-member"><a id="
|
|
497
|
-
<h3 class="tsd-anchor-link"><span>
|
|
652
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/doubly-linked-list.ts#L455">src/data-structures/linked-list/doubly-linked-list.ts:455</a></li></ul></aside></li></ul></section>
|
|
653
|
+
<section class="tsd-panel tsd-member"><a id="pop" class="tsd-anchor"></a>
|
|
654
|
+
<h3 class="tsd-anchor-link"><span>pop</span><a href="#pop" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
498
655
|
<ul class="tsd-signatures">
|
|
499
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
656
|
+
<li class="tsd-signature tsd-anchor-link" id="pop.pop-1"><span class="tsd-kind-call-signature">pop</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><a href="#pop.pop-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
500
657
|
<li class="tsd-description">
|
|
501
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
502
|
-
depending on the specified parameter.</p>
|
|
658
|
+
<div class="tsd-comment tsd-typography"><p>The <code>pop()</code> function removes and returns the value of the last node in a doubly linked list.</p>
|
|
503
659
|
</div>
|
|
504
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span></h4><p>The method
|
|
505
|
-
|
|
506
|
-
<code>DoublyLinkedListNode<T></code> is returned. If <code>by</code> is set to `'</p>
|
|
660
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span></h4><p>The method is returning the value of the removed node (removedNode.val) if the list is not empty. If the
|
|
661
|
+
list is empty, it returns null.</p>
|
|
507
662
|
|
|
508
663
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
509
664
|
<ul>
|
|
510
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
511
|
-
<
|
|
665
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/doubly-linked-list.ts#L133">src/data-structures/linked-list/doubly-linked-list.ts:133</a></li></ul></aside></li></ul></section>
|
|
666
|
+
<section class="tsd-panel tsd-member"><a id="push" class="tsd-anchor"></a>
|
|
667
|
+
<h3 class="tsd-anchor-link"><span>push</span><a href="#push" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
668
|
+
<ul class="tsd-signatures">
|
|
669
|
+
<li class="tsd-signature tsd-anchor-link" id="push.push-1"><span class="tsd-kind-call-signature">push</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#push.push-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
512
670
|
<li class="tsd-description">
|
|
513
|
-
<div class="tsd-comment tsd-typography"><p>The function
|
|
514
|
-
depending on the specified parameter.</p>
|
|
671
|
+
<div class="tsd-comment tsd-typography"><p>The push function adds a new node with the given value to the end of the doubly linked list.</p>
|
|
515
672
|
</div>
|
|
516
673
|
<div class="tsd-parameters">
|
|
517
674
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
518
675
|
<ul class="tsd-parameter-list">
|
|
519
676
|
<li>
|
|
520
|
-
<h5><span class="tsd-kind-parameter">
|
|
521
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
522
|
-
can have two possible values: 'node' or 'val'. It determines the type of value that will be returned by the pollLast
|
|
523
|
-
method. If 'node' is specified, the method will return the</p>
|
|
677
|
+
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
678
|
+
<div class="tsd-comment tsd-typography"><p>The value to be added to the linked list.</p>
|
|
524
679
|
</div>
|
|
525
680
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
526
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">
|
|
527
|
-
The specific type that is returned depends on the value of the <code>by</code> parameter. If <code>by</code> is set to <code>'node'</code>, then a
|
|
528
|
-
<code>DoublyLinkedListNode<T></code> is returned. If <code>by</code> is set to `'</p>
|
|
529
|
-
|
|
681
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
530
682
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
531
683
|
<ul>
|
|
532
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
533
|
-
<
|
|
684
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/doubly-linked-list.ts#L115">src/data-structures/linked-list/doubly-linked-list.ts:115</a></li></ul></aside></li></ul></section>
|
|
685
|
+
<section class="tsd-panel tsd-member"><a id="reduce" class="tsd-anchor"></a>
|
|
686
|
+
<h3 class="tsd-anchor-link"><span>reduce</span><a href="#reduce" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
687
|
+
<ul class="tsd-signatures">
|
|
688
|
+
<li class="tsd-signature tsd-anchor-link" id="reduce.reduce-1"><span class="tsd-kind-call-signature">reduce</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">U</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">callback</span>, <span class="tsd-kind-parameter">initialValue</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">U</span><a href="#reduce.reduce-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
534
689
|
<li class="tsd-description">
|
|
535
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
536
|
-
|
|
690
|
+
<div class="tsd-comment tsd-typography"><p>The <code>reduce</code> function iterates over a linked list and applies a callback function to each element, accumulating a
|
|
691
|
+
single value.</p>
|
|
537
692
|
</div>
|
|
693
|
+
<section class="tsd-panel">
|
|
694
|
+
<h4>Type Parameters</h4>
|
|
695
|
+
<ul class="tsd-type-parameter-list">
|
|
696
|
+
<li>
|
|
697
|
+
<h4><span class="tsd-kind-type-parameter">U</span></h4></li></ul></section>
|
|
538
698
|
<div class="tsd-parameters">
|
|
539
699
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
540
700
|
<ul class="tsd-parameter-list">
|
|
541
701
|
<li>
|
|
542
|
-
<h5><span class="tsd-kind-parameter">
|
|
543
|
-
<div class="tsd-comment tsd-typography"><p>The parameter
|
|
544
|
-
|
|
545
|
-
|
|
702
|
+
<h5><span class="tsd-kind-parameter">callback</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">accumulator</span>, <span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type tsd-kind-type-parameter">U</span><span class="tsd-signature-symbol">)</span></h5>
|
|
703
|
+
<div class="tsd-comment tsd-typography"><p>The <code>callback</code> parameter is a function that takes two arguments: <code>accumulator</code> and <code>val</code>. It is
|
|
704
|
+
used to perform a specific operation on each element of the linked list.</p>
|
|
705
|
+
</div>
|
|
706
|
+
<div class="tsd-comment tsd-typography"></div>
|
|
707
|
+
<ul class="tsd-parameters">
|
|
708
|
+
<li class="tsd-parameter-signature">
|
|
709
|
+
<ul class="tsd-signatures">
|
|
710
|
+
<li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">accumulator</span>, <span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">U</span></li>
|
|
711
|
+
<li class="tsd-description">
|
|
712
|
+
<div class="tsd-parameters">
|
|
713
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
714
|
+
<ul class="tsd-parameter-list">
|
|
715
|
+
<li>
|
|
716
|
+
<h5><span class="tsd-kind-parameter">accumulator</span>: <span class="tsd-signature-type tsd-kind-type-parameter">U</span></h5></li>
|
|
717
|
+
<li>
|
|
718
|
+
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5></li></ul></div>
|
|
719
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">U</span></h4></li></ul></li></ul></li>
|
|
720
|
+
<li>
|
|
721
|
+
<h5><span class="tsd-kind-parameter">initialValue</span>: <span class="tsd-signature-type tsd-kind-type-parameter">U</span></h5>
|
|
722
|
+
<div class="tsd-comment tsd-typography"><p>The <code>initialValue</code> parameter is the initial value of the accumulator. It is the starting
|
|
723
|
+
point for the reduction operation.</p>
|
|
546
724
|
</div>
|
|
547
725
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
548
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type
|
|
549
|
-
|
|
550
|
-
|
|
726
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">U</span></h4><p>The <code>reduce</code> method is returning the final value of the accumulator after iterating through all the
|
|
727
|
+
elements in the linked list.</p>
|
|
728
|
+
|
|
729
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
730
|
+
<ul>
|
|
731
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/doubly-linked-list.ts#L494">src/data-structures/linked-list/doubly-linked-list.ts:494</a></li></ul></aside></li></ul></section>
|
|
732
|
+
<section class="tsd-panel tsd-member"><a id="reverse" class="tsd-anchor"></a>
|
|
733
|
+
<h3 class="tsd-anchor-link"><span>reverse</span><a href="#reverse" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
734
|
+
<ul class="tsd-signatures">
|
|
735
|
+
<li class="tsd-signature tsd-anchor-link" id="reverse.reverse-1"><span class="tsd-kind-call-signature">reverse</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#reverse.reverse-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
736
|
+
<li class="tsd-description">
|
|
737
|
+
<div class="tsd-comment tsd-typography"><p>The <code>reverse</code> function reverses the order of the elements in a doubly linked list.</p>
|
|
738
|
+
</div>
|
|
739
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
740
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
741
|
+
<ul>
|
|
742
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/doubly-linked-list.ts#L421">src/data-structures/linked-list/doubly-linked-list.ts:421</a></li></ul></aside></li></ul></section>
|
|
743
|
+
<section class="tsd-panel tsd-member"><a id="shift" class="tsd-anchor"></a>
|
|
744
|
+
<h3 class="tsd-anchor-link"><span>shift</span><a href="#shift" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
745
|
+
<ul class="tsd-signatures">
|
|
746
|
+
<li class="tsd-signature tsd-anchor-link" id="shift.shift-1"><span class="tsd-kind-call-signature">shift</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><a href="#shift.shift-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
747
|
+
<li class="tsd-description">
|
|
748
|
+
<div class="tsd-comment tsd-typography"><p>The <code>shift()</code> function removes and returns the value of the first node in a doubly linked list.</p>
|
|
749
|
+
</div>
|
|
750
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span></h4><p>The method <code>shift()</code> returns the value of the node that is removed from the beginning of the doubly linked
|
|
751
|
+
list.</p>
|
|
752
|
+
|
|
753
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
754
|
+
<ul>
|
|
755
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/doubly-linked-list.ts#L152">src/data-structures/linked-list/doubly-linked-list.ts:152</a></li></ul></aside></li></ul></section>
|
|
756
|
+
<section class="tsd-panel tsd-member"><a id="toArray" class="tsd-anchor"></a>
|
|
757
|
+
<h3 class="tsd-anchor-link"><span>to<wbr/>Array</span><a href="#toArray" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
758
|
+
<ul class="tsd-signatures">
|
|
759
|
+
<li class="tsd-signature tsd-anchor-link" id="toArray.toArray-1"><span class="tsd-kind-call-signature">to<wbr/>Array</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">[]</span><a href="#toArray.toArray-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
760
|
+
<li class="tsd-description">
|
|
761
|
+
<div class="tsd-comment tsd-typography"><p>The <code>toArray</code> function converts a linked list into an array.</p>
|
|
762
|
+
</div>
|
|
763
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">[]</span></h4><p>The <code>toArray()</code> method is returning an array of type <code>T[]</code>.</p>
|
|
551
764
|
|
|
552
765
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
553
766
|
<ul>
|
|
554
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
555
|
-
<section class="tsd-panel tsd-member"><a id="
|
|
556
|
-
<h3 class="tsd-anchor-link"><span>
|
|
767
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/doubly-linked-list.ts#L328">src/data-structures/linked-list/doubly-linked-list.ts:328</a></li></ul></aside></li></ul></section>
|
|
768
|
+
<section class="tsd-panel tsd-member"><a id="toArrayReverse" class="tsd-anchor"></a>
|
|
769
|
+
<h3 class="tsd-anchor-link"><span>to<wbr/>Array<wbr/>Reverse</span><a href="#toArrayReverse" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
557
770
|
<ul class="tsd-signatures">
|
|
558
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
771
|
+
<li class="tsd-signature tsd-anchor-link" id="toArrayReverse.toArrayReverse-1"><span class="tsd-kind-call-signature">to<wbr/>Array<wbr/>Reverse</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">[]</span><a href="#toArrayReverse.toArrayReverse-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
559
772
|
<li class="tsd-description">
|
|
560
|
-
<div class="tsd-comment tsd-typography"><p>The <code>
|
|
561
|
-
|
|
773
|
+
<div class="tsd-comment tsd-typography"><p>The <code>toArrayReverse</code> function converts a doubly linked list into an array in reverse order.</p>
|
|
774
|
+
</div>
|
|
775
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">[]</span></h4><p>The <code>toArrayReverse()</code> function returns an array of type <code>T[]</code>.</p>
|
|
776
|
+
|
|
777
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
778
|
+
<ul>
|
|
779
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/doubly-linked-list.ts#L408">src/data-structures/linked-list/doubly-linked-list.ts:408</a></li></ul></aside></li></ul></section>
|
|
780
|
+
<section class="tsd-panel tsd-member"><a id="unshift" class="tsd-anchor"></a>
|
|
781
|
+
<h3 class="tsd-anchor-link"><span>unshift</span><a href="#unshift" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
782
|
+
<ul class="tsd-signatures">
|
|
783
|
+
<li class="tsd-signature tsd-anchor-link" id="unshift.unshift-1"><span class="tsd-kind-call-signature">unshift</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#unshift.unshift-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
784
|
+
<li class="tsd-description">
|
|
785
|
+
<div class="tsd-comment tsd-typography"><p>The unshift function adds a new node with the given value to the beginning of a doubly linked list.</p>
|
|
562
786
|
</div>
|
|
563
787
|
<div class="tsd-parameters">
|
|
564
788
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
565
789
|
<ul class="tsd-parameter-list">
|
|
566
790
|
<li>
|
|
567
|
-
<h5><span class="tsd-kind-parameter">
|
|
568
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
569
|
-
|
|
791
|
+
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
792
|
+
<div class="tsd-comment tsd-typography"><p>The <code>val</code> parameter represents the value of the new node that will be added to the beginning of the
|
|
793
|
+
doubly linked list.</p>
|
|
570
794
|
</div>
|
|
571
795
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
572
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">
|
|
573
|
-
if the index is out of bounds.</p>
|
|
574
|
-
|
|
796
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
575
797
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
576
798
|
<ul>
|
|
577
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
578
|
-
<section class="tsd-panel tsd-member"><a id="
|
|
579
|
-
<h3 class="tsd-anchor-link"><span>
|
|
799
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/doubly-linked-list.ts#L171">src/data-structures/linked-list/doubly-linked-list.ts:171</a></li></ul></aside></li></ul></section>
|
|
800
|
+
<section class="tsd-panel tsd-member"><a id="fromArray" class="tsd-anchor"></a>
|
|
801
|
+
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>from<wbr/>Array</span><a href="#fromArray" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
580
802
|
<ul class="tsd-signatures">
|
|
581
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
803
|
+
<li class="tsd-signature tsd-anchor-link" id="fromArray.fromArray-1"><span class="tsd-kind-call-signature">from<wbr/>Array</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="DoublyLinkedList.html" class="tsd-signature-type tsd-kind-class">DoublyLinkedList</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span><a href="#fromArray.fromArray-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
582
804
|
<li class="tsd-description">
|
|
583
|
-
<div class="tsd-comment tsd-typography"><p>
|
|
584
|
-
|
|
585
|
-
If index = 3; Value of the fourth element in the list is updated.</p>
|
|
805
|
+
<div class="tsd-comment tsd-typography"><p>The <code>fromArray</code> function creates a new instance of a DoublyLinkedList and populates it with the elements from the
|
|
806
|
+
given array.</p>
|
|
586
807
|
</div>
|
|
808
|
+
<section class="tsd-panel">
|
|
809
|
+
<h4>Type Parameters</h4>
|
|
810
|
+
<ul class="tsd-type-parameter-list">
|
|
811
|
+
<li>
|
|
812
|
+
<h4><span class="tsd-kind-type-parameter">T</span></h4></li></ul></section>
|
|
587
813
|
<div class="tsd-parameters">
|
|
588
814
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
589
815
|
<ul class="tsd-parameter-list">
|
|
590
816
|
<li>
|
|
591
|
-
<h5><span class="tsd-kind-parameter">
|
|
592
|
-
<div class="tsd-comment tsd-typography"><p>
|
|
593
|
-
</div>
|
|
594
|
-
<div class="tsd-comment tsd-typography"></div></li>
|
|
595
|
-
<li>
|
|
596
|
-
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
597
|
-
<div class="tsd-comment tsd-typography"><p>New value of the node</p>
|
|
817
|
+
<h5><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">[]</span></h5>
|
|
818
|
+
<div class="tsd-comment tsd-typography"><p>The <code>data</code> parameter is an array of elements of type <code>T</code>.</p>
|
|
598
819
|
</div>
|
|
599
820
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
600
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">
|
|
821
|
+
<h4 class="tsd-returns-title">Returns <a href="DoublyLinkedList.html" class="tsd-signature-type tsd-kind-class">DoublyLinkedList</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span></h4><p>The <code>fromArray</code> function returns a DoublyLinkedList object.</p>
|
|
822
|
+
|
|
601
823
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
602
824
|
<ul>
|
|
603
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
825
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/doubly-linked-list.ts#L99">src/data-structures/linked-list/doubly-linked-list.ts:99</a></li></ul></aside></li></ul></section></section></div>
|
|
604
826
|
<div class="col-sidebar">
|
|
605
827
|
<div class="page-menu">
|
|
606
828
|
<div class="tsd-navigation settings">
|
|
@@ -621,26 +843,37 @@ If index = 3; Value of the fourth element in the list is updated.</p>
|
|
|
621
843
|
<div class="tsd-accordion-details">
|
|
622
844
|
<ul>
|
|
623
845
|
<li><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-512"></use></svg><span>constructor</span></a></li>
|
|
624
|
-
<li><a href="#
|
|
625
|
-
<li><a href="#
|
|
626
|
-
<li><a href="#
|
|
627
|
-
<li><a href="#
|
|
628
|
-
<li><a href="#
|
|
629
|
-
<li><a href="#
|
|
630
|
-
<li><a href="#
|
|
631
|
-
<li><a href="#
|
|
632
|
-
<li><a href="#
|
|
633
|
-
<li><a href="#
|
|
634
|
-
<li><a href="#
|
|
635
|
-
<li><a href="#
|
|
636
|
-
<li><a href="#
|
|
637
|
-
<li><a href="#
|
|
638
|
-
<li><a href="#
|
|
639
|
-
<li><a href="#
|
|
640
|
-
<li><a href="#
|
|
641
|
-
<li><a href="#
|
|
642
|
-
<li><a href="#
|
|
643
|
-
<li><a href="#
|
|
846
|
+
<li><a href="#_head" class="tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_head</span></a></li>
|
|
847
|
+
<li><a href="#_length" class="tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_length</span></a></li>
|
|
848
|
+
<li><a href="#_tail" class="tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_tail</span></a></li>
|
|
849
|
+
<li><a href="#head" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>head</span></a></li>
|
|
850
|
+
<li><a href="#length" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>length</span></a></li>
|
|
851
|
+
<li><a href="#tail" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>tail</span></a></li>
|
|
852
|
+
<li><a href="#clear" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>clear</span></a></li>
|
|
853
|
+
<li><a href="#delete" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>delete</span></a></li>
|
|
854
|
+
<li><a href="#deleteAt" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>delete<wbr/>At</span></a></li>
|
|
855
|
+
<li><a href="#filter" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>filter</span></a></li>
|
|
856
|
+
<li><a href="#find" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>find</span></a></li>
|
|
857
|
+
<li><a href="#findLast" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>find<wbr/>Last</span></a></li>
|
|
858
|
+
<li><a href="#findNode" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>find<wbr/>Node</span></a></li>
|
|
859
|
+
<li><a href="#forEach" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>for<wbr/>Each</span></a></li>
|
|
860
|
+
<li><a href="#getAt" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>At</span></a></li>
|
|
861
|
+
<li><a href="#getLength" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Length</span></a></li>
|
|
862
|
+
<li><a href="#getNodeAt" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Node<wbr/>At</span></a></li>
|
|
863
|
+
<li><a href="#indexOf" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>index<wbr/>Of</span></a></li>
|
|
864
|
+
<li><a href="#insertAfter" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>insert<wbr/>After</span></a></li>
|
|
865
|
+
<li><a href="#insertAt" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>insert<wbr/>At</span></a></li>
|
|
866
|
+
<li><a href="#insertBefore" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>insert<wbr/>Before</span></a></li>
|
|
867
|
+
<li><a href="#map" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>map</span></a></li>
|
|
868
|
+
<li><a href="#pop" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>pop</span></a></li>
|
|
869
|
+
<li><a href="#push" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>push</span></a></li>
|
|
870
|
+
<li><a href="#reduce" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>reduce</span></a></li>
|
|
871
|
+
<li><a href="#reverse" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>reverse</span></a></li>
|
|
872
|
+
<li><a href="#shift" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>shift</span></a></li>
|
|
873
|
+
<li><a href="#toArray" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>to<wbr/>Array</span></a></li>
|
|
874
|
+
<li><a href="#toArrayReverse" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>to<wbr/>Array<wbr/>Reverse</span></a></li>
|
|
875
|
+
<li><a href="#unshift" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>unshift</span></a></li>
|
|
876
|
+
<li><a href="#fromArray" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>from<wbr/>Array</span></a></li></ul></div></details></div>
|
|
644
877
|
<div class="site-menu">
|
|
645
878
|
<nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-4"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)"></path></g></svg><span>data-<wbr/>structure-<wbr/>typed</span></a>
|
|
646
879
|
<ul class="tsd-small-nested-navigation">
|
|
@@ -686,6 +919,7 @@ If index = 3; Value of the fourth element in the list is updated.</p>
|
|
|
686
919
|
<li><a href="SegmentTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Segment<wbr/>Tree<wbr/>Node</span></a></li>
|
|
687
920
|
<li><a href="SinglyLinkedList.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Singly<wbr/>Linked<wbr/>List</span></a></li>
|
|
688
921
|
<li><a href="SinglyLinkedListNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Singly<wbr/>Linked<wbr/>List<wbr/>Node</span></a></li>
|
|
922
|
+
<li><a href="SkipLinkedList.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Skip<wbr/>Linked<wbr/>List</span></a></li>
|
|
689
923
|
<li><a href="SplayTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Splay<wbr/>Tree</span></a></li>
|
|
690
924
|
<li><a href="Stack.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Stack</span></a></li>
|
|
691
925
|
<li><a href="TreeMultiSet.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Tree<wbr/>Multi<wbr/>Set</span></a></li>
|
|
@@ -698,7 +932,6 @@ If index = 3; Value of the fourth element in the list is updated.</p>
|
|
|
698
932
|
<li><a href="UndirectedVertex.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Undirected<wbr/>Vertex</span></a></li>
|
|
699
933
|
<li><a href="Vector2D.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Vector2D</span></a></li>
|
|
700
934
|
<li><a href="../interfaces/AVLTreeDeleted.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-256"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)"></path></g></svg><span>AVLTree<wbr/>Deleted</span></a></li>
|
|
701
|
-
<li><a href="../interfaces/BinaryTreeNodeObj.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>Binary<wbr/>Tree<wbr/>Node<wbr/>Obj</span></a></li>
|
|
702
935
|
<li><a href="../interfaces/HeapOptions.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>Heap<wbr/>Options</span></a></li>
|
|
703
936
|
<li><a href="../interfaces/IDirectedGraph.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>IDirected<wbr/>Graph</span></a></li>
|
|
704
937
|
<li><a href="../interfaces/IGraph.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>IGraph</span></a></li>
|