data-structure-typed 1.16.1 → 1.17.0
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 +195 -68
- package/dist/data-structures/linked-list/doubly-linked-list.js +456 -244
- package/dist/data-structures/linked-list/singly-linked-list.d.ts +126 -241
- package/dist/data-structures/linked-list/singly-linked-list.js +331 -628
- package/dist/data-structures/types/binary-tree.d.ts +0 -5
- package/docs/assets/search.js +1 -1
- package/docs/classes/AVLTree.html +93 -94
- package/docs/classes/AVLTreeNode.html +36 -37
- package/docs/classes/AaTree.html +1 -2
- package/docs/classes/AbstractEdge.html +11 -12
- package/docs/classes/AbstractGraph.html +29 -30
- package/docs/classes/AbstractVertex.html +6 -7
- package/docs/classes/ArrayDeque.html +14 -15
- package/docs/classes/BST.html +86 -87
- package/docs/classes/BSTNode.html +36 -37
- package/docs/classes/BTree.html +1 -2
- package/docs/classes/BinaryIndexedTree.html +7 -8
- package/docs/classes/BinaryTree.html +82 -83
- package/docs/classes/BinaryTreeNode.html +36 -37
- package/docs/classes/Character.html +4 -5
- package/docs/classes/CoordinateMap.html +10 -11
- package/docs/classes/CoordinateSet.html +9 -10
- package/docs/classes/Deque.html +496 -366
- package/docs/classes/DirectedEdge.html +17 -18
- package/docs/classes/DirectedGraph.html +41 -42
- package/docs/classes/DirectedVertex.html +6 -7
- package/docs/classes/DoublyLinkedList.html +479 -321
- package/docs/classes/DoublyLinkedListNode.html +52 -36
- package/docs/classes/Heap.html +20 -21
- package/docs/classes/HeapItem.html +8 -9
- package/docs/classes/Matrix2D.html +16 -17
- package/docs/classes/MatrixNTI2D.html +4 -5
- package/docs/classes/MaxHeap.html +20 -21
- package/docs/classes/MaxPriorityQueue.html +34 -35
- package/docs/classes/MinHeap.html +20 -21
- package/docs/classes/MinPriorityQueue.html +34 -35
- package/docs/classes/Navigator.html +10 -11
- package/docs/classes/ObjectDeque.html +25 -26
- package/docs/classes/PriorityQueue.html +32 -33
- package/docs/classes/Queue.html +14 -15
- package/docs/classes/RBTree.html +1 -2
- package/docs/classes/SegmentTree.html +12 -13
- package/docs/classes/SegmentTreeNode.html +26 -27
- package/docs/classes/SinglyLinkedList.html +248 -635
- package/docs/classes/SinglyLinkedListNode.html +39 -167
- package/docs/classes/SplayTree.html +1 -2
- package/docs/classes/Stack.html +12 -13
- package/docs/classes/TreeMultiSet.html +86 -87
- package/docs/classes/TreeNode.html +8 -9
- package/docs/classes/Trie.html +13 -14
- package/docs/classes/TrieNode.html +11 -12
- package/docs/classes/TwoThreeTree.html +1 -2
- package/docs/classes/UndirectedEdge.html +13 -14
- package/docs/classes/UndirectedGraph.html +35 -36
- package/docs/classes/UndirectedVertex.html +6 -7
- package/docs/classes/Vector2D.html +28 -29
- package/docs/enums/CP.html +4 -5
- package/docs/enums/FamilyPosition.html +4 -5
- package/docs/enums/LoopType.html +3 -4
- package/docs/index.html +2 -3
- package/docs/interfaces/AVLTreeDeleted.html +3 -4
- package/docs/interfaces/HeapOptions.html +2 -3
- package/docs/interfaces/IDirectedGraph.html +7 -8
- package/docs/interfaces/IGraph.html +19 -20
- package/docs/interfaces/NavigatorParams.html +5 -6
- package/docs/interfaces/PriorityQueueOptions.html +4 -5
- package/docs/modules.html +0 -2
- package/docs/types/BSTComparator.html +1 -2
- package/docs/types/BSTDeletedResult.html +1 -2
- package/docs/types/BinaryTreeDeleted.html +1 -2
- package/docs/types/BinaryTreeNodeId.html +1 -2
- package/docs/types/BinaryTreeNodePropertyName.html +1 -2
- package/docs/types/DFSOrderPattern.html +1 -2
- package/docs/types/DijkstraResult.html +1 -2
- package/docs/types/Direction.html +1 -2
- package/docs/types/DoublyLinkedListGetBy.html +1 -2
- package/docs/types/NodeOrPropertyName.html +1 -2
- package/docs/types/PriorityQueueComparator.html +1 -2
- package/docs/types/PriorityQueueDFSOrderPattern.html +1 -2
- package/docs/types/ResultByProperty.html +1 -2
- package/docs/types/ResultsByProperty.html +1 -2
- package/docs/types/SegmentTreeNodeVal.html +1 -2
- package/docs/types/SpecifyOptional.html +1 -2
- package/docs/types/Thunk.html +1 -2
- package/docs/types/ToThunkFn.html +1 -2
- package/docs/types/TopologicalStatus.html +1 -2
- package/docs/types/TreeMultiSetDeletedResult.html +1 -2
- package/docs/types/TrlAsyncFn.html +1 -2
- package/docs/types/TrlFn.html +1 -2
- package/docs/types/Turning.html +1 -2
- package/docs/types/VertexId.html +1 -2
- package/package.json +1 -3
- package/docs/interfaces/BinaryTreeNodeObj.html +0 -168
package/docs/classes/Deque.html
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<ul class="tsd-hierarchy">
|
|
28
28
|
<li><span class="target">Deque</span></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/dcec645/src/data-structures/queue/deque.ts#L12">src/data-structures/queue/deque.ts:12</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">
|
|
@@ -38,33 +38,38 @@
|
|
|
38
38
|
<div class="tsd-index-list"><a href="Deque.html#constructor" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-512"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g></svg><span>constructor</span></a>
|
|
39
39
|
</div></section>
|
|
40
40
|
<section class="tsd-index-section">
|
|
41
|
-
<h3 class="tsd-index-heading">Properties</h3>
|
|
42
|
-
<div class="tsd-index-list"><a href="Deque.html#_first" class="tsd-index-link tsd-is-protected tsd-is-inherited"><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>_first</span></a>
|
|
43
|
-
<a href="Deque.html#_last" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_last</span></a>
|
|
44
|
-
<a href="Deque.html#_size" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_size</span></a>
|
|
45
|
-
</div></section>
|
|
46
|
-
<section class="tsd-index-section">
|
|
47
41
|
<h3 class="tsd-index-heading">Accessors</h3>
|
|
48
|
-
<div class="tsd-index-list"><a href="Deque.html#
|
|
49
|
-
<a href="Deque.html#
|
|
50
|
-
<a href="Deque.html#
|
|
42
|
+
<div class="tsd-index-list"><a href="Deque.html#head" class="tsd-index-link tsd-is-inherited"><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>
|
|
43
|
+
<a href="Deque.html#length" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>length</span></a>
|
|
44
|
+
<a href="Deque.html#tail" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>tail</span></a>
|
|
51
45
|
</div></section>
|
|
52
46
|
<section class="tsd-index-section">
|
|
53
47
|
<h3 class="tsd-index-heading">Methods</h3>
|
|
54
|
-
<div class="tsd-index-list"><a href="Deque.html#
|
|
55
|
-
<a href="Deque.html#
|
|
56
|
-
<a href="Deque.html#
|
|
57
|
-
<a href="Deque.html#
|
|
58
|
-
<a href="Deque.html#
|
|
59
|
-
<a href="Deque.html#
|
|
48
|
+
<div class="tsd-index-list"><a href="Deque.html#clear" class="tsd-index-link tsd-is-inherited"><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>
|
|
49
|
+
<a href="Deque.html#delete" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>delete</span></a>
|
|
50
|
+
<a href="Deque.html#deleteAt" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>delete<wbr/>At</span></a>
|
|
51
|
+
<a href="Deque.html#filter" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>filter</span></a>
|
|
52
|
+
<a href="Deque.html#find" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>find</span></a>
|
|
53
|
+
<a href="Deque.html#findLast" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>find<wbr/>Last</span></a>
|
|
54
|
+
<a href="Deque.html#findNode" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>find<wbr/>Node</span></a>
|
|
55
|
+
<a href="Deque.html#forEach" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>for<wbr/>Each</span></a>
|
|
56
|
+
<a href="Deque.html#getAt" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>At</span></a>
|
|
57
|
+
<a href="Deque.html#getLength" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Length</span></a>
|
|
58
|
+
<a href="Deque.html#getNodeAt" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Node<wbr/>At</span></a>
|
|
59
|
+
<a href="Deque.html#indexOf" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>index<wbr/>Of</span></a>
|
|
60
60
|
<a href="Deque.html#insert" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>insert</span></a>
|
|
61
|
-
<a href="Deque.html#
|
|
62
|
-
<a href="Deque.html#
|
|
63
|
-
<a href="Deque.html#
|
|
64
|
-
<a href="Deque.html#
|
|
65
|
-
<a href="Deque.html#
|
|
66
|
-
<a href="Deque.html#
|
|
67
|
-
<a href="Deque.html#
|
|
61
|
+
<a href="Deque.html#insertAfter" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>insert<wbr/>After</span></a>
|
|
62
|
+
<a href="Deque.html#insertBefore" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>insert<wbr/>Before</span></a>
|
|
63
|
+
<a href="Deque.html#map" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>map</span></a>
|
|
64
|
+
<a href="Deque.html#pop" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>pop</span></a>
|
|
65
|
+
<a href="Deque.html#push" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>push</span></a>
|
|
66
|
+
<a href="Deque.html#reduce" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>reduce</span></a>
|
|
67
|
+
<a href="Deque.html#reverse" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>reverse</span></a>
|
|
68
|
+
<a href="Deque.html#shift" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>shift</span></a>
|
|
69
|
+
<a href="Deque.html#toArray" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>to<wbr/>Array</span></a>
|
|
70
|
+
<a href="Deque.html#toArrayReverse" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>to<wbr/>Array<wbr/>Reverse</span></a>
|
|
71
|
+
<a href="Deque.html#unshift" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>unshift</span></a>
|
|
72
|
+
<a href="Deque.html#fromArray" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>from<wbr/>Array</span></a>
|
|
68
73
|
</div></section></div></details></section></section>
|
|
69
74
|
<section class="tsd-panel-group tsd-member-group">
|
|
70
75
|
<h2>Constructors</h2>
|
|
@@ -73,568 +78,686 @@
|
|
|
73
78
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
74
79
|
<li class="tsd-signature tsd-anchor-link" id="constructor.new_Deque"><span class="tsd-kind-constructor-signature">new <wbr/>Deque</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="Deque.html" class="tsd-signature-type tsd-kind-class">Deque</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_Deque" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
75
80
|
<li class="tsd-description">
|
|
81
|
+
<div class="tsd-comment tsd-typography"><p>The constructor initializes the linked list with an empty head, tail, and length.</p>
|
|
82
|
+
</div>
|
|
76
83
|
<section class="tsd-panel">
|
|
77
84
|
<h4>Type Parameters</h4>
|
|
78
85
|
<ul class="tsd-type-parameter-list">
|
|
79
86
|
<li>
|
|
80
87
|
<h4><span class="tsd-kind-type-parameter">T</span></h4></li></ul></section>
|
|
81
|
-
<h4 class="tsd-returns-title">Returns <a href="Deque.html" class="tsd-signature-type tsd-kind-class">Deque</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
|
|
88
|
+
<h4 class="tsd-returns-title">Returns <a href="Deque.html" class="tsd-signature-type tsd-kind-class">Deque</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>
|
|
89
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
82
90
|
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#constructor">constructor</a></p>
|
|
83
91
|
<ul>
|
|
84
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
85
|
-
<section class="tsd-panel-group tsd-member-group">
|
|
86
|
-
<h2>Properties</h2>
|
|
87
|
-
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_first" class="tsd-anchor"></a>
|
|
88
|
-
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_first</span><a href="#_first" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
89
|
-
<div class="tsd-signature"><span class="tsd-kind-property">_first</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">
|
|
90
|
-
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#_first">_first</a></p>
|
|
91
|
-
<ul>
|
|
92
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/doubly-linked-list.ts#L55">src/data-structures/linked-list/doubly-linked-list.ts:55</a></li></ul></aside></section>
|
|
93
|
-
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_last" class="tsd-anchor"></a>
|
|
94
|
-
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_last</span><a href="#_last" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
95
|
-
<div class="tsd-signature"><span class="tsd-kind-property">_last</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">
|
|
96
|
-
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#_last">_last</a></p>
|
|
97
|
-
<ul>
|
|
98
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/doubly-linked-list.ts#L65">src/data-structures/linked-list/doubly-linked-list.ts:65</a></li></ul></aside></section>
|
|
99
|
-
<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_size" class="tsd-anchor"></a>
|
|
100
|
-
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_size</span><a href="#_size" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
101
|
-
<div class="tsd-signature"><span class="tsd-kind-property">_size</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources">
|
|
102
|
-
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#_size">_size</a></p>
|
|
103
|
-
<ul>
|
|
104
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/doubly-linked-list.ts#L74">src/data-structures/linked-list/doubly-linked-list.ts:74</a></li></ul></aside></section></section>
|
|
92
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/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>
|
|
105
93
|
<section class="tsd-panel-group tsd-member-group">
|
|
106
94
|
<h2>Accessors</h2>
|
|
107
|
-
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="
|
|
108
|
-
<h3 class="tsd-anchor-link"><span>
|
|
95
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="head" class="tsd-anchor"></a>
|
|
96
|
+
<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>
|
|
109
97
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
110
|
-
<li class="tsd-signature" id="
|
|
98
|
+
<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>
|
|
111
99
|
<li class="tsd-description">
|
|
112
100
|
<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">
|
|
113
|
-
<p>Inherited from DoublyLinkedList.
|
|
101
|
+
<p>Inherited from DoublyLinkedList.head</p>
|
|
114
102
|
<ul>
|
|
115
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
116
|
-
<li class="tsd-signature" id="
|
|
103
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/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>
|
|
104
|
+
<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>
|
|
117
105
|
<li class="tsd-description">
|
|
118
106
|
<div class="tsd-parameters">
|
|
119
107
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
120
108
|
<ul class="tsd-parameter-list">
|
|
121
109
|
<li>
|
|
122
|
-
<h5><span class="tsd-kind-parameter">
|
|
110
|
+
<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>
|
|
123
111
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
124
|
-
<p>Inherited from DoublyLinkedList.
|
|
112
|
+
<p>Inherited from DoublyLinkedList.head</p>
|
|
125
113
|
<ul>
|
|
126
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
127
|
-
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="
|
|
128
|
-
<h3 class="tsd-anchor-link"><span>
|
|
114
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/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>
|
|
115
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="length" class="tsd-anchor"></a>
|
|
116
|
+
<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>
|
|
129
117
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
130
|
-
<li class="tsd-signature" id="
|
|
118
|
+
<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>
|
|
131
119
|
<li class="tsd-description">
|
|
132
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">
|
|
133
|
-
<p>Inherited from DoublyLinkedList.
|
|
120
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
121
|
+
<p>Inherited from DoublyLinkedList.length</p>
|
|
134
122
|
<ul>
|
|
135
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
136
|
-
<li class="tsd-signature" id="
|
|
123
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/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>
|
|
124
|
+
<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>
|
|
137
125
|
<li class="tsd-description">
|
|
138
126
|
<div class="tsd-parameters">
|
|
139
127
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
140
128
|
<ul class="tsd-parameter-list">
|
|
141
129
|
<li>
|
|
142
|
-
<h5><span class="tsd-kind-parameter">
|
|
130
|
+
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
|
143
131
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
144
|
-
<p>Inherited from DoublyLinkedList.
|
|
132
|
+
<p>Inherited from DoublyLinkedList.length</p>
|
|
145
133
|
<ul>
|
|
146
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
147
|
-
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="
|
|
148
|
-
<h3 class="tsd-anchor-link"><span>
|
|
134
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/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>
|
|
135
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="tail" class="tsd-anchor"></a>
|
|
136
|
+
<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>
|
|
149
137
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
150
|
-
<li class="tsd-signature" id="
|
|
138
|
+
<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>
|
|
151
139
|
<li class="tsd-description">
|
|
152
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">
|
|
153
|
-
<p>Inherited from DoublyLinkedList.
|
|
140
|
+
<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">
|
|
141
|
+
<p>Inherited from DoublyLinkedList.tail</p>
|
|
154
142
|
<ul>
|
|
155
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
156
|
-
<li class="tsd-signature" id="
|
|
143
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/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>
|
|
144
|
+
<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>
|
|
157
145
|
<li class="tsd-description">
|
|
158
146
|
<div class="tsd-parameters">
|
|
159
147
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
160
148
|
<ul class="tsd-parameter-list">
|
|
161
149
|
<li>
|
|
162
|
-
<h5><span class="tsd-kind-parameter">
|
|
150
|
+
<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>
|
|
163
151
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
164
|
-
<p>Inherited from DoublyLinkedList.
|
|
152
|
+
<p>Inherited from DoublyLinkedList.tail</p>
|
|
165
153
|
<ul>
|
|
166
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
154
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/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>
|
|
167
155
|
<section class="tsd-panel-group tsd-member-group">
|
|
168
156
|
<h2>Methods</h2>
|
|
169
|
-
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="
|
|
170
|
-
<h3 class="tsd-anchor-link"><span>
|
|
157
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="clear" class="tsd-anchor"></a>
|
|
158
|
+
<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>
|
|
171
159
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
172
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
160
|
+
<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>
|
|
173
161
|
<li class="tsd-description">
|
|
174
|
-
<div class="tsd-comment tsd-typography"><p>The function
|
|
175
|
-
</div>
|
|
176
|
-
<div class="tsd-parameters">
|
|
177
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
178
|
-
<ul class="tsd-parameter-list">
|
|
179
|
-
<li>
|
|
180
|
-
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
181
|
-
<div class="tsd-comment tsd-typography"><p>The <code>val</code> parameter represents the value of the element that you want to add to the beginning of
|
|
182
|
-
the doubly linked list.</p>
|
|
162
|
+
<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>
|
|
183
163
|
</div>
|
|
184
|
-
<
|
|
185
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>A boolean value is being returned.</p>
|
|
186
|
-
|
|
164
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
187
165
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
188
|
-
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#
|
|
166
|
+
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#clear">clear</a></p>
|
|
189
167
|
<ul>
|
|
190
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
191
|
-
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="
|
|
192
|
-
<h3 class="tsd-anchor-link"><span>
|
|
168
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/doubly-linked-list.ts#L334">src/data-structures/linked-list/doubly-linked-list.ts:334</a></li></ul></aside></li></ul></section>
|
|
169
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="delete" class="tsd-anchor"></a>
|
|
170
|
+
<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>
|
|
193
171
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
194
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
172
|
+
<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">val</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>
|
|
195
173
|
<li class="tsd-description">
|
|
196
|
-
<div class="tsd-comment tsd-typography"><p>The function
|
|
174
|
+
<div class="tsd-comment tsd-typography"><p>The <code>delete</code> function removes a node with a specific value from a doubly linked list.</p>
|
|
197
175
|
</div>
|
|
198
176
|
<div class="tsd-parameters">
|
|
199
177
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
200
178
|
<ul class="tsd-parameter-list">
|
|
201
179
|
<li>
|
|
202
180
|
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
203
|
-
<div class="tsd-comment tsd-typography"><p>The <code>val</code> parameter represents the value
|
|
204
|
-
doubly linked list.</p>
|
|
181
|
+
<div class="tsd-comment tsd-typography"><p>The <code>val</code> parameter represents the value that you want to delete from the linked list.</p>
|
|
205
182
|
</div>
|
|
206
183
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
207
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>a boolean value
|
|
184
|
+
<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 <code>val</code> is found and deleted from
|
|
185
|
+
the linked list, and <code>false</code> if the value is not found in the linked list.</p>
|
|
208
186
|
|
|
209
187
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
210
|
-
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#
|
|
188
|
+
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#delete">delete</a></p>
|
|
211
189
|
<ul>
|
|
212
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
213
|
-
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="
|
|
214
|
-
<h3 class="tsd-anchor-link"><span>
|
|
190
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/doubly-linked-list.ts#L295">src/data-structures/linked-list/doubly-linked-list.ts:295</a></li></ul></aside></li></ul></section>
|
|
191
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="deleteAt" class="tsd-anchor"></a>
|
|
192
|
+
<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>
|
|
215
193
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
216
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
194
|
+
<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>
|
|
217
195
|
<li class="tsd-description">
|
|
218
|
-
<div class="tsd-comment tsd-typography"><p>
|
|
219
|
-
If index = 0; first element in the list is returned.
|
|
220
|
-
If index = 3; fourth element in the list is returned.</p>
|
|
196
|
+
<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>
|
|
221
197
|
</div>
|
|
222
198
|
<div class="tsd-parameters">
|
|
223
199
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
224
200
|
<ul class="tsd-parameter-list">
|
|
225
201
|
<li>
|
|
226
202
|
<h5><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></h5>
|
|
227
|
-
<div class="tsd-comment tsd-typography"><p>
|
|
203
|
+
<div class="tsd-comment tsd-typography"><p>The index parameter represents the position of the element that needs to be deleted in the
|
|
204
|
+
data structure. It is of type number.</p>
|
|
228
205
|
</div>
|
|
229
206
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
230
|
-
<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>
|
|
207
|
+
<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
|
|
208
|
+
bounds.</p>
|
|
209
|
+
|
|
231
210
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
232
|
-
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#
|
|
211
|
+
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#deleteAt">deleteAt</a></p>
|
|
233
212
|
<ul>
|
|
234
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
235
|
-
<
|
|
213
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/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>
|
|
214
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="filter" class="tsd-anchor"></a>
|
|
215
|
+
<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>
|
|
216
|
+
<ul class="tsd-signatures tsd-is-inherited">
|
|
217
|
+
<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>
|
|
236
218
|
<li class="tsd-description">
|
|
237
|
-
<div class="tsd-comment tsd-typography"><p>
|
|
238
|
-
|
|
239
|
-
If index = 3; fourth element in the list is returned.</p>
|
|
219
|
+
<div class="tsd-comment tsd-typography"><p>The <code>filter</code> function iterates through a DoublyLinkedList and returns a new DoublyLinkedList containing only the
|
|
220
|
+
elements that satisfy the given callback function.</p>
|
|
240
221
|
</div>
|
|
241
222
|
<div class="tsd-parameters">
|
|
242
223
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
243
224
|
<ul class="tsd-parameter-list">
|
|
244
225
|
<li>
|
|
245
|
-
<h5><span class="tsd-kind-parameter">
|
|
246
|
-
<div class="tsd-comment tsd-typography"><p>
|
|
247
|
-
|
|
248
|
-
|
|
226
|
+
<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>
|
|
227
|
+
<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.
|
|
228
|
+
It is used to determine whether a value should be included in the filtered list or not.</p>
|
|
229
|
+
</div>
|
|
230
|
+
<div class="tsd-comment tsd-typography"></div>
|
|
231
|
+
<ul class="tsd-parameters">
|
|
232
|
+
<li class="tsd-parameter-signature">
|
|
233
|
+
<ul class="tsd-signatures">
|
|
234
|
+
<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>
|
|
235
|
+
<li class="tsd-description">
|
|
236
|
+
<div class="tsd-parameters">
|
|
237
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
238
|
+
<ul class="tsd-parameter-list">
|
|
249
239
|
<li>
|
|
250
|
-
<h5><span class="tsd-kind-parameter">
|
|
251
|
-
<
|
|
252
|
-
</
|
|
253
|
-
|
|
254
|
-
<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>
|
|
240
|
+
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5></li></ul></div>
|
|
241
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></li></ul></li></ul></div>
|
|
242
|
+
<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>
|
|
243
|
+
|
|
255
244
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
256
|
-
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#
|
|
245
|
+
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#filter">filter</a></p>
|
|
257
246
|
<ul>
|
|
258
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
259
|
-
<
|
|
247
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/doubly-linked-list.ts#L465">src/data-structures/linked-list/doubly-linked-list.ts:465</a></li></ul></aside></li></ul></section>
|
|
248
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="find" class="tsd-anchor"></a>
|
|
249
|
+
<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>
|
|
250
|
+
<ul class="tsd-signatures tsd-is-inherited">
|
|
251
|
+
<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>
|
|
260
252
|
<li class="tsd-description">
|
|
261
|
-
<div class="tsd-comment tsd-typography"><p>
|
|
262
|
-
If index = 0; first element in the list is returned.
|
|
263
|
-
If index = 3; fourth element in the list is returned.</p>
|
|
253
|
+
<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>
|
|
264
254
|
</div>
|
|
265
255
|
<div class="tsd-parameters">
|
|
266
256
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
267
257
|
<ul class="tsd-parameter-list">
|
|
268
258
|
<li>
|
|
269
|
-
<h5><span class="tsd-kind-parameter">
|
|
270
|
-
<div class="tsd-comment tsd-typography"><p>
|
|
271
|
-
|
|
272
|
-
|
|
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>A function that takes a value of type T as its parameter and returns a boolean value. This
|
|
261
|
+
function is used to determine whether a particular value in the linked list satisfies a certain condition.</p>
|
|
262
|
+
</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">
|
|
273
272
|
<li>
|
|
274
|
-
<h5><span class="tsd-kind-parameter">
|
|
275
|
-
<
|
|
276
|
-
</
|
|
277
|
-
|
|
278
|
-
|
|
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 <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
|
|
276
|
+
the callback function. If no element satisfies the condition, it returns <code>null</code>.</p>
|
|
277
|
+
|
|
279
278
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
280
|
-
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#
|
|
279
|
+
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#find">find</a></p>
|
|
281
280
|
<ul>
|
|
282
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
283
|
-
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="
|
|
284
|
-
<h3 class="tsd-anchor-link"><span>
|
|
281
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/doubly-linked-list.ts#L347">src/data-structures/linked-list/doubly-linked-list.ts:347</a></li></ul></aside></li></ul></section>
|
|
282
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="findLast" class="tsd-anchor"></a>
|
|
283
|
+
<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>
|
|
285
284
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
286
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
285
|
+
<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>
|
|
287
286
|
<li class="tsd-description">
|
|
288
|
-
<div class="tsd-comment tsd-typography"><p>
|
|
287
|
+
<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
|
|
288
|
+
value that satisfies the given callback function, or null if no value satisfies the callback.</p>
|
|
289
289
|
</div>
|
|
290
|
-
<
|
|
290
|
+
<div class="tsd-parameters">
|
|
291
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
292
|
+
<ul class="tsd-parameter-list">
|
|
293
|
+
<li>
|
|
294
|
+
<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>
|
|
295
|
+
<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
|
|
296
|
+
function is used to determine whether a given value satisfies a certain condition.</p>
|
|
297
|
+
</div>
|
|
298
|
+
<div class="tsd-comment tsd-typography"></div>
|
|
299
|
+
<ul class="tsd-parameters">
|
|
300
|
+
<li class="tsd-parameter-signature">
|
|
301
|
+
<ul class="tsd-signatures">
|
|
302
|
+
<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>
|
|
303
|
+
<li class="tsd-description">
|
|
304
|
+
<div class="tsd-parameters">
|
|
305
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
306
|
+
<ul class="tsd-parameter-list">
|
|
307
|
+
<li>
|
|
308
|
+
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5></li></ul></div>
|
|
309
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></li></ul></li></ul></div>
|
|
310
|
+
<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
|
|
311
|
+
the callback function. If no value satisfies the condition, it returns <code>null</code>.</p>
|
|
312
|
+
|
|
291
313
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
292
|
-
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#
|
|
314
|
+
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#findLast">findLast</a></p>
|
|
293
315
|
<ul>
|
|
294
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
295
|
-
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="
|
|
296
|
-
<h3 class="tsd-anchor-link"><span>
|
|
316
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/doubly-linked-list.ts#L386">src/data-structures/linked-list/doubly-linked-list.ts:386</a></li></ul></aside></li></ul></section>
|
|
317
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="findNode" class="tsd-anchor"></a>
|
|
318
|
+
<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>
|
|
297
319
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
298
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
320
|
+
<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>
|
|
299
321
|
<li class="tsd-description">
|
|
300
|
-
<div class="tsd-comment tsd-typography"><p>
|
|
322
|
+
<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
|
|
323
|
+
node if found, otherwise it returns null.</p>
|
|
324
|
+
</div>
|
|
325
|
+
<div class="tsd-parameters">
|
|
326
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
327
|
+
<ul class="tsd-parameter-list">
|
|
328
|
+
<li>
|
|
329
|
+
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
330
|
+
<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>
|
|
301
331
|
</div>
|
|
302
|
-
<
|
|
332
|
+
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
333
|
+
<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>
|
|
334
|
+
is found in the linked list. If no such node is found, it returns <code>null</code>.</p>
|
|
335
|
+
|
|
303
336
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
304
|
-
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#
|
|
337
|
+
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#findNode">findNode</a></p>
|
|
305
338
|
<ul>
|
|
306
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
307
|
-
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="
|
|
308
|
-
<h3 class="tsd-anchor-link"><span>
|
|
339
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/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>
|
|
340
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="forEach" class="tsd-anchor"></a>
|
|
341
|
+
<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>
|
|
309
342
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
310
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
343
|
+
<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>
|
|
311
344
|
<li class="tsd-description">
|
|
312
|
-
<div class="tsd-comment tsd-typography"><p>
|
|
345
|
+
<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>
|
|
313
346
|
</div>
|
|
314
|
-
<
|
|
347
|
+
<div class="tsd-parameters">
|
|
348
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
349
|
+
<ul class="tsd-parameter-list">
|
|
350
|
+
<li>
|
|
351
|
+
<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>
|
|
352
|
+
<div class="tsd-comment tsd-typography"><p>The callback parameter is a function that takes two arguments: val and index. The val argument
|
|
353
|
+
represents the value of the current node in the linked list, and the index argument represents the index of the
|
|
354
|
+
current node in the linked list.</p>
|
|
355
|
+
</div>
|
|
356
|
+
<div class="tsd-comment tsd-typography"></div>
|
|
357
|
+
<ul class="tsd-parameters">
|
|
358
|
+
<li class="tsd-parameter-signature">
|
|
359
|
+
<ul class="tsd-signatures">
|
|
360
|
+
<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>
|
|
361
|
+
<li class="tsd-description">
|
|
362
|
+
<div class="tsd-parameters">
|
|
363
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
364
|
+
<ul class="tsd-parameter-list">
|
|
365
|
+
<li>
|
|
366
|
+
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5></li>
|
|
367
|
+
<li>
|
|
368
|
+
<h5><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
|
369
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul></div>
|
|
370
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
315
371
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
316
|
-
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#
|
|
372
|
+
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#forEach">forEach</a></p>
|
|
317
373
|
<ul>
|
|
318
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
319
|
-
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="
|
|
320
|
-
<h3 class="tsd-anchor-link"><span>
|
|
374
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/doubly-linked-list.ts#L430">src/data-structures/linked-list/doubly-linked-list.ts:430</a></li></ul></aside></li></ul></section>
|
|
375
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getAt" class="tsd-anchor"></a>
|
|
376
|
+
<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>
|
|
321
377
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
322
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
378
|
+
<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>
|
|
323
379
|
<li class="tsd-description">
|
|
324
|
-
<div class="tsd-comment tsd-typography"><p>
|
|
380
|
+
<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>
|
|
325
381
|
</div>
|
|
326
382
|
<div class="tsd-parameters">
|
|
327
383
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
328
384
|
<ul class="tsd-parameter-list">
|
|
329
385
|
<li>
|
|
330
386
|
<h5><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></h5>
|
|
331
|
-
<div class="tsd-comment tsd-typography"><p>
|
|
332
|
-
|
|
333
|
-
<div class="tsd-comment tsd-typography"></div></li>
|
|
334
|
-
<li>
|
|
335
|
-
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
336
|
-
<div class="tsd-comment tsd-typography"><p>Value of the new node to be inserted</p>
|
|
387
|
+
<div class="tsd-comment tsd-typography"><p>The index parameter is a number that represents the position of the element we want to
|
|
388
|
+
retrieve from the list.</p>
|
|
337
389
|
</div>
|
|
338
390
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
339
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">
|
|
391
|
+
<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
|
|
392
|
+
or the linked list is empty, it will return null.</p>
|
|
393
|
+
|
|
340
394
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
341
|
-
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#
|
|
395
|
+
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#getAt">getAt</a></p>
|
|
342
396
|
<ul>
|
|
343
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
344
|
-
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="
|
|
345
|
-
<h3 class="tsd-anchor-link"><span>
|
|
397
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/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>
|
|
398
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getLength" class="tsd-anchor"></a>
|
|
399
|
+
<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>
|
|
346
400
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
347
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
401
|
+
<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>
|
|
348
402
|
<li class="tsd-description">
|
|
349
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">
|
|
350
|
-
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#
|
|
403
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
404
|
+
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#getLength">getLength</a></p>
|
|
351
405
|
<ul>
|
|
352
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
353
|
-
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="
|
|
354
|
-
<h3 class="tsd-anchor-link"><span>
|
|
406
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/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>
|
|
407
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="getNodeAt" class="tsd-anchor"></a>
|
|
408
|
+
<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>
|
|
355
409
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
356
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
410
|
+
<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>
|
|
357
411
|
<li class="tsd-description">
|
|
358
|
-
<div class="tsd-comment tsd-typography"><p>The <code>
|
|
359
|
-
|
|
412
|
+
<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
|
|
413
|
+
range.</p>
|
|
414
|
+
</div>
|
|
415
|
+
<div class="tsd-parameters">
|
|
416
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
417
|
+
<ul class="tsd-parameter-list">
|
|
418
|
+
<li>
|
|
419
|
+
<h5><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></h5>
|
|
420
|
+
<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
|
|
421
|
+
retrieve from the doubly linked list. It indicates the zero-based index of the node we want to access.</p>
|
|
360
422
|
</div>
|
|
361
|
-
<
|
|
362
|
-
|
|
423
|
+
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
424
|
+
<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
|
|
425
|
+
valid range of the linked list, otherwise it returns <code>null</code>.</p>
|
|
363
426
|
|
|
364
427
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
365
|
-
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#
|
|
428
|
+
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#getNodeAt">getNodeAt</a></p>
|
|
366
429
|
<ul>
|
|
367
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
368
|
-
<
|
|
430
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/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>
|
|
431
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="indexOf" class="tsd-anchor"></a>
|
|
432
|
+
<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>
|
|
433
|
+
<ul class="tsd-signatures tsd-is-inherited">
|
|
434
|
+
<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>
|
|
369
435
|
<li class="tsd-description">
|
|
370
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
371
|
-
parameter.</p>
|
|
436
|
+
<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>
|
|
372
437
|
</div>
|
|
373
438
|
<div class="tsd-parameters">
|
|
374
439
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
375
440
|
<ul class="tsd-parameter-list">
|
|
376
441
|
<li>
|
|
377
|
-
<h5><span class="tsd-kind-parameter">
|
|
378
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
379
|
-
|
|
442
|
+
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
443
|
+
<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
|
|
444
|
+
that we are searching for in the linked list.</p>
|
|
380
445
|
</div>
|
|
381
446
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
382
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">
|
|
383
|
-
the value
|
|
447
|
+
<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
|
|
448
|
+
list. If the value is not found, it returns -1.</p>
|
|
384
449
|
|
|
385
450
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
386
|
-
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#
|
|
451
|
+
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#indexOf">indexOf</a></p>
|
|
387
452
|
<ul>
|
|
388
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
389
|
-
<
|
|
453
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/doubly-linked-list.ts#L365">src/data-structures/linked-list/doubly-linked-list.ts:365</a></li></ul></aside></li></ul></section>
|
|
454
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="insert" class="tsd-anchor"></a>
|
|
455
|
+
<h3 class="tsd-anchor-link"><span>insert</span><a href="#insert" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
456
|
+
<ul class="tsd-signatures tsd-is-inherited">
|
|
457
|
+
<li class="tsd-signature tsd-anchor-link" id="insert.insert-1"><span class="tsd-kind-call-signature">insert</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="#insert.insert-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
390
458
|
<li class="tsd-description">
|
|
391
|
-
<div class="tsd-comment tsd-typography"><p>The <code>
|
|
392
|
-
parameter.</p>
|
|
459
|
+
<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>
|
|
393
460
|
</div>
|
|
394
461
|
<div class="tsd-parameters">
|
|
395
462
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
396
463
|
<ul class="tsd-parameter-list">
|
|
397
464
|
<li>
|
|
398
|
-
<h5><span class="tsd-kind-parameter">
|
|
399
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
400
|
-
|
|
465
|
+
<h5><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></h5>
|
|
466
|
+
<div class="tsd-comment tsd-typography"><p>The index parameter represents the position at which the new value should be inserted in the
|
|
467
|
+
DoublyLinkedList. It is of type number.</p>
|
|
468
|
+
</div>
|
|
469
|
+
<div class="tsd-comment tsd-typography"></div></li>
|
|
470
|
+
<li>
|
|
471
|
+
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
472
|
+
<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
|
|
473
|
+
specified index.</p>
|
|
401
474
|
</div>
|
|
402
475
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
403
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">
|
|
404
|
-
|
|
476
|
+
<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>
|
|
477
|
+
if the index is out of bounds.</p>
|
|
405
478
|
|
|
406
479
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
407
|
-
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#
|
|
480
|
+
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#insert">insert</a></p>
|
|
408
481
|
<ul>
|
|
409
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
410
|
-
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="
|
|
411
|
-
<h3 class="tsd-anchor-link"><span>
|
|
482
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/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>
|
|
483
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="insertAfter" class="tsd-anchor"></a>
|
|
484
|
+
<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>
|
|
412
485
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
413
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
486
|
+
<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">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="#insertAfter.insertAfter-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
414
487
|
<li class="tsd-description">
|
|
415
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
488
|
+
<div class="tsd-comment tsd-typography"><p>The function inserts a new value after an existing value in a doubly linked list.</p>
|
|
489
|
+
</div>
|
|
490
|
+
<div class="tsd-parameters">
|
|
491
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
492
|
+
<ul class="tsd-parameter-list">
|
|
493
|
+
<li>
|
|
494
|
+
<h5><span class="tsd-kind-parameter">existingValue</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
495
|
+
<div class="tsd-comment tsd-typography"><p>The existing value is the value of the node after which we want to insert the new value.</p>
|
|
416
496
|
</div>
|
|
417
|
-
<
|
|
497
|
+
<div class="tsd-comment tsd-typography"></div></li>
|
|
498
|
+
<li>
|
|
499
|
+
<h5><span class="tsd-kind-parameter">newValue</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
500
|
+
<div class="tsd-comment tsd-typography"><p>The <code>newValue</code> parameter represents the value of the new node that you want to insert after
|
|
501
|
+
the existing node.</p>
|
|
502
|
+
</div>
|
|
503
|
+
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
504
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The method is returning a boolean value. It returns true if the insertion is successful and false if the
|
|
505
|
+
existing value is not found in the linked list.</p>
|
|
418
506
|
|
|
419
507
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
420
|
-
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#
|
|
508
|
+
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#insertAfter">insertAfter</a></p>
|
|
421
509
|
<ul>
|
|
422
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
423
|
-
<
|
|
510
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/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>
|
|
511
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="insertBefore" class="tsd-anchor"></a>
|
|
512
|
+
<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>
|
|
513
|
+
<ul class="tsd-signatures tsd-is-inherited">
|
|
514
|
+
<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>
|
|
424
515
|
<li class="tsd-description">
|
|
425
|
-
<div class="tsd-comment tsd-typography"><p>The <code>
|
|
516
|
+
<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>
|
|
426
517
|
</div>
|
|
427
518
|
<div class="tsd-parameters">
|
|
428
519
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
429
520
|
<ul class="tsd-parameter-list">
|
|
430
521
|
<li>
|
|
431
|
-
<h5><span class="tsd-kind-parameter">
|
|
432
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
433
|
-
|
|
434
|
-
|
|
522
|
+
<h5><span class="tsd-kind-parameter">existingValue</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
523
|
+
<div class="tsd-comment tsd-typography"><p>The existing value is the value of the node that you want to insert the new value before.</p>
|
|
524
|
+
</div>
|
|
525
|
+
<div class="tsd-comment tsd-typography"></div></li>
|
|
526
|
+
<li>
|
|
527
|
+
<h5><span class="tsd-kind-parameter">newValue</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
528
|
+
<div class="tsd-comment tsd-typography"><p>The <code>newValue</code> parameter represents the value of the new node that you want to insert before
|
|
529
|
+
the existing node.</p>
|
|
435
530
|
</div>
|
|
436
531
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
437
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">
|
|
532
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The method is returning a boolean value. It returns true if the insertion is successful and false if the
|
|
533
|
+
existing value is not found in the linked list.</p>
|
|
438
534
|
|
|
439
535
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
440
|
-
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#
|
|
536
|
+
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#insertBefore">insertBefore</a></p>
|
|
441
537
|
<ul>
|
|
442
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
443
|
-
<
|
|
538
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/doubly-linked-list.ts#L534">src/data-structures/linked-list/doubly-linked-list.ts:534</a></li></ul></aside></li></ul></section>
|
|
539
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="map" class="tsd-anchor"></a>
|
|
540
|
+
<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>
|
|
541
|
+
<ul class="tsd-signatures tsd-is-inherited">
|
|
542
|
+
<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>
|
|
444
543
|
<li class="tsd-description">
|
|
445
|
-
<div class="tsd-comment tsd-typography"><p>The <code>
|
|
544
|
+
<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
|
|
545
|
+
DoublyLinkedList with the transformed values.</p>
|
|
446
546
|
</div>
|
|
547
|
+
<section class="tsd-panel">
|
|
548
|
+
<h4>Type Parameters</h4>
|
|
549
|
+
<ul class="tsd-type-parameter-list">
|
|
550
|
+
<li>
|
|
551
|
+
<h4><span class="tsd-kind-type-parameter">U</span></h4></li></ul></section>
|
|
447
552
|
<div class="tsd-parameters">
|
|
448
553
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
449
554
|
<ul class="tsd-parameter-list">
|
|
450
555
|
<li>
|
|
451
|
-
<h5><span class="tsd-kind-parameter">
|
|
452
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
</div>
|
|
456
|
-
<div class="tsd-comment tsd-typography"></div
|
|
457
|
-
<
|
|
556
|
+
<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>
|
|
557
|
+
<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
|
|
558
|
+
the original DoublyLinkedList) and returns a value of type U (the type of values that will be stored in the mapped
|
|
559
|
+
DoublyLinkedList).</p>
|
|
560
|
+
</div>
|
|
561
|
+
<div class="tsd-comment tsd-typography"></div>
|
|
562
|
+
<ul class="tsd-parameters">
|
|
563
|
+
<li class="tsd-parameter-signature">
|
|
564
|
+
<ul class="tsd-signatures">
|
|
565
|
+
<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>
|
|
566
|
+
<li class="tsd-description">
|
|
567
|
+
<div class="tsd-parameters">
|
|
568
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
569
|
+
<ul class="tsd-parameter-list">
|
|
570
|
+
<li>
|
|
571
|
+
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5></li></ul></div>
|
|
572
|
+
<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>
|
|
573
|
+
<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>
|
|
458
574
|
|
|
459
575
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
460
|
-
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#
|
|
576
|
+
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#map">map</a></p>
|
|
461
577
|
<ul>
|
|
462
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
463
|
-
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="
|
|
464
|
-
<h3 class="tsd-anchor-link"><span>
|
|
578
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/doubly-linked-list.ts#L448">src/data-structures/linked-list/doubly-linked-list.ts:448</a></li></ul></aside></li></ul></section>
|
|
579
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="pop" class="tsd-anchor"></a>
|
|
580
|
+
<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>
|
|
465
581
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
466
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
582
|
+
<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>
|
|
467
583
|
<li class="tsd-description">
|
|
468
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
469
|
-
value, depending on the specified parameter.</p>
|
|
584
|
+
<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>
|
|
470
585
|
</div>
|
|
471
|
-
<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
|
|
472
|
-
|
|
473
|
-
is set to 'node', the method returns the first node. If <code>by</code> is set to 'val', the method returns the value</p>
|
|
586
|
+
<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
|
|
587
|
+
list is empty, it returns null.</p>
|
|
474
588
|
|
|
475
589
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
476
|
-
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#
|
|
590
|
+
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#pop">pop</a></p>
|
|
477
591
|
<ul>
|
|
478
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
479
|
-
<
|
|
592
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/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>
|
|
593
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="push" class="tsd-anchor"></a>
|
|
594
|
+
<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>
|
|
595
|
+
<ul class="tsd-signatures tsd-is-inherited">
|
|
596
|
+
<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>
|
|
480
597
|
<li class="tsd-description">
|
|
481
|
-
<div class="tsd-comment tsd-typography"><p>The function
|
|
482
|
-
value, depending on the specified parameter.</p>
|
|
598
|
+
<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>
|
|
483
599
|
</div>
|
|
484
600
|
<div class="tsd-parameters">
|
|
485
601
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
486
602
|
<ul class="tsd-parameter-list">
|
|
487
603
|
<li>
|
|
488
|
-
<h5><span class="tsd-kind-parameter">
|
|
489
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
490
|
-
It specifies the criteria by which the first element should be retrieved from the doubly linked list. The default
|
|
491
|
-
value is 'val', which means the first element will be retrieved by its value. Other possible values for "by</p>
|
|
604
|
+
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
605
|
+
<div class="tsd-comment tsd-typography"><p>The value to be added to the linked list.</p>
|
|
492
606
|
</div>
|
|
493
607
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
494
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">
|
|
495
|
-
itself, or null if the list is empty. The specific return type depends on the value of the <code>by</code> parameter. If <code>by</code>
|
|
496
|
-
is set to 'node', the method returns the first node. If <code>by</code> is set to 'val', the method returns the value</p>
|
|
497
|
-
|
|
608
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
498
609
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
499
|
-
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#
|
|
610
|
+
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#push">push</a></p>
|
|
500
611
|
<ul>
|
|
501
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
502
|
-
<
|
|
612
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/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>
|
|
613
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="reduce" class="tsd-anchor"></a>
|
|
614
|
+
<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>
|
|
615
|
+
<ul class="tsd-signatures tsd-is-inherited">
|
|
616
|
+
<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>
|
|
503
617
|
<li class="tsd-description">
|
|
504
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
505
|
-
value
|
|
618
|
+
<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
|
|
619
|
+
single value.</p>
|
|
506
620
|
</div>
|
|
621
|
+
<section class="tsd-panel">
|
|
622
|
+
<h4>Type Parameters</h4>
|
|
623
|
+
<ul class="tsd-type-parameter-list">
|
|
624
|
+
<li>
|
|
625
|
+
<h4><span class="tsd-kind-type-parameter">U</span></h4></li></ul></section>
|
|
626
|
+
<div class="tsd-parameters">
|
|
627
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
628
|
+
<ul class="tsd-parameter-list">
|
|
629
|
+
<li>
|
|
630
|
+
<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>
|
|
631
|
+
<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
|
|
632
|
+
used to perform a specific operation on each element of the linked list.</p>
|
|
633
|
+
</div>
|
|
634
|
+
<div class="tsd-comment tsd-typography"></div>
|
|
635
|
+
<ul class="tsd-parameters">
|
|
636
|
+
<li class="tsd-parameter-signature">
|
|
637
|
+
<ul class="tsd-signatures">
|
|
638
|
+
<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>
|
|
639
|
+
<li class="tsd-description">
|
|
507
640
|
<div class="tsd-parameters">
|
|
508
641
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
509
642
|
<ul class="tsd-parameter-list">
|
|
510
643
|
<li>
|
|
511
|
-
<h5><span class="tsd-kind-parameter">
|
|
512
|
-
<
|
|
513
|
-
|
|
514
|
-
|
|
644
|
+
<h5><span class="tsd-kind-parameter">accumulator</span>: <span class="tsd-signature-type tsd-kind-type-parameter">U</span></h5></li>
|
|
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>
|
|
648
|
+
<li>
|
|
649
|
+
<h5><span class="tsd-kind-parameter">initialValue</span>: <span class="tsd-signature-type tsd-kind-type-parameter">U</span></h5>
|
|
650
|
+
<div class="tsd-comment tsd-typography"><p>The <code>initialValue</code> parameter is the initial value of the accumulator. It is the starting
|
|
651
|
+
point for the reduction operation.</p>
|
|
515
652
|
</div>
|
|
516
653
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
517
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type
|
|
518
|
-
|
|
519
|
-
is set to 'node', the method returns the first node. If <code>by</code> is set to 'val', the method returns the value</p>
|
|
654
|
+
<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
|
|
655
|
+
elements in the linked list.</p>
|
|
520
656
|
|
|
521
657
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
522
|
-
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#
|
|
658
|
+
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#reduce">reduce</a></p>
|
|
523
659
|
<ul>
|
|
524
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
525
|
-
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="
|
|
526
|
-
<h3 class="tsd-anchor-link"><span>
|
|
660
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/doubly-linked-list.ts#L487">src/data-structures/linked-list/doubly-linked-list.ts:487</a></li></ul></aside></li></ul></section>
|
|
661
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="reverse" class="tsd-anchor"></a>
|
|
662
|
+
<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>
|
|
527
663
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
528
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
664
|
+
<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>
|
|
529
665
|
<li class="tsd-description">
|
|
530
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
531
|
-
depending on the specified parameter.</p>
|
|
666
|
+
<div class="tsd-comment tsd-typography"><p>The <code>reverse</code> function reverses the order of the elements in a doubly linked list.</p>
|
|
532
667
|
</div>
|
|
533
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">
|
|
534
|
-
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
|
|
535
|
-
<code>DoublyLinkedListNode<T></code> is returned. If <code>by</code> is set to `'</p>
|
|
536
|
-
|
|
668
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
537
669
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
538
|
-
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#
|
|
670
|
+
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#reverse">reverse</a></p>
|
|
539
671
|
<ul>
|
|
540
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
541
|
-
<
|
|
672
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/doubly-linked-list.ts#L414">src/data-structures/linked-list/doubly-linked-list.ts:414</a></li></ul></aside></li></ul></section>
|
|
673
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="shift" class="tsd-anchor"></a>
|
|
674
|
+
<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>
|
|
675
|
+
<ul class="tsd-signatures tsd-is-inherited">
|
|
676
|
+
<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>
|
|
542
677
|
<li class="tsd-description">
|
|
543
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
544
|
-
depending on the specified parameter.</p>
|
|
545
|
-
</div>
|
|
546
|
-
<div class="tsd-parameters">
|
|
547
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
548
|
-
<ul class="tsd-parameter-list">
|
|
549
|
-
<li>
|
|
550
|
-
<h5><span class="tsd-kind-parameter">by</span>: <span class="tsd-signature-type">"val"</span></h5>
|
|
551
|
-
<div class="tsd-comment tsd-typography"><p>The parameter "by" is of type DoublyLinkedListGetBy, which is an enum that
|
|
552
|
-
can have two possible values: 'node' or 'val'. It determines the type of value that will be returned by the pollLast
|
|
553
|
-
method. If 'node' is specified, the method will return the</p>
|
|
678
|
+
<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>
|
|
554
679
|
</div>
|
|
555
|
-
<
|
|
556
|
-
|
|
557
|
-
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
|
|
558
|
-
<code>DoublyLinkedListNode<T></code> is returned. If <code>by</code> is set to `'</p>
|
|
680
|
+
<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
|
|
681
|
+
list.</p>
|
|
559
682
|
|
|
560
683
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
561
|
-
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#
|
|
684
|
+
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#shift">shift</a></p>
|
|
562
685
|
<ul>
|
|
563
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
564
|
-
<
|
|
686
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/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>
|
|
687
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="toArray" class="tsd-anchor"></a>
|
|
688
|
+
<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>
|
|
689
|
+
<ul class="tsd-signatures tsd-is-inherited">
|
|
690
|
+
<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>
|
|
565
691
|
<li class="tsd-description">
|
|
566
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
567
|
-
depending on the specified parameter.</p>
|
|
692
|
+
<div class="tsd-comment tsd-typography"><p>The <code>toArray</code> function converts a linked list into an array.</p>
|
|
568
693
|
</div>
|
|
569
|
-
<
|
|
570
|
-
|
|
571
|
-
<
|
|
572
|
-
<
|
|
573
|
-
<
|
|
574
|
-
<
|
|
575
|
-
|
|
576
|
-
|
|
694
|
+
<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>
|
|
695
|
+
|
|
696
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
697
|
+
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#toArray">toArray</a></p>
|
|
698
|
+
<ul>
|
|
699
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/doubly-linked-list.ts#L321">src/data-structures/linked-list/doubly-linked-list.ts:321</a></li></ul></aside></li></ul></section>
|
|
700
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="toArrayReverse" class="tsd-anchor"></a>
|
|
701
|
+
<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>
|
|
702
|
+
<ul class="tsd-signatures tsd-is-inherited">
|
|
703
|
+
<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>
|
|
704
|
+
<li class="tsd-description">
|
|
705
|
+
<div class="tsd-comment tsd-typography"><p>The <code>toArrayReverse</code> function converts a doubly linked list into an array in reverse order.</p>
|
|
577
706
|
</div>
|
|
578
|
-
<
|
|
579
|
-
<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>pollLast</code> returns either a <code>DoublyLinkedListNode<T></code>, the value of the node (<code>T</code>), or <code>null</code>.
|
|
580
|
-
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
|
|
581
|
-
<code>DoublyLinkedListNode<T></code> is returned. If <code>by</code> is set to `'</p>
|
|
707
|
+
<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>
|
|
582
708
|
|
|
583
709
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
584
|
-
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#
|
|
710
|
+
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#toArrayReverse">toArrayReverse</a></p>
|
|
585
711
|
<ul>
|
|
586
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
587
|
-
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="
|
|
588
|
-
<h3 class="tsd-anchor-link"><span>
|
|
712
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/doubly-linked-list.ts#L401">src/data-structures/linked-list/doubly-linked-list.ts:401</a></li></ul></aside></li></ul></section>
|
|
713
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="unshift" class="tsd-anchor"></a>
|
|
714
|
+
<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>
|
|
589
715
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
590
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
716
|
+
<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>
|
|
591
717
|
<li class="tsd-description">
|
|
592
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
593
|
-
nodes accordingly.</p>
|
|
718
|
+
<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>
|
|
594
719
|
</div>
|
|
595
720
|
<div class="tsd-parameters">
|
|
596
721
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
597
722
|
<ul class="tsd-parameter-list">
|
|
598
723
|
<li>
|
|
599
|
-
<h5><span class="tsd-kind-parameter">
|
|
600
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
601
|
-
|
|
724
|
+
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
725
|
+
<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
|
|
726
|
+
doubly linked list.</p>
|
|
602
727
|
</div>
|
|
603
728
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
604
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">
|
|
605
|
-
if the index is out of bounds.</p>
|
|
606
|
-
|
|
729
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
607
730
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
608
|
-
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#
|
|
731
|
+
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#unshift">unshift</a></p>
|
|
609
732
|
<ul>
|
|
610
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
611
|
-
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="
|
|
612
|
-
<h3 class="tsd-anchor-link"><span>
|
|
733
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/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>
|
|
734
|
+
<section class="tsd-panel tsd-member tsd-is-inherited"><a id="fromArray" class="tsd-anchor"></a>
|
|
735
|
+
<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>
|
|
613
736
|
<ul class="tsd-signatures tsd-is-inherited">
|
|
614
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
737
|
+
<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>
|
|
615
738
|
<li class="tsd-description">
|
|
616
|
-
<div class="tsd-comment tsd-typography"><p>
|
|
617
|
-
|
|
618
|
-
If index = 3; Value of the fourth element in the list is updated.</p>
|
|
739
|
+
<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
|
|
740
|
+
given array.</p>
|
|
619
741
|
</div>
|
|
742
|
+
<section class="tsd-panel">
|
|
743
|
+
<h4>Type Parameters</h4>
|
|
744
|
+
<ul class="tsd-type-parameter-list">
|
|
745
|
+
<li>
|
|
746
|
+
<h4><span class="tsd-kind-type-parameter">T</span></h4></li></ul></section>
|
|
620
747
|
<div class="tsd-parameters">
|
|
621
748
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
622
749
|
<ul class="tsd-parameter-list">
|
|
623
750
|
<li>
|
|
624
|
-
<h5><span class="tsd-kind-parameter">
|
|
625
|
-
<div class="tsd-comment tsd-typography"><p>
|
|
626
|
-
</div>
|
|
627
|
-
<div class="tsd-comment tsd-typography"></div></li>
|
|
628
|
-
<li>
|
|
629
|
-
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
630
|
-
<div class="tsd-comment tsd-typography"><p>New value of the node</p>
|
|
751
|
+
<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>
|
|
752
|
+
<div class="tsd-comment tsd-typography"><p>The <code>data</code> parameter is an array of elements of type <code>T</code>.</p>
|
|
631
753
|
</div>
|
|
632
754
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
633
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">
|
|
755
|
+
<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>
|
|
756
|
+
|
|
634
757
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
635
|
-
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#
|
|
758
|
+
<p>Inherited from <a href="DoublyLinkedList.html">DoublyLinkedList</a>.<a href="DoublyLinkedList.html#fromArray">fromArray</a></p>
|
|
636
759
|
<ul>
|
|
637
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
760
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/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>
|
|
638
761
|
<div class="col-sidebar">
|
|
639
762
|
<div class="page-menu">
|
|
640
763
|
<div class="tsd-navigation settings">
|
|
@@ -655,26 +778,34 @@ If index = 3; Value of the fourth element in the list is updated.</p>
|
|
|
655
778
|
<div class="tsd-accordion-details">
|
|
656
779
|
<ul>
|
|
657
780
|
<li><a href="#constructor" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-512"></use></svg><span>constructor</span></a></li>
|
|
658
|
-
<li><a href="#
|
|
659
|
-
<li><a href="#
|
|
660
|
-
<li><a href="#
|
|
661
|
-
<li><a href="#
|
|
662
|
-
<li><a href="#
|
|
663
|
-
<li><a href="#
|
|
664
|
-
<li><a href="#
|
|
665
|
-
<li><a href="#
|
|
666
|
-
<li><a href="#
|
|
667
|
-
<li><a href="#
|
|
668
|
-
<li><a href="#
|
|
669
|
-
<li><a href="#
|
|
781
|
+
<li><a href="#head" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>head</span></a></li>
|
|
782
|
+
<li><a href="#length" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>length</span></a></li>
|
|
783
|
+
<li><a href="#tail" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>tail</span></a></li>
|
|
784
|
+
<li><a href="#clear" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>clear</span></a></li>
|
|
785
|
+
<li><a href="#delete" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>delete</span></a></li>
|
|
786
|
+
<li><a href="#deleteAt" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>delete<wbr/>At</span></a></li>
|
|
787
|
+
<li><a href="#filter" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>filter</span></a></li>
|
|
788
|
+
<li><a href="#find" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>find</span></a></li>
|
|
789
|
+
<li><a href="#findLast" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>find<wbr/>Last</span></a></li>
|
|
790
|
+
<li><a href="#findNode" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>find<wbr/>Node</span></a></li>
|
|
791
|
+
<li><a href="#forEach" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>for<wbr/>Each</span></a></li>
|
|
792
|
+
<li><a href="#getAt" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>At</span></a></li>
|
|
793
|
+
<li><a href="#getLength" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Length</span></a></li>
|
|
794
|
+
<li><a href="#getNodeAt" class="tsd-is-inherited"><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>
|
|
795
|
+
<li><a href="#indexOf" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>index<wbr/>Of</span></a></li>
|
|
670
796
|
<li><a href="#insert" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>insert</span></a></li>
|
|
671
|
-
<li><a href="#
|
|
672
|
-
<li><a href="#
|
|
673
|
-
<li><a href="#
|
|
674
|
-
<li><a href="#
|
|
675
|
-
<li><a href="#
|
|
676
|
-
<li><a href="#
|
|
677
|
-
<li><a href="#
|
|
797
|
+
<li><a href="#insertAfter" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>insert<wbr/>After</span></a></li>
|
|
798
|
+
<li><a href="#insertBefore" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>insert<wbr/>Before</span></a></li>
|
|
799
|
+
<li><a href="#map" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>map</span></a></li>
|
|
800
|
+
<li><a href="#pop" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>pop</span></a></li>
|
|
801
|
+
<li><a href="#push" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>push</span></a></li>
|
|
802
|
+
<li><a href="#reduce" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>reduce</span></a></li>
|
|
803
|
+
<li><a href="#reverse" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>reverse</span></a></li>
|
|
804
|
+
<li><a href="#shift" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>shift</span></a></li>
|
|
805
|
+
<li><a href="#toArray" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>to<wbr/>Array</span></a></li>
|
|
806
|
+
<li><a href="#toArrayReverse" class="tsd-is-inherited"><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>
|
|
807
|
+
<li><a href="#unshift" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>unshift</span></a></li>
|
|
808
|
+
<li><a href="#fromArray" class="tsd-is-inherited"><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>
|
|
678
809
|
<div class="site-menu">
|
|
679
810
|
<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>
|
|
680
811
|
<ul class="tsd-small-nested-navigation">
|
|
@@ -732,7 +863,6 @@ If index = 3; Value of the fourth element in the list is updated.</p>
|
|
|
732
863
|
<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>
|
|
733
864
|
<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>
|
|
734
865
|
<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>
|
|
735
|
-
<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>
|
|
736
866
|
<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>
|
|
737
867
|
<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>
|
|
738
868
|
<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>
|