data-structure-typed 1.17.0 → 1.17.4
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 +9 -0
- package/dist/data-structures/linked-list/doubly-linked-list.d.ts +7 -26
- package/dist/data-structures/linked-list/doubly-linked-list.js +59 -40
- 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 +7 -29
- package/dist/data-structures/linked-list/singly-linked-list.js +42 -26
- 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/docs/assets/search.js +1 -1
- package/docs/classes/AVLTree.html +94 -93
- package/docs/classes/AVLTreeNode.html +37 -36
- package/docs/classes/AaTree.html +2 -1
- package/docs/classes/AbstractEdge.html +12 -11
- package/docs/classes/AbstractGraph.html +30 -29
- package/docs/classes/AbstractVertex.html +7 -6
- package/docs/classes/ArrayDeque.html +15 -14
- package/docs/classes/BST.html +87 -86
- package/docs/classes/BSTNode.html +37 -36
- package/docs/classes/BTree.html +2 -1
- package/docs/classes/BinaryIndexedTree.html +8 -7
- package/docs/classes/BinaryTree.html +83 -82
- package/docs/classes/BinaryTreeNode.html +37 -36
- package/docs/classes/Character.html +5 -4
- package/docs/classes/CoordinateMap.html +11 -10
- package/docs/classes/CoordinateSet.html +10 -9
- package/docs/classes/Deque.html +145 -67
- package/docs/classes/DirectedEdge.html +18 -17
- package/docs/classes/DirectedGraph.html +42 -41
- package/docs/classes/DirectedVertex.html +7 -6
- package/docs/classes/DoublyLinkedList.html +143 -68
- package/docs/classes/DoublyLinkedListNode.html +12 -11
- package/docs/classes/Heap.html +21 -20
- package/docs/classes/HeapItem.html +9 -8
- package/docs/classes/Matrix2D.html +17 -16
- package/docs/classes/MatrixNTI2D.html +5 -4
- package/docs/classes/MaxHeap.html +21 -20
- package/docs/classes/MaxPriorityQueue.html +35 -34
- package/docs/classes/MinHeap.html +21 -20
- package/docs/classes/MinPriorityQueue.html +35 -34
- package/docs/classes/Navigator.html +11 -10
- package/docs/classes/ObjectDeque.html +26 -25
- package/docs/classes/PriorityQueue.html +33 -32
- package/docs/classes/Queue.html +15 -14
- package/docs/classes/RBTree.html +2 -1
- package/docs/classes/SegmentTree.html +13 -12
- package/docs/classes/SegmentTreeNode.html +27 -26
- package/docs/classes/SinglyLinkedList.html +128 -70
- package/docs/classes/SinglyLinkedListNode.html +9 -8
- package/docs/classes/SkipLinkedList.html +150 -0
- package/docs/classes/SplayTree.html +2 -1
- package/docs/classes/Stack.html +13 -12
- package/docs/classes/TreeMultiSet.html +87 -86
- package/docs/classes/TreeNode.html +9 -8
- package/docs/classes/Trie.html +14 -13
- package/docs/classes/TrieNode.html +12 -11
- package/docs/classes/TwoThreeTree.html +2 -1
- package/docs/classes/UndirectedEdge.html +14 -13
- package/docs/classes/UndirectedGraph.html +36 -35
- package/docs/classes/UndirectedVertex.html +7 -6
- package/docs/classes/Vector2D.html +29 -28
- package/docs/enums/CP.html +5 -4
- package/docs/enums/FamilyPosition.html +5 -4
- package/docs/enums/LoopType.html +4 -3
- package/docs/index.html +1 -0
- package/docs/interfaces/AVLTreeDeleted.html +4 -3
- package/docs/interfaces/HeapOptions.html +3 -2
- package/docs/interfaces/IDirectedGraph.html +8 -7
- package/docs/interfaces/IGraph.html +20 -19
- package/docs/interfaces/NavigatorParams.html +6 -5
- package/docs/interfaces/PriorityQueueOptions.html +5 -4
- package/docs/modules.html +2 -0
- package/docs/types/BSTComparator.html +2 -1
- package/docs/types/BSTDeletedResult.html +2 -1
- package/docs/types/BinaryTreeDeleted.html +2 -1
- package/docs/types/BinaryTreeNodeId.html +2 -1
- package/docs/types/BinaryTreeNodePropertyName.html +2 -1
- package/docs/types/DFSOrderPattern.html +2 -1
- package/docs/types/DijkstraResult.html +2 -1
- package/docs/types/Direction.html +2 -1
- package/docs/types/DoublyLinkedListGetBy.html +2 -1
- package/docs/types/NodeOrPropertyName.html +2 -1
- package/docs/types/PriorityQueueComparator.html +2 -1
- package/docs/types/PriorityQueueDFSOrderPattern.html +2 -1
- package/docs/types/ResultByProperty.html +2 -1
- package/docs/types/ResultsByProperty.html +2 -1
- package/docs/types/SegmentTreeNodeVal.html +2 -1
- package/docs/types/SpecifyOptional.html +2 -1
- package/docs/types/Thunk.html +2 -1
- package/docs/types/ToThunkFn.html +2 -1
- package/docs/types/TopologicalStatus.html +2 -1
- package/docs/types/TreeMultiSetDeletedResult.html +2 -1
- package/docs/types/TrlAsyncFn.html +2 -1
- package/docs/types/TrlFn.html +2 -1
- package/docs/types/Turning.html +2 -1
- package/docs/types/VertexId.html +2 -1
- package/package.json +1 -1
|
@@ -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">
|
|
@@ -63,8 +63,8 @@
|
|
|
63
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
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
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#insert" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>insert</span></a>
|
|
67
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
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
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
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>
|
|
@@ -94,24 +94,24 @@
|
|
|
94
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
95
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
96
96
|
<ul>
|
|
97
|
-
<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>
|
|
98
98
|
<section class="tsd-panel-group tsd-member-group">
|
|
99
99
|
<h2>Properties</h2>
|
|
100
100
|
<section class="tsd-panel tsd-member tsd-is-private"><a id="_head" class="tsd-anchor"></a>
|
|
101
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
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">
|
|
103
103
|
<ul>
|
|
104
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
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
105
|
<section class="tsd-panel tsd-member tsd-is-private"><a id="_length" class="tsd-anchor"></a>
|
|
106
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
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">
|
|
108
108
|
<ul>
|
|
109
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
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
110
|
<section class="tsd-panel tsd-member tsd-is-private"><a id="_tail" class="tsd-anchor"></a>
|
|
111
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
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">
|
|
113
113
|
<ul>
|
|
114
|
-
<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>
|
|
115
115
|
<section class="tsd-panel-group tsd-member-group">
|
|
116
116
|
<h2>Accessors</h2>
|
|
117
117
|
<section class="tsd-panel tsd-member"><a id="head" class="tsd-anchor"></a>
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
<li class="tsd-description">
|
|
122
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">
|
|
123
123
|
<ul>
|
|
124
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
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
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>
|
|
126
126
|
<li class="tsd-description">
|
|
127
127
|
<div class="tsd-parameters">
|
|
@@ -131,7 +131,7 @@
|
|
|
131
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>
|
|
132
132
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
133
133
|
<ul>
|
|
134
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
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
135
|
<section class="tsd-panel tsd-member"><a id="length" class="tsd-anchor"></a>
|
|
136
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>
|
|
137
137
|
<ul class="tsd-signatures">
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
<li class="tsd-description">
|
|
140
140
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
141
141
|
<ul>
|
|
142
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
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
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>
|
|
144
144
|
<li class="tsd-description">
|
|
145
145
|
<div class="tsd-parameters">
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
|
150
150
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
151
151
|
<ul>
|
|
152
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
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
153
|
<section class="tsd-panel tsd-member"><a id="tail" class="tsd-anchor"></a>
|
|
154
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>
|
|
155
155
|
<ul class="tsd-signatures">
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
<li class="tsd-description">
|
|
158
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">
|
|
159
159
|
<ul>
|
|
160
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
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
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>
|
|
162
162
|
<li class="tsd-description">
|
|
163
163
|
<div class="tsd-parameters">
|
|
@@ -167,7 +167,7 @@
|
|
|
167
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>
|
|
168
168
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
169
169
|
<ul>
|
|
170
|
-
<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>
|
|
171
171
|
<section class="tsd-panel-group tsd-member-group">
|
|
172
172
|
<h2>Methods</h2>
|
|
173
173
|
<section class="tsd-panel tsd-member"><a id="clear" class="tsd-anchor"></a>
|
|
@@ -180,28 +180,48 @@
|
|
|
180
180
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
181
181
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
182
182
|
<ul>
|
|
183
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
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
184
|
<section class="tsd-panel tsd-member"><a id="delete" class="tsd-anchor"></a>
|
|
185
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
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">
|
|
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
188
|
<li class="tsd-description">
|
|
189
|
-
<div class="tsd-comment tsd-typography"><p>The <code>delete</code> function removes a node
|
|
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>
|
|
190
190
|
</div>
|
|
191
191
|
<div class="tsd-parameters">
|
|
192
192
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
193
193
|
<ul class="tsd-parameter-list">
|
|
194
194
|
<li>
|
|
195
|
-
<h5><span class="tsd-kind-parameter">
|
|
196
|
-
<div class="tsd-comment tsd-typography"><p>The <code>
|
|
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>
|
|
198
|
+
</div>
|
|
199
|
+
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
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>
|
|
202
|
+
|
|
203
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
204
|
+
<ul>
|
|
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>
|
|
207
|
+
<li class="tsd-description">
|
|
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>
|
|
209
|
+
</div>
|
|
210
|
+
<div class="tsd-parameters">
|
|
211
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
212
|
+
<ul class="tsd-parameter-list">
|
|
213
|
+
<li>
|
|
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>
|
|
197
217
|
</div>
|
|
198
218
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
199
|
-
<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
|
|
200
|
-
the linked list, and <code>false</code> if the 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>
|
|
201
221
|
|
|
202
222
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
203
223
|
<ul>
|
|
204
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
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>
|
|
205
225
|
<section class="tsd-panel tsd-member"><a id="deleteAt" class="tsd-anchor"></a>
|
|
206
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>
|
|
207
227
|
<ul class="tsd-signatures">
|
|
@@ -223,7 +243,7 @@ bounds.</p>
|
|
|
223
243
|
|
|
224
244
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
225
245
|
<ul>
|
|
226
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
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>
|
|
227
247
|
<section class="tsd-panel tsd-member"><a id="filter" class="tsd-anchor"></a>
|
|
228
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>
|
|
229
249
|
<ul class="tsd-signatures">
|
|
@@ -256,7 +276,7 @@ It is used to determine whether a value should be included in the filtered list
|
|
|
256
276
|
|
|
257
277
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
258
278
|
<ul>
|
|
259
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
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>
|
|
260
280
|
<section class="tsd-panel tsd-member"><a id="find" class="tsd-anchor"></a>
|
|
261
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>
|
|
262
282
|
<ul class="tsd-signatures">
|
|
@@ -289,7 +309,7 @@ the callback function. If no element satisfies the condition, it returns <code>n
|
|
|
289
309
|
|
|
290
310
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
291
311
|
<ul>
|
|
292
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
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>
|
|
293
313
|
<section class="tsd-panel tsd-member"><a id="findLast" class="tsd-anchor"></a>
|
|
294
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>
|
|
295
315
|
<ul class="tsd-signatures">
|
|
@@ -323,7 +343,7 @@ the callback function. If no value satisfies the condition, it returns <code>nul
|
|
|
323
343
|
|
|
324
344
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
325
345
|
<ul>
|
|
326
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
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>
|
|
327
347
|
<section class="tsd-panel tsd-member"><a id="findNode" class="tsd-anchor"></a>
|
|
328
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>
|
|
329
349
|
<ul class="tsd-signatures">
|
|
@@ -345,7 +365,7 @@ is found in the linked list. If no such node is found, it returns <code>null</co
|
|
|
345
365
|
|
|
346
366
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
347
367
|
<ul>
|
|
348
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
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>
|
|
349
369
|
<section class="tsd-panel tsd-member"><a id="forEach" class="tsd-anchor"></a>
|
|
350
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>
|
|
351
371
|
<ul class="tsd-signatures">
|
|
@@ -379,7 +399,7 @@ current node in the linked list.</p>
|
|
|
379
399
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
380
400
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
381
401
|
<ul>
|
|
382
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
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>
|
|
383
403
|
<section class="tsd-panel tsd-member"><a id="getAt" class="tsd-anchor"></a>
|
|
384
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>
|
|
385
405
|
<ul class="tsd-signatures">
|
|
@@ -401,7 +421,7 @@ or the linked list is empty, it will return null.</p>
|
|
|
401
421
|
|
|
402
422
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
403
423
|
<ul>
|
|
404
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
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>
|
|
405
425
|
<section class="tsd-panel tsd-member"><a id="getLength" class="tsd-anchor"></a>
|
|
406
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>
|
|
407
427
|
<ul class="tsd-signatures">
|
|
@@ -409,7 +429,7 @@ or the linked list is empty, it will return null.</p>
|
|
|
409
429
|
<li class="tsd-description">
|
|
410
430
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
411
431
|
<ul>
|
|
412
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
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>
|
|
413
433
|
<section class="tsd-panel tsd-member"><a id="getNodeAt" class="tsd-anchor"></a>
|
|
414
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>
|
|
415
435
|
<ul class="tsd-signatures">
|
|
@@ -432,7 +452,7 @@ valid range of the linked list, otherwise it returns <code>null</code>.</p>
|
|
|
432
452
|
|
|
433
453
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
434
454
|
<ul>
|
|
435
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
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>
|
|
436
456
|
<section class="tsd-panel tsd-member"><a id="indexOf" class="tsd-anchor"></a>
|
|
437
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>
|
|
438
458
|
<ul class="tsd-signatures">
|
|
@@ -454,11 +474,64 @@ list. If the value is not found, it returns -1.</p>
|
|
|
454
474
|
|
|
455
475
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
456
476
|
<ul>
|
|
457
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
458
|
-
<section class="tsd-panel tsd-member"><a id="
|
|
459
|
-
<h3 class="tsd-anchor-link"><span>insert</span><a href="#
|
|
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>
|
|
480
|
+
<ul class="tsd-signatures">
|
|
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>
|
|
482
|
+
<li class="tsd-description">
|
|
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>
|
|
484
|
+
</div>
|
|
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>
|
|
502
|
+
|
|
503
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
504
|
+
<ul>
|
|
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>
|
|
507
|
+
<li class="tsd-description">
|
|
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>
|
|
509
|
+
</div>
|
|
510
|
+
<div class="tsd-parameters">
|
|
511
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
512
|
+
<ul class="tsd-parameter-list">
|
|
513
|
+
<li>
|
|
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>
|
|
523
|
+
</div>
|
|
524
|
+
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
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>
|
|
527
|
+
|
|
528
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
529
|
+
<ul>
|
|
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>
|
|
460
533
|
<ul class="tsd-signatures">
|
|
461
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
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>
|
|
462
535
|
<li class="tsd-description">
|
|
463
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>
|
|
464
537
|
</div>
|
|
@@ -482,61 +555,62 @@ if the index is out of bounds.</p>
|
|
|
482
555
|
|
|
483
556
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
484
557
|
<ul>
|
|
485
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
486
|
-
<section class="tsd-panel tsd-member"><a id="
|
|
487
|
-
<h3 class="tsd-anchor-link"><span>insert<wbr/>
|
|
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>
|
|
488
561
|
<ul class="tsd-signatures">
|
|
489
|
-
<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>
|
|
490
563
|
<li class="tsd-description">
|
|
491
|
-
<div class="tsd-comment tsd-typography"><p>The function inserts a new value
|
|
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>
|
|
492
565
|
</div>
|
|
493
566
|
<div class="tsd-parameters">
|
|
494
567
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
495
568
|
<ul class="tsd-parameter-list">
|
|
496
569
|
<li>
|
|
497
|
-
<h5><span class="tsd-kind-parameter">
|
|
498
|
-
<div class="tsd-comment tsd-typography"><p>The existing value
|
|
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>
|
|
499
574
|
</div>
|
|
500
575
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
501
576
|
<li>
|
|
502
577
|
<h5><span class="tsd-kind-parameter">newValue</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
503
|
-
<div class="tsd-comment tsd-typography"><p>The <code>newValue</code> parameter represents the value
|
|
504
|
-
|
|
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>
|
|
505
580
|
</div>
|
|
506
581
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
507
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The method
|
|
508
|
-
|
|
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>
|
|
509
584
|
|
|
510
585
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
511
586
|
<ul>
|
|
512
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
513
|
-
<
|
|
514
|
-
<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>
|
|
515
|
-
<ul class="tsd-signatures">
|
|
516
|
-
<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">existingValue</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>
|
|
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>
|
|
517
589
|
<li class="tsd-description">
|
|
518
|
-
<div class="tsd-comment tsd-typography"><p>The <code>insertBefore</code> function inserts a new value before an existing value in a doubly linked list.</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>
|
|
519
591
|
</div>
|
|
520
592
|
<div class="tsd-parameters">
|
|
521
593
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
522
594
|
<ul class="tsd-parameter-list">
|
|
523
595
|
<li>
|
|
524
|
-
<h5><span class="tsd-kind-parameter">
|
|
525
|
-
<div class="tsd-comment tsd-typography"><p>The existing value
|
|
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>
|
|
526
600
|
</div>
|
|
527
601
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
528
602
|
<li>
|
|
529
603
|
<h5><span class="tsd-kind-parameter">newValue</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
530
|
-
<div class="tsd-comment tsd-typography"><p>The <code>newValue</code> parameter represents the value
|
|
531
|
-
|
|
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>
|
|
532
606
|
</div>
|
|
533
607
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
534
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The method
|
|
535
|
-
|
|
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>
|
|
536
610
|
|
|
537
611
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
538
612
|
<ul>
|
|
539
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
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>
|
|
540
614
|
<section class="tsd-panel tsd-member"><a id="map" class="tsd-anchor"></a>
|
|
541
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>
|
|
542
616
|
<ul class="tsd-signatures">
|
|
@@ -575,7 +649,7 @@ DoublyLinkedList).</p>
|
|
|
575
649
|
|
|
576
650
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
577
651
|
<ul>
|
|
578
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
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>
|
|
579
653
|
<section class="tsd-panel tsd-member"><a id="pop" class="tsd-anchor"></a>
|
|
580
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>
|
|
581
655
|
<ul class="tsd-signatures">
|
|
@@ -588,7 +662,7 @@ list is empty, it returns null.</p>
|
|
|
588
662
|
|
|
589
663
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
590
664
|
<ul>
|
|
591
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
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>
|
|
592
666
|
<section class="tsd-panel tsd-member"><a id="push" class="tsd-anchor"></a>
|
|
593
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>
|
|
594
668
|
<ul class="tsd-signatures">
|
|
@@ -607,7 +681,7 @@ list is empty, it returns null.</p>
|
|
|
607
681
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
608
682
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
609
683
|
<ul>
|
|
610
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
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>
|
|
611
685
|
<section class="tsd-panel tsd-member"><a id="reduce" class="tsd-anchor"></a>
|
|
612
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>
|
|
613
687
|
<ul class="tsd-signatures">
|
|
@@ -654,7 +728,7 @@ elements in the linked list.</p>
|
|
|
654
728
|
|
|
655
729
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
656
730
|
<ul>
|
|
657
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
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>
|
|
658
732
|
<section class="tsd-panel tsd-member"><a id="reverse" class="tsd-anchor"></a>
|
|
659
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>
|
|
660
734
|
<ul class="tsd-signatures">
|
|
@@ -665,7 +739,7 @@ elements in the linked list.</p>
|
|
|
665
739
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
666
740
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
667
741
|
<ul>
|
|
668
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
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>
|
|
669
743
|
<section class="tsd-panel tsd-member"><a id="shift" class="tsd-anchor"></a>
|
|
670
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>
|
|
671
745
|
<ul class="tsd-signatures">
|
|
@@ -678,7 +752,7 @@ list.</p>
|
|
|
678
752
|
|
|
679
753
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
680
754
|
<ul>
|
|
681
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
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>
|
|
682
756
|
<section class="tsd-panel tsd-member"><a id="toArray" class="tsd-anchor"></a>
|
|
683
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>
|
|
684
758
|
<ul class="tsd-signatures">
|
|
@@ -690,7 +764,7 @@ list.</p>
|
|
|
690
764
|
|
|
691
765
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
692
766
|
<ul>
|
|
693
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
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>
|
|
694
768
|
<section class="tsd-panel tsd-member"><a id="toArrayReverse" class="tsd-anchor"></a>
|
|
695
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>
|
|
696
770
|
<ul class="tsd-signatures">
|
|
@@ -702,7 +776,7 @@ list.</p>
|
|
|
702
776
|
|
|
703
777
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
704
778
|
<ul>
|
|
705
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
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>
|
|
706
780
|
<section class="tsd-panel tsd-member"><a id="unshift" class="tsd-anchor"></a>
|
|
707
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>
|
|
708
782
|
<ul class="tsd-signatures">
|
|
@@ -722,7 +796,7 @@ doubly linked list.</p>
|
|
|
722
796
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
723
797
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
724
798
|
<ul>
|
|
725
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
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>
|
|
726
800
|
<section class="tsd-panel tsd-member"><a id="fromArray" class="tsd-anchor"></a>
|
|
727
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>
|
|
728
802
|
<ul class="tsd-signatures">
|
|
@@ -748,7 +822,7 @@ given array.</p>
|
|
|
748
822
|
|
|
749
823
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
750
824
|
<ul>
|
|
751
|
-
<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>
|
|
752
826
|
<div class="col-sidebar">
|
|
753
827
|
<div class="page-menu">
|
|
754
828
|
<div class="tsd-navigation settings">
|
|
@@ -787,8 +861,8 @@ given array.</p>
|
|
|
787
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>
|
|
788
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>
|
|
789
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>
|
|
790
|
-
<li><a href="#insert" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>insert</span></a></li>
|
|
791
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>
|
|
792
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>
|
|
793
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>
|
|
794
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>
|
|
@@ -845,6 +919,7 @@ given array.</p>
|
|
|
845
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>
|
|
846
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>
|
|
847
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>
|
|
848
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>
|
|
849
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>
|
|
850
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>
|