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
|
@@ -14,18 +14,18 @@
|
|
|
14
14
|
<ul class="tsd-breadcrumb">
|
|
15
15
|
<li><a href="../modules.html">data-structure-typed</a></li>
|
|
16
16
|
<li><a href="SinglyLinkedList.html">SinglyLinkedList</a></li></ul>
|
|
17
|
-
<h1>Class SinglyLinkedList<
|
|
17
|
+
<h1>Class SinglyLinkedList<T></h1></div>
|
|
18
18
|
<section class="tsd-panel">
|
|
19
19
|
<h4>Type Parameters</h4>
|
|
20
20
|
<ul class="tsd-type-parameter-list">
|
|
21
21
|
<li>
|
|
22
|
-
<h4><span class="tsd-kind-type-parameter">
|
|
22
|
+
<h4><span class="tsd-kind-type-parameter">T</span></h4></li></ul></section>
|
|
23
23
|
<section class="tsd-panel tsd-hierarchy">
|
|
24
24
|
<h4>Hierarchy</h4>
|
|
25
25
|
<ul class="tsd-hierarchy">
|
|
26
26
|
<li><span class="target">SinglyLinkedList</span></li></ul></section><aside class="tsd-sources">
|
|
27
27
|
<ul>
|
|
28
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
28
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/singly-linked-list.ts#L41">src/data-structures/linked-list/singly-linked-list.ts:41</a></li></ul></aside>
|
|
29
29
|
<section class="tsd-panel-group tsd-index-group">
|
|
30
30
|
<section class="tsd-panel tsd-index-panel">
|
|
31
31
|
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
|
@@ -37,122 +37,104 @@
|
|
|
37
37
|
</div></section>
|
|
38
38
|
<section class="tsd-index-section">
|
|
39
39
|
<h3 class="tsd-index-heading">Properties</h3>
|
|
40
|
-
<div class="tsd-index-list"><a href="SinglyLinkedList.html#_head" class="tsd-index-link tsd-is-
|
|
41
|
-
<a href="SinglyLinkedList.html#
|
|
42
|
-
<a href="SinglyLinkedList.html#_tail" class="tsd-index-link tsd-is-
|
|
40
|
+
<div class="tsd-index-list"><a href="SinglyLinkedList.html#_head" class="tsd-index-link tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-1024"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)"></path></g></svg><span>_head</span></a>
|
|
41
|
+
<a href="SinglyLinkedList.html#_length" class="tsd-index-link tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_length</span></a>
|
|
42
|
+
<a href="SinglyLinkedList.html#_tail" class="tsd-index-link tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_tail</span></a>
|
|
43
43
|
</div></section>
|
|
44
44
|
<section class="tsd-index-section">
|
|
45
45
|
<h3 class="tsd-index-heading">Accessors</h3>
|
|
46
46
|
<div class="tsd-index-list"><a href="SinglyLinkedList.html#head" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-262144"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)"></path></g></svg><span>head</span></a>
|
|
47
|
-
<a href="SinglyLinkedList.html#
|
|
47
|
+
<a href="SinglyLinkedList.html#length" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>length</span></a>
|
|
48
48
|
<a href="SinglyLinkedList.html#tail" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>tail</span></a>
|
|
49
49
|
</div></section>
|
|
50
50
|
<section class="tsd-index-section">
|
|
51
51
|
<h3 class="tsd-index-heading">Methods</h3>
|
|
52
|
-
<div class="tsd-index-list"><a href="SinglyLinkedList.html#
|
|
53
|
-
<a href="SinglyLinkedList.html#
|
|
54
|
-
<a href="SinglyLinkedList.html#
|
|
55
|
-
<a href="SinglyLinkedList.html#
|
|
52
|
+
<div class="tsd-index-list"><a href="SinglyLinkedList.html#clear" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-2048"><rect fill="var(--color-icon-background)" stroke="#FF4DB8" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)"></path></g></svg><span>clear</span></a>
|
|
53
|
+
<a href="SinglyLinkedList.html#countOccurrences" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>count<wbr/>Occurrences</span></a>
|
|
54
|
+
<a href="SinglyLinkedList.html#delete" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>delete</span></a>
|
|
55
|
+
<a href="SinglyLinkedList.html#deleteAt" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>delete<wbr/>At</span></a>
|
|
56
56
|
<a href="SinglyLinkedList.html#find" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>find</span></a>
|
|
57
|
-
<a href="SinglyLinkedList.html#findIndex" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>find<wbr/>Index</span></a>
|
|
58
57
|
<a href="SinglyLinkedList.html#findNode" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>find<wbr/>Node</span></a>
|
|
59
|
-
<a href="SinglyLinkedList.html#
|
|
60
|
-
<a href="SinglyLinkedList.html#
|
|
61
|
-
<a href="SinglyLinkedList.html#
|
|
62
|
-
<a href="SinglyLinkedList.html#
|
|
58
|
+
<a href="SinglyLinkedList.html#getAt" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>At</span></a>
|
|
59
|
+
<a href="SinglyLinkedList.html#getLength" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Length</span></a>
|
|
60
|
+
<a href="SinglyLinkedList.html#getNodeAt" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Node<wbr/>At</span></a>
|
|
61
|
+
<a href="SinglyLinkedList.html#indexOf" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>index<wbr/>Of</span></a>
|
|
62
|
+
<a href="SinglyLinkedList.html#insert" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>insert</span></a>
|
|
63
63
|
<a href="SinglyLinkedList.html#insertAfter" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>insert<wbr/>After</span></a>
|
|
64
|
-
<a href="SinglyLinkedList.html#insertAt" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>insert<wbr/>At</span></a>
|
|
65
64
|
<a href="SinglyLinkedList.html#insertBefore" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>insert<wbr/>Before</span></a>
|
|
66
|
-
<a href="SinglyLinkedList.html#
|
|
67
|
-
<a href="SinglyLinkedList.html#merge" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>merge</span></a>
|
|
65
|
+
<a href="SinglyLinkedList.html#isEmpty" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>is<wbr/>Empty</span></a>
|
|
68
66
|
<a href="SinglyLinkedList.html#pop" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>pop</span></a>
|
|
69
|
-
<a href="SinglyLinkedList.html#prepend" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>prepend</span></a>
|
|
70
67
|
<a href="SinglyLinkedList.html#push" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>push</span></a>
|
|
71
|
-
<a href="SinglyLinkedList.html#reduce" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>reduce</span></a>
|
|
72
|
-
<a href="SinglyLinkedList.html#removeAt" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>remove<wbr/>At</span></a>
|
|
73
|
-
<a href="SinglyLinkedList.html#removeFromAnyEnd" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>remove<wbr/>From<wbr/>Any<wbr/>End</span></a>
|
|
74
|
-
<a href="SinglyLinkedList.html#removeNode" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>remove<wbr/>Node</span></a>
|
|
75
68
|
<a href="SinglyLinkedList.html#reverse" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>reverse</span></a>
|
|
76
69
|
<a href="SinglyLinkedList.html#shift" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>shift</span></a>
|
|
77
|
-
<a href="SinglyLinkedList.html#slice" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>slice</span></a>
|
|
78
|
-
<a href="SinglyLinkedList.html#sort" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>sort</span></a>
|
|
79
70
|
<a href="SinglyLinkedList.html#toArray" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>to<wbr/>Array</span></a>
|
|
80
|
-
<a href="SinglyLinkedList.html#
|
|
81
|
-
<a href="SinglyLinkedList.html#
|
|
71
|
+
<a href="SinglyLinkedList.html#unshift" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>unshift</span></a>
|
|
72
|
+
<a href="SinglyLinkedList.html#fromArray" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>from<wbr/>Array</span></a>
|
|
82
73
|
</div></section></div></details></section></section>
|
|
83
74
|
<section class="tsd-panel-group tsd-member-group">
|
|
84
75
|
<h2>Constructors</h2>
|
|
85
76
|
<section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a>
|
|
86
77
|
<h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><g stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" id="icon-anchor"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></g></svg></a></h3>
|
|
87
78
|
<ul class="tsd-signatures">
|
|
88
|
-
<li class="tsd-signature tsd-anchor-link" id="constructor.new_SinglyLinkedList"><span class="tsd-kind-constructor-signature">new <wbr/>Singly<wbr/>Linked<wbr/>List</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
79
|
+
<li class="tsd-signature tsd-anchor-link" id="constructor.new_SinglyLinkedList"><span class="tsd-kind-constructor-signature">new <wbr/>Singly<wbr/>Linked<wbr/>List</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="SinglyLinkedList.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedList</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_SinglyLinkedList" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
89
80
|
<li class="tsd-description">
|
|
90
|
-
<div class="tsd-comment tsd-typography"><p>The constructor initializes
|
|
81
|
+
<div class="tsd-comment tsd-typography"><p>The constructor initializes the linked list with an empty head, tail, and length.</p>
|
|
91
82
|
</div>
|
|
92
83
|
<section class="tsd-panel">
|
|
93
84
|
<h4>Type Parameters</h4>
|
|
94
85
|
<ul class="tsd-type-parameter-list">
|
|
95
86
|
<li>
|
|
96
|
-
<h4><span class="tsd-kind-type-parameter">
|
|
97
|
-
<
|
|
98
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
99
|
-
<ul class="tsd-parameter-list">
|
|
100
|
-
<li>
|
|
101
|
-
<h5><code class="tsd-tag ts-flagRest">Rest</code> <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">[]</span></h5>
|
|
102
|
-
<div class="tsd-comment tsd-typography"><p>args is a rest parameter that allows the constructor to accept an arbitrary number of
|
|
103
|
-
arguments of type NodeVal.</p>
|
|
104
|
-
</div>
|
|
105
|
-
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
106
|
-
<h4 class="tsd-returns-title">Returns <a href="SinglyLinkedList.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedList</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">></span></h4>
|
|
87
|
+
<h4><span class="tsd-kind-type-parameter">T</span></h4></li></ul></section>
|
|
88
|
+
<h4 class="tsd-returns-title">Returns <a href="SinglyLinkedList.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedList</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>
|
|
107
89
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
108
90
|
<ul>
|
|
109
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
91
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/singly-linked-list.ts#L46">src/data-structures/linked-list/singly-linked-list.ts:46</a></li></ul></aside></li></ul></section></section>
|
|
110
92
|
<section class="tsd-panel-group tsd-member-group">
|
|
111
93
|
<h2>Properties</h2>
|
|
112
|
-
<section class="tsd-panel tsd-member tsd-is-
|
|
113
|
-
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-
|
|
114
|
-
<div class="tsd-signature"><span class="tsd-kind-property">_head</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
94
|
+
<section class="tsd-panel tsd-member tsd-is-private"><a id="_head" class="tsd-anchor"></a>
|
|
95
|
+
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>_head</span><a href="#_head" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
96
|
+
<div class="tsd-signature"><span class="tsd-kind-property">_head</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</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">
|
|
115
97
|
<ul>
|
|
116
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
117
|
-
<section class="tsd-panel tsd-member tsd-is-
|
|
118
|
-
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-
|
|
119
|
-
<div class="tsd-signature"><span class="tsd-kind-property">
|
|
98
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/singly-linked-list.ts#L52">src/data-structures/linked-list/singly-linked-list.ts:52</a></li></ul></aside></section>
|
|
99
|
+
<section class="tsd-panel tsd-member tsd-is-private"><a id="_length" class="tsd-anchor"></a>
|
|
100
|
+
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>_length</span><a href="#_length" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
101
|
+
<div class="tsd-signature"><span class="tsd-kind-property">_length</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources">
|
|
120
102
|
<ul>
|
|
121
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
122
|
-
<section class="tsd-panel tsd-member tsd-is-
|
|
123
|
-
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-
|
|
124
|
-
<div class="tsd-signature"><span class="tsd-kind-property">_tail</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
103
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/singly-linked-list.ts#L72">src/data-structures/linked-list/singly-linked-list.ts:72</a></li></ul></aside></section>
|
|
104
|
+
<section class="tsd-panel tsd-member tsd-is-private"><a id="_tail" class="tsd-anchor"></a>
|
|
105
|
+
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>_tail</span><a href="#_tail" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
106
|
+
<div class="tsd-signature"><span class="tsd-kind-property">_tail</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</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">
|
|
125
107
|
<ul>
|
|
126
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
108
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/singly-linked-list.ts#L62">src/data-structures/linked-list/singly-linked-list.ts:62</a></li></ul></aside></section></section>
|
|
127
109
|
<section class="tsd-panel-group tsd-member-group">
|
|
128
110
|
<h2>Accessors</h2>
|
|
129
111
|
<section class="tsd-panel tsd-member"><a id="head" class="tsd-anchor"></a>
|
|
130
112
|
<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>
|
|
131
113
|
<ul class="tsd-signatures">
|
|
132
|
-
<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="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
114
|
+
<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="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</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>
|
|
133
115
|
<li class="tsd-description">
|
|
134
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
116
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</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">
|
|
135
117
|
<ul>
|
|
136
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
118
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/singly-linked-list.ts#L54">src/data-structures/linked-list/singly-linked-list.ts:54</a></li></ul></aside></li>
|
|
137
119
|
<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>
|
|
138
120
|
<li class="tsd-description">
|
|
139
121
|
<div class="tsd-parameters">
|
|
140
122
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
141
123
|
<ul class="tsd-parameter-list">
|
|
142
124
|
<li>
|
|
143
|
-
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
125
|
+
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</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>
|
|
144
126
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
145
127
|
<ul>
|
|
146
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
147
|
-
<section class="tsd-panel tsd-member"><a id="
|
|
148
|
-
<h3 class="tsd-anchor-link"><span>
|
|
128
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/singly-linked-list.ts#L58">src/data-structures/linked-list/singly-linked-list.ts:58</a></li></ul></aside></li></ul></section>
|
|
129
|
+
<section class="tsd-panel tsd-member"><a id="length" class="tsd-anchor"></a>
|
|
130
|
+
<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>
|
|
149
131
|
<ul class="tsd-signatures">
|
|
150
|
-
<li class="tsd-signature" id="
|
|
132
|
+
<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>
|
|
151
133
|
<li class="tsd-description">
|
|
152
134
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
153
135
|
<ul>
|
|
154
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
155
|
-
<li class="tsd-signature" id="
|
|
136
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/singly-linked-list.ts#L74">src/data-structures/linked-list/singly-linked-list.ts:74</a></li></ul></aside></li>
|
|
137
|
+
<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>
|
|
156
138
|
<li class="tsd-description">
|
|
157
139
|
<div class="tsd-parameters">
|
|
158
140
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
@@ -161,782 +143,424 @@ arguments of type NodeVal.</p>
|
|
|
161
143
|
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
|
162
144
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
163
145
|
<ul>
|
|
164
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
146
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/singly-linked-list.ts#L78">src/data-structures/linked-list/singly-linked-list.ts:78</a></li></ul></aside></li></ul></section>
|
|
165
147
|
<section class="tsd-panel tsd-member"><a id="tail" class="tsd-anchor"></a>
|
|
166
148
|
<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>
|
|
167
149
|
<ul class="tsd-signatures">
|
|
168
|
-
<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="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
150
|
+
<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="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</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>
|
|
169
151
|
<li class="tsd-description">
|
|
170
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
152
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</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">
|
|
171
153
|
<ul>
|
|
172
|
-
<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/singly-linked-list.ts#L64">src/data-structures/linked-list/singly-linked-list.ts:64</a></li></ul></aside></li>
|
|
173
155
|
<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>
|
|
174
156
|
<li class="tsd-description">
|
|
175
157
|
<div class="tsd-parameters">
|
|
176
158
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
177
159
|
<ul class="tsd-parameter-list">
|
|
178
160
|
<li>
|
|
179
|
-
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">
|
|
161
|
+
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</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>
|
|
180
162
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
181
163
|
<ul>
|
|
182
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
164
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/singly-linked-list.ts#L68">src/data-structures/linked-list/singly-linked-list.ts:68</a></li></ul></aside></li></ul></section></section>
|
|
183
165
|
<section class="tsd-panel-group tsd-member-group">
|
|
184
166
|
<h2>Methods</h2>
|
|
185
|
-
<section class="tsd-panel tsd-member"><a id="
|
|
186
|
-
<h3 class="tsd-anchor-link"><span>
|
|
167
|
+
<section class="tsd-panel tsd-member"><a id="clear" class="tsd-anchor"></a>
|
|
168
|
+
<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>
|
|
187
169
|
<ul class="tsd-signatures">
|
|
188
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
170
|
+
<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>
|
|
189
171
|
<li class="tsd-description">
|
|
190
|
-
<div class="tsd-comment tsd-typography"><p>The function
|
|
172
|
+
<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>
|
|
191
173
|
</div>
|
|
192
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type
|
|
174
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
193
175
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
194
176
|
<ul>
|
|
195
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
196
|
-
<section class="tsd-panel tsd-member"><a id="
|
|
197
|
-
<h3 class="tsd-anchor-link"><span>
|
|
177
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/singly-linked-list.ts#L298">src/data-structures/linked-list/singly-linked-list.ts:298</a></li></ul></aside></li></ul></section>
|
|
178
|
+
<section class="tsd-panel tsd-member"><a id="countOccurrences" class="tsd-anchor"></a>
|
|
179
|
+
<h3 class="tsd-anchor-link"><span>count<wbr/>Occurrences</span><a href="#countOccurrences" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
198
180
|
<ul class="tsd-signatures">
|
|
199
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
181
|
+
<li class="tsd-signature tsd-anchor-link" id="countOccurrences.countOccurrences-1"><span class="tsd-kind-call-signature">count<wbr/>Occurrences</span><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">number</span><a href="#countOccurrences.countOccurrences-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
200
182
|
<li class="tsd-description">
|
|
183
|
+
<div class="tsd-comment tsd-typography"><p>The function counts the number of occurrences of a given value in a linked list.</p>
|
|
184
|
+
</div>
|
|
201
185
|
<div class="tsd-parameters">
|
|
202
186
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
203
187
|
<ul class="tsd-parameter-list">
|
|
204
188
|
<li>
|
|
205
|
-
<h5><
|
|
206
|
-
<
|
|
207
|
-
<ul>
|
|
208
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/singly-linked-list.ts#L278">src/data-structures/linked-list/singly-linked-list.ts:278</a></li></ul></aside></li></ul></section>
|
|
209
|
-
<section class="tsd-panel tsd-member"><a id="clear" class="tsd-anchor"></a>
|
|
210
|
-
<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>
|
|
211
|
-
<ul class="tsd-signatures">
|
|
212
|
-
<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><a href="SinglyLinkedList.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedList</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">></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>
|
|
213
|
-
<li class="tsd-description">
|
|
214
|
-
<div class="tsd-comment tsd-typography"><p>The clear() function resets the linked list by setting the head and tail to null and the size to 0.</p>
|
|
189
|
+
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
190
|
+
<div class="tsd-comment tsd-typography"><p>The value parameter is the value that you want to count the occurrences of in the linked list.</p>
|
|
215
191
|
</div>
|
|
216
|
-
<
|
|
192
|
+
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
193
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>The count of occurrences of the given value in the linked list.</p>
|
|
217
194
|
|
|
218
195
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
219
196
|
<ul>
|
|
220
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
221
|
-
<section class="tsd-panel tsd-member"><a id="
|
|
222
|
-
<h3 class="tsd-anchor-link"><span>
|
|
197
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/singly-linked-list.ts#L462">src/data-structures/linked-list/singly-linked-list.ts:462</a></li></ul></aside></li></ul></section>
|
|
198
|
+
<section class="tsd-panel tsd-member"><a id="delete" class="tsd-anchor"></a>
|
|
199
|
+
<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>
|
|
223
200
|
<ul class="tsd-signatures">
|
|
224
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
201
|
+
<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">value</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>
|
|
225
202
|
<li class="tsd-description">
|
|
226
|
-
<div class="tsd-comment tsd-typography"><p>The <code>
|
|
203
|
+
<div class="tsd-comment tsd-typography"><p>The <code>delete</code> function removes a specified value from a linked list and returns true if the value was found and
|
|
204
|
+
removed, otherwise it returns false.</p>
|
|
227
205
|
</div>
|
|
228
206
|
<div class="tsd-parameters">
|
|
229
207
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
230
208
|
<ul class="tsd-parameter-list">
|
|
231
209
|
<li>
|
|
232
|
-
<h5><span class="tsd-kind-parameter">
|
|
233
|
-
<div class="tsd-comment tsd-typography"><p>
|
|
234
|
-
|
|
235
|
-
</div>
|
|
236
|
-
<div class="tsd-comment tsd-typography"></div>
|
|
237
|
-
<ul class="tsd-parameters">
|
|
238
|
-
<li class="tsd-parameter-signature">
|
|
239
|
-
<ul class="tsd-signatures">
|
|
240
|
-
<li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span>, <span class="tsd-kind-parameter">index</span>, <span class="tsd-kind-parameter">list</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
|
|
241
|
-
<li class="tsd-description">
|
|
242
|
-
<div class="tsd-parameters">
|
|
243
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
244
|
-
<ul class="tsd-parameter-list">
|
|
245
|
-
<li>
|
|
246
|
-
<h5><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span></h5></li>
|
|
247
|
-
<li>
|
|
248
|
-
<h5><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></h5></li>
|
|
249
|
-
<li>
|
|
250
|
-
<h5><span class="tsd-kind-parameter">list</span>: <a href="SinglyLinkedList.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedList</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">></span></h5></li></ul></div>
|
|
251
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></li></ul></li>
|
|
252
|
-
<li>
|
|
253
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">reverse</span>: <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></h5>
|
|
254
|
-
<div class="tsd-comment tsd-typography"><p>The <code>reverse</code> parameter is a boolean value that determines whether the filtered list should
|
|
255
|
-
be reversed or not. If <code>reverse</code> is set to <code>true</code>, the filtered list will be in reverse order. If <code>reverse</code> is set
|
|
256
|
-
to <code>false</code> or not provided, the filtered list will be in</p>
|
|
210
|
+
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
211
|
+
<div class="tsd-comment tsd-typography"><p>The value parameter represents the value of the node that needs to be deleted from the linked
|
|
212
|
+
list.</p>
|
|
257
213
|
</div>
|
|
258
214
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
259
|
-
<h4 class="tsd-returns-title">Returns <
|
|
215
|
+
<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 was successfully deleted from
|
|
216
|
+
the linked list, and <code>false</code> if the value was not found in the linked list.</p>
|
|
260
217
|
|
|
261
218
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
262
219
|
<ul>
|
|
263
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
264
|
-
<section class="tsd-panel tsd-member"><a id="
|
|
265
|
-
<h3 class="tsd-anchor-link"><span>
|
|
220
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/singly-linked-list.ts#L231">src/data-structures/linked-list/singly-linked-list.ts:231</a></li></ul></aside></li></ul></section>
|
|
221
|
+
<section class="tsd-panel tsd-member"><a id="deleteAt" class="tsd-anchor"></a>
|
|
222
|
+
<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>
|
|
266
223
|
<ul class="tsd-signatures">
|
|
267
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
224
|
+
<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>
|
|
268
225
|
<li class="tsd-description">
|
|
269
|
-
<div class="tsd-comment tsd-typography"><p>The <code>
|
|
270
|
-
returns the value of the found node.</p>
|
|
226
|
+
<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>
|
|
271
227
|
</div>
|
|
272
228
|
<div class="tsd-parameters">
|
|
273
229
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
274
230
|
<ul class="tsd-parameter-list">
|
|
275
231
|
<li>
|
|
276
|
-
<h5><span class="tsd-kind-parameter">
|
|
277
|
-
<div class="tsd-comment tsd-typography"><p>
|
|
278
|
-
|
|
232
|
+
<h5><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></h5>
|
|
233
|
+
<div class="tsd-comment tsd-typography"><p>The index parameter represents the position of the element that needs to be deleted in the
|
|
234
|
+
data structure. It is of type number.</p>
|
|
279
235
|
</div>
|
|
280
|
-
<div class="tsd-comment tsd-typography"></div>
|
|
281
|
-
<
|
|
282
|
-
|
|
283
|
-
<ul class="tsd-signatures">
|
|
284
|
-
<li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span>, <span class="tsd-kind-parameter">index</span>, <span class="tsd-kind-parameter">list</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
|
|
285
|
-
<li class="tsd-description">
|
|
286
|
-
<div class="tsd-parameters">
|
|
287
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
288
|
-
<ul class="tsd-parameter-list">
|
|
289
|
-
<li>
|
|
290
|
-
<h5><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span></h5></li>
|
|
291
|
-
<li>
|
|
292
|
-
<h5><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></h5></li>
|
|
293
|
-
<li>
|
|
294
|
-
<h5><span class="tsd-kind-parameter">list</span>: <a href="SinglyLinkedList.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedList</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">></span></h5></li></ul></div>
|
|
295
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></li></ul></li></ul></div>
|
|
296
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span></h4><p>The method <code>find</code> returns the <code>NodeVal</code> value of the first node in the linked list that satisfies the
|
|
297
|
-
condition specified by the <code>callbackFn</code> function. If no node satisfies the condition, it returns <code>undefined</code>.</p>
|
|
236
|
+
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
237
|
+
<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
|
|
238
|
+
bounds.</p>
|
|
298
239
|
|
|
299
240
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
300
241
|
<ul>
|
|
301
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
302
|
-
<section class="tsd-panel tsd-member"><a id="
|
|
303
|
-
<h3 class="tsd-anchor-link"><span>find
|
|
242
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/singly-linked-list.ts#L211">src/data-structures/linked-list/singly-linked-list.ts:211</a></li></ul></aside></li></ul></section>
|
|
243
|
+
<section class="tsd-panel tsd-member"><a id="find" class="tsd-anchor"></a>
|
|
244
|
+
<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>
|
|
304
245
|
<ul class="tsd-signatures">
|
|
305
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
246
|
+
<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>
|
|
306
247
|
<li class="tsd-description">
|
|
307
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
308
|
-
or -1 if no such node is found.</p>
|
|
248
|
+
<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>
|
|
309
249
|
</div>
|
|
310
250
|
<div class="tsd-parameters">
|
|
311
251
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
312
252
|
<ul class="tsd-parameter-list">
|
|
313
253
|
<li>
|
|
314
|
-
<h5><span class="tsd-kind-parameter">
|
|
315
|
-
<div class="tsd-comment tsd-typography"><p>A
|
|
316
|
-
|
|
254
|
+
<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>
|
|
255
|
+
<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
|
|
256
|
+
function is used to determine whether a particular value in the linked list satisfies a certain condition.</p>
|
|
317
257
|
</div>
|
|
318
258
|
<div class="tsd-comment tsd-typography"></div>
|
|
319
259
|
<ul class="tsd-parameters">
|
|
320
260
|
<li class="tsd-parameter-signature">
|
|
321
261
|
<ul class="tsd-signatures">
|
|
322
|
-
<li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">
|
|
262
|
+
<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>
|
|
323
263
|
<li class="tsd-description">
|
|
324
264
|
<div class="tsd-parameters">
|
|
325
265
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
326
266
|
<ul class="tsd-parameter-list">
|
|
327
267
|
<li>
|
|
328
|
-
<h5><span class="tsd-kind-parameter">
|
|
329
|
-
<li>
|
|
330
|
-
<h5><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></h5></li>
|
|
331
|
-
<li>
|
|
332
|
-
<h5><span class="tsd-kind-parameter">list</span>: <a href="SinglyLinkedList.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedList</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">></span></h5></li></ul></div>
|
|
268
|
+
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5></li></ul></div>
|
|
333
269
|
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></li></ul></li></ul></div>
|
|
334
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">
|
|
270
|
+
<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
|
|
271
|
+
the callback function. If no element satisfies the condition, it returns <code>null</code>.</p>
|
|
335
272
|
|
|
336
273
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
337
274
|
<ul>
|
|
338
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
275
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/singly-linked-list.ts#L346">src/data-structures/linked-list/singly-linked-list.ts:346</a></li></ul></aside></li></ul></section>
|
|
339
276
|
<section class="tsd-panel tsd-member"><a id="findNode" class="tsd-anchor"></a>
|
|
340
277
|
<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>
|
|
341
278
|
<ul class="tsd-signatures">
|
|
342
|
-
<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">
|
|
279
|
+
<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">value</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="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</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>
|
|
343
280
|
<li class="tsd-description">
|
|
344
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
281
|
+
<div class="tsd-comment tsd-typography"><p>The function finds a node in a singly linked list by its value and returns the node if found, otherwise returns
|
|
282
|
+
null.</p>
|
|
345
283
|
</div>
|
|
346
284
|
<div class="tsd-parameters">
|
|
347
285
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
348
286
|
<ul class="tsd-parameter-list">
|
|
349
287
|
<li>
|
|
350
|
-
<h5><span class="tsd-kind-parameter">
|
|
351
|
-
<div class="tsd-comment tsd-typography"><p>
|
|
352
|
-
value indicating whether the current node matches the desired criteria.</p>
|
|
288
|
+
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
289
|
+
<div class="tsd-comment tsd-typography"><p>The value parameter is the value that we want to search for in the linked list.</p>
|
|
353
290
|
</div>
|
|
354
|
-
<div class="tsd-comment tsd-typography"></div>
|
|
355
|
-
<
|
|
356
|
-
<
|
|
357
|
-
<ul class="tsd-signatures">
|
|
358
|
-
<li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span>, <span class="tsd-kind-parameter">index</span>, <span class="tsd-kind-parameter">list</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
|
|
359
|
-
<li class="tsd-description">
|
|
360
|
-
<div class="tsd-parameters">
|
|
361
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
362
|
-
<ul class="tsd-parameter-list">
|
|
363
|
-
<li>
|
|
364
|
-
<h5><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span></h5></li>
|
|
365
|
-
<li>
|
|
366
|
-
<h5><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></h5></li>
|
|
367
|
-
<li>
|
|
368
|
-
<h5><span class="tsd-kind-parameter">list</span>: <a href="SinglyLinkedList.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedList</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">></span></h5></li></ul></div>
|
|
369
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></li></ul></li></ul></div>
|
|
370
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">></span></h4><p>The function <code>findNode</code> returns a <code>SinglyLinkedListNode<NodeVal></code> if a node satisfying the condition
|
|
371
|
-
specified by the <code>callbackFn</code> is found in the linked list. If no such node is found, it returns <code>undefined</code>.</p>
|
|
291
|
+
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
292
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</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>a <code>SinglyLinkedListNode<T></code> if a node with the specified value is found in the linked list. If no node with
|
|
293
|
+
the specified value is found, the function returns <code>null</code>.</p>
|
|
372
294
|
|
|
373
295
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
374
296
|
<ul>
|
|
375
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
376
|
-
<section class="tsd-panel tsd-member"><a id="
|
|
377
|
-
<h3 class="tsd-anchor-link"><span>
|
|
297
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/singly-linked-list.ts#L385">src/data-structures/linked-list/singly-linked-list.ts:385</a></li></ul></aside></li></ul></section>
|
|
298
|
+
<section class="tsd-panel tsd-member"><a id="getAt" class="tsd-anchor"></a>
|
|
299
|
+
<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>
|
|
378
300
|
<ul class="tsd-signatures">
|
|
379
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
301
|
+
<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>
|
|
380
302
|
<li class="tsd-description">
|
|
381
|
-
<div class="tsd-comment tsd-typography"><p>The function <code>
|
|
382
|
-
returns its index and the node itself.</p>
|
|
303
|
+
<div class="tsd-comment tsd-typography"><p>The function <code>getAt</code> returns the value at a specified index in a linked list, or null if the index is out of range.</p>
|
|
383
304
|
</div>
|
|
384
305
|
<div class="tsd-parameters">
|
|
385
306
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
386
307
|
<ul class="tsd-parameter-list">
|
|
387
308
|
<li>
|
|
388
|
-
<h5><span class="tsd-kind-parameter">
|
|
389
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
390
|
-
|
|
391
|
-
boolean value indicating whether the condition is met for the given node.</p>
|
|
309
|
+
<h5><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></h5>
|
|
310
|
+
<div class="tsd-comment tsd-typography"><p>The index parameter is a number that represents the position of the element we want to
|
|
311
|
+
retrieve from the list.</p>
|
|
392
312
|
</div>
|
|
393
|
-
<div class="tsd-comment tsd-typography"></div>
|
|
394
|
-
<
|
|
395
|
-
<
|
|
396
|
-
<ul class="tsd-signatures">
|
|
397
|
-
<li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span>, <span class="tsd-kind-parameter">index</span>, <span class="tsd-kind-parameter">list</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
|
|
398
|
-
<li class="tsd-description">
|
|
399
|
-
<div class="tsd-parameters">
|
|
400
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
401
|
-
<ul class="tsd-parameter-list">
|
|
402
|
-
<li>
|
|
403
|
-
<h5><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span></h5></li>
|
|
404
|
-
<li>
|
|
405
|
-
<h5><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></h5></li>
|
|
406
|
-
<li>
|
|
407
|
-
<h5><span class="tsd-kind-parameter">list</span>: <a href="SinglyLinkedList.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedList</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">></span></h5></li></ul></div>
|
|
408
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></li></ul></li></ul></div>
|
|
409
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-property">index</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-property">node</span><span class="tsd-signature-symbol">: </span><a href="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></h4><p>The function <code>findNodeIndex</code> returns an object with two properties: <code>node</code> and <code>index</code>. The <code>node</code> property
|
|
410
|
-
contains the node that matches the condition specified in the <code>callbackFn</code> function, and the <code>index</code> property
|
|
411
|
-
contains the index of that node in the linked list. If no node matches the condition, the function returns
|
|
412
|
-
<code>undefined</code>.</p>
|
|
313
|
+
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
314
|
+
<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>getAt(index: number): T | null</code> returns the value at the specified index in the linked list, or
|
|
315
|
+
<code>null</code> if the index is out of bounds.</p>
|
|
413
316
|
|
|
414
317
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
415
318
|
<ul>
|
|
416
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
417
|
-
<section class="tsd-panel tsd-member"><a id="
|
|
418
|
-
<h3 class="tsd-anchor-link"><span>
|
|
319
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/singly-linked-list.ts#L180">src/data-structures/linked-list/singly-linked-list.ts:180</a></li></ul></aside></li></ul></section>
|
|
320
|
+
<section class="tsd-panel tsd-member"><a id="getLength" class="tsd-anchor"></a>
|
|
321
|
+
<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>
|
|
419
322
|
<ul class="tsd-signatures">
|
|
420
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
323
|
+
<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>
|
|
421
324
|
<li class="tsd-description">
|
|
422
|
-
<
|
|
423
|
-
forward or reverse order.</p>
|
|
424
|
-
</div>
|
|
425
|
-
<div class="tsd-parameters">
|
|
426
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
427
|
-
<ul class="tsd-parameter-list">
|
|
428
|
-
<li>
|
|
429
|
-
<h5><span class="tsd-kind-parameter">callbackFn</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span>, <span class="tsd-kind-parameter">index</span>, <span class="tsd-kind-parameter">list</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span></h5>
|
|
430
|
-
<div class="tsd-comment tsd-typography"><p>A callback function that will be called for each element in the linked list. It takes three
|
|
431
|
-
parameters:</p>
|
|
432
|
-
</div>
|
|
433
|
-
<div class="tsd-comment tsd-typography"></div>
|
|
434
|
-
<ul class="tsd-parameters">
|
|
435
|
-
<li class="tsd-parameter-signature">
|
|
436
|
-
<ul class="tsd-signatures">
|
|
437
|
-
<li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span>, <span class="tsd-kind-parameter">index</span>, <span class="tsd-kind-parameter">list</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li>
|
|
438
|
-
<li class="tsd-description">
|
|
439
|
-
<div class="tsd-parameters">
|
|
440
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
441
|
-
<ul class="tsd-parameter-list">
|
|
442
|
-
<li>
|
|
443
|
-
<h5><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type">any</span></h5></li>
|
|
444
|
-
<li>
|
|
445
|
-
<h5><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></h5></li>
|
|
446
|
-
<li>
|
|
447
|
-
<h5><span class="tsd-kind-parameter">list</span>: <a href="SinglyLinkedList.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedList</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">></span></h5></li></ul></div>
|
|
448
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4></li></ul></li></ul></li>
|
|
449
|
-
<li>
|
|
450
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">reverse</span>: <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></h5>
|
|
451
|
-
<div class="tsd-comment tsd-typography"><p>A boolean value indicating whether to iterate over the linked list in reverse order. If set
|
|
452
|
-
to true, the iteration will start from the tail of the linked list and move towards the head. If set to false
|
|
453
|
-
(default), the iteration will start from the head and move towards the tail.</p>
|
|
454
|
-
</div>
|
|
455
|
-
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
456
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
457
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
325
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
458
326
|
<ul>
|
|
459
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
460
|
-
<section class="tsd-panel tsd-member"><a id="
|
|
461
|
-
<h3 class="tsd-anchor-link"><span>get</span><a href="#
|
|
327
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/singly-linked-list.ts#L96">src/data-structures/linked-list/singly-linked-list.ts:96</a></li></ul></aside></li></ul></section>
|
|
328
|
+
<section class="tsd-panel tsd-member"><a id="getNodeAt" class="tsd-anchor"></a>
|
|
329
|
+
<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>
|
|
462
330
|
<ul class="tsd-signatures">
|
|
463
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
331
|
+
<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="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</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>
|
|
464
332
|
<li class="tsd-description">
|
|
465
|
-
<div class="tsd-comment tsd-typography"><p>The <code>
|
|
333
|
+
<div class="tsd-comment tsd-typography"><p>The function <code>getNodeAt</code> returns the node at a given index in a singly linked list.</p>
|
|
466
334
|
</div>
|
|
467
335
|
<div class="tsd-parameters">
|
|
468
336
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
469
337
|
<ul class="tsd-parameter-list">
|
|
470
338
|
<li>
|
|
471
339
|
<h5><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></h5>
|
|
472
|
-
<div class="tsd-comment tsd-typography"><p>The index parameter is a number that represents the position of the node
|
|
473
|
-
|
|
340
|
+
<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
|
|
341
|
+
retrieve from the linked list. It indicates the zero-based index of the node we want to access.</p>
|
|
474
342
|
</div>
|
|
475
343
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
476
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">
|
|
477
|
-
|
|
344
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</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>SinglyLinkedListNode<T></code> object if the node at the
|
|
345
|
+
specified index exists, or <code>null</code> if the index is out of bounds.</p>
|
|
478
346
|
|
|
479
347
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
480
348
|
<ul>
|
|
481
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
482
|
-
<section class="tsd-panel tsd-member"><a id="
|
|
483
|
-
<h3 class="tsd-anchor-link"><span>
|
|
349
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/singly-linked-list.ts#L196">src/data-structures/linked-list/singly-linked-list.ts:196</a></li></ul></aside></li></ul></section>
|
|
350
|
+
<section class="tsd-panel tsd-member"><a id="indexOf" class="tsd-anchor"></a>
|
|
351
|
+
<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>
|
|
484
352
|
<ul class="tsd-signatures">
|
|
485
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
353
|
+
<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">value</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>
|
|
486
354
|
<li class="tsd-description">
|
|
487
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
355
|
+
<div class="tsd-comment tsd-typography"><p>The <code>indexOf</code> function returns the index of the first occurrence of a given value in a linked list.</p>
|
|
488
356
|
</div>
|
|
489
357
|
<div class="tsd-parameters">
|
|
490
358
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
491
359
|
<ul class="tsd-parameter-list">
|
|
492
360
|
<li>
|
|
493
|
-
<h5><span class="tsd-kind-parameter">
|
|
494
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
495
|
-
retrieve from the linked list.</p>
|
|
361
|
+
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
362
|
+
<div class="tsd-comment tsd-typography"><p>The value parameter is the value that you want to find the index of in the linked list.</p>
|
|
496
363
|
</div>
|
|
497
364
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
498
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">
|
|
365
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>The method is returning the index of the first occurrence of the specified value in the linked list. If the
|
|
366
|
+
value is not found, it returns -1.</p>
|
|
499
367
|
|
|
500
368
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
501
369
|
<ul>
|
|
502
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
503
|
-
<section class="tsd-panel tsd-member"><a id="
|
|
504
|
-
<h3 class="tsd-anchor-link"><span>insert
|
|
370
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/singly-linked-list.ts#L363">src/data-structures/linked-list/singly-linked-list.ts:363</a></li></ul></aside></li></ul></section>
|
|
371
|
+
<section class="tsd-panel tsd-member"><a id="insert" class="tsd-anchor"></a>
|
|
372
|
+
<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>
|
|
505
373
|
<ul class="tsd-signatures">
|
|
506
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
374
|
+
<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>
|
|
507
375
|
<li class="tsd-description">
|
|
508
|
-
<div class="tsd-comment tsd-typography"><p>The <code>
|
|
509
|
-
list.</p>
|
|
376
|
+
<div class="tsd-comment tsd-typography"><p>The <code>insert</code> function inserts a value at a specified index in a singly linked list.</p>
|
|
510
377
|
</div>
|
|
511
378
|
<div class="tsd-parameters">
|
|
512
379
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
513
380
|
<ul class="tsd-parameter-list">
|
|
514
381
|
<li>
|
|
515
|
-
<h5><span class="tsd-kind-parameter">
|
|
516
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
382
|
+
<h5><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></h5>
|
|
383
|
+
<div class="tsd-comment tsd-typography"><p>The index parameter represents the position at which the new value should be inserted in the
|
|
384
|
+
linked list. It is of type number.</p>
|
|
517
385
|
</div>
|
|
518
386
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
519
387
|
<li>
|
|
520
|
-
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
521
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
388
|
+
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
389
|
+
<div class="tsd-comment tsd-typography"><p>The <code>val</code> parameter represents the value that you want to insert into the linked list at the
|
|
390
|
+
specified index.</p>
|
|
522
391
|
</div>
|
|
523
392
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
524
|
-
<h4 class="tsd-returns-title">Returns <
|
|
393
|
+
<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>
|
|
394
|
+
if the index is out of bounds.</p>
|
|
525
395
|
|
|
526
396
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
527
397
|
<ul>
|
|
528
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
529
|
-
<section class="tsd-panel tsd-member"><a id="
|
|
530
|
-
<h3 class="tsd-anchor-link"><span>insert<wbr/>
|
|
398
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/singly-linked-list.ts#L267">src/data-structures/linked-list/singly-linked-list.ts:267</a></li></ul></aside></li></ul></section>
|
|
399
|
+
<section class="tsd-panel tsd-member"><a id="insertAfter" class="tsd-anchor"></a>
|
|
400
|
+
<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>
|
|
531
401
|
<ul class="tsd-signatures">
|
|
532
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
402
|
+
<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>
|
|
533
403
|
<li class="tsd-description">
|
|
534
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
404
|
+
<div class="tsd-comment tsd-typography"><p>The function inserts a new value after an existing value in a singly linked list.</p>
|
|
535
405
|
</div>
|
|
536
406
|
<div class="tsd-parameters">
|
|
537
407
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
538
408
|
<ul class="tsd-parameter-list">
|
|
539
409
|
<li>
|
|
540
|
-
<h5><span class="tsd-kind-parameter">
|
|
541
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
542
|
-
inserted in the linked list.</p>
|
|
410
|
+
<h5><span class="tsd-kind-parameter">existingValue</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
411
|
+
<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>
|
|
543
412
|
</div>
|
|
544
413
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
545
414
|
<li>
|
|
546
|
-
<h5><span class="tsd-kind-parameter">
|
|
547
|
-
<div class="tsd-comment tsd-typography"><p>The <code>
|
|
548
|
-
|
|
415
|
+
<h5><span class="tsd-kind-parameter">newValue</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
416
|
+
<div class="tsd-comment tsd-typography"><p>The <code>newValue</code> parameter represents the value that you want to insert into the linked list
|
|
417
|
+
after the node with the <code>existingValue</code>.</p>
|
|
549
418
|
</div>
|
|
550
419
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
551
|
-
<h4 class="tsd-returns-title">Returns <
|
|
420
|
+
<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
|
|
421
|
+
existing value is not found in the linked list.</p>
|
|
552
422
|
|
|
553
423
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
554
424
|
<ul>
|
|
555
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
425
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/singly-linked-list.ts#L440">src/data-structures/linked-list/singly-linked-list.ts:440</a></li></ul></aside></li></ul></section>
|
|
556
426
|
<section class="tsd-panel tsd-member"><a id="insertBefore" class="tsd-anchor"></a>
|
|
557
427
|
<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>
|
|
558
428
|
<ul class="tsd-signatures">
|
|
559
|
-
<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">
|
|
429
|
+
<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>
|
|
560
430
|
<li class="tsd-description">
|
|
561
|
-
<div class="tsd-comment tsd-typography"><p>The <code>insertBefore</code> function inserts a new
|
|
562
|
-
linked list.</p>
|
|
431
|
+
<div class="tsd-comment tsd-typography"><p>The <code>insertBefore</code> function inserts a new value before an existing value in a singly linked list.</p>
|
|
563
432
|
</div>
|
|
564
433
|
<div class="tsd-parameters">
|
|
565
434
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
566
435
|
<ul class="tsd-parameter-list">
|
|
567
436
|
<li>
|
|
568
|
-
<h5><span class="tsd-kind-parameter">
|
|
569
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
570
|
-
|
|
437
|
+
<h5><span class="tsd-kind-parameter">existingValue</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
438
|
+
<div class="tsd-comment tsd-typography"><p>The existing value is the value that already exists in the linked list and before which
|
|
439
|
+
we want to insert a new value.</p>
|
|
571
440
|
</div>
|
|
572
441
|
<div class="tsd-comment tsd-typography"></div></li>
|
|
573
442
|
<li>
|
|
574
|
-
<h5><span class="tsd-kind-parameter">
|
|
575
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
443
|
+
<h5><span class="tsd-kind-parameter">newValue</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
444
|
+
<div class="tsd-comment tsd-typography"><p>The <code>newValue</code> parameter represents the value that you want to insert into the linked list.</p>
|
|
576
445
|
</div>
|
|
577
446
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
578
|
-
<h4 class="tsd-returns-title">Returns <
|
|
447
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The <code>insertBefore</code> function returns a boolean value. It returns <code>true</code> if the <code>newValue</code> is successfully
|
|
448
|
+
inserted before the first occurrence of <code>existingValue</code> in the linked list. It returns <code>false</code> if the
|
|
449
|
+
<code>existingValue</code> is not found in the linked list.</p>
|
|
579
450
|
|
|
580
451
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
581
452
|
<ul>
|
|
582
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
583
|
-
<section class="tsd-panel tsd-member"><a id="
|
|
584
|
-
<h3 class="tsd-anchor-link"><span>
|
|
453
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/singly-linked-list.ts#L407">src/data-structures/linked-list/singly-linked-list.ts:407</a></li></ul></aside></li></ul></section>
|
|
454
|
+
<section class="tsd-panel tsd-member"><a id="isEmpty" class="tsd-anchor"></a>
|
|
455
|
+
<h3 class="tsd-anchor-link"><span>is<wbr/>Empty</span><a href="#isEmpty" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
585
456
|
<ul class="tsd-signatures">
|
|
586
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
457
|
+
<li class="tsd-signature tsd-anchor-link" id="isEmpty.isEmpty-1"><span class="tsd-kind-call-signature">is<wbr/>Empty</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#isEmpty.isEmpty-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
587
458
|
<li class="tsd-description">
|
|
588
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
589
|
-
|
|
459
|
+
<div class="tsd-comment tsd-typography"><p>The function checks if the length of a data structure is equal to zero and returns a boolean value indicating
|
|
460
|
+
whether it is empty or not.</p>
|
|
590
461
|
</div>
|
|
591
|
-
<
|
|
592
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
593
|
-
<ul class="tsd-parameter-list">
|
|
594
|
-
<li>
|
|
595
|
-
<h5><span class="tsd-kind-parameter">callbackFn</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span>, <span class="tsd-kind-parameter">index</span>, <span class="tsd-kind-parameter">list</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span></h5>
|
|
596
|
-
<div class="tsd-comment tsd-typography"><p>A callback function that will be applied to each element in the linked list. It takes three
|
|
597
|
-
parameters:</p>
|
|
598
|
-
</div>
|
|
599
|
-
<div class="tsd-comment tsd-typography"></div>
|
|
600
|
-
<ul class="tsd-parameters">
|
|
601
|
-
<li class="tsd-parameter-signature">
|
|
602
|
-
<ul class="tsd-signatures">
|
|
603
|
-
<li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span>, <span class="tsd-kind-parameter">index</span>, <span class="tsd-kind-parameter">list</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li>
|
|
604
|
-
<li class="tsd-description">
|
|
605
|
-
<div class="tsd-parameters">
|
|
606
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
607
|
-
<ul class="tsd-parameter-list">
|
|
608
|
-
<li>
|
|
609
|
-
<h5><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type">any</span></h5></li>
|
|
610
|
-
<li>
|
|
611
|
-
<h5><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></h5></li>
|
|
612
|
-
<li>
|
|
613
|
-
<h5><span class="tsd-kind-parameter">list</span>: <a href="SinglyLinkedList.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedList</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">></span></h5></li></ul></div>
|
|
614
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4></li></ul></li></ul></li>
|
|
615
|
-
<li>
|
|
616
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">reverse</span>: <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></h5>
|
|
617
|
-
<div class="tsd-comment tsd-typography"><p>The <code>reverse</code> parameter is a boolean value that determines whether the mapping should be
|
|
618
|
-
done in reverse order or not. If <code>reverse</code> is set to <code>true</code>, the mapping will be done in reverse order. If <code>reverse</code>
|
|
619
|
-
is set to <code>false</code> or not provided, the mapping will be</p>
|
|
620
|
-
</div>
|
|
621
|
-
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
622
|
-
<h4 class="tsd-returns-title">Returns <a href="SinglyLinkedList.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedList</a><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">NodeVal</span><span class="tsd-signature-symbol">></span></h4><p>The <code>map</code> function is returning a new <code>SinglyLinkedList</code> object.</p>
|
|
462
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>A boolean value indicating whether the length of the object is equal to 0.</p>
|
|
623
463
|
|
|
624
464
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
625
465
|
<ul>
|
|
626
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
627
|
-
<section class="tsd-panel tsd-member"><a id="merge" class="tsd-anchor"></a>
|
|
628
|
-
<h3 class="tsd-anchor-link"><span>merge</span><a href="#merge" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
629
|
-
<ul class="tsd-signatures">
|
|
630
|
-
<li class="tsd-signature tsd-anchor-link" id="merge.merge-1"><span class="tsd-kind-call-signature">merge</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">list</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#merge.merge-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
631
|
-
<li class="tsd-description">
|
|
632
|
-
<div class="tsd-comment tsd-typography"><p>The merge function merges two singly linked lists by updating the next and prev pointers, as well as the head, tail,
|
|
633
|
-
and size properties.</p>
|
|
634
|
-
</div>
|
|
635
|
-
<div class="tsd-parameters">
|
|
636
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
637
|
-
<ul class="tsd-parameter-list">
|
|
638
|
-
<li>
|
|
639
|
-
<h5><span class="tsd-kind-parameter">list</span>: <a href="SinglyLinkedList.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedList</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">></span></h5>
|
|
640
|
-
<div class="tsd-comment tsd-typography"><p>The parameter "list" is a SinglyLinkedList object that contains nodes with data of type NodeVal.</p>
|
|
641
|
-
</div>
|
|
642
|
-
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
643
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
644
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
645
|
-
<ul>
|
|
646
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/singly-linked-list.ts#L527">src/data-structures/linked-list/singly-linked-list.ts:527</a></li></ul></aside></li></ul></section>
|
|
466
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/singly-linked-list.ts#L291">src/data-structures/linked-list/singly-linked-list.ts:291</a></li></ul></aside></li></ul></section>
|
|
647
467
|
<section class="tsd-panel tsd-member"><a id="pop" class="tsd-anchor"></a>
|
|
648
468
|
<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>
|
|
649
469
|
<ul class="tsd-signatures">
|
|
650
|
-
<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">
|
|
470
|
+
<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>
|
|
651
471
|
<li class="tsd-description">
|
|
652
|
-
<div class="tsd-comment tsd-typography"><p>The <code>pop()</code> function removes and returns the last element
|
|
472
|
+
<div class="tsd-comment tsd-typography"><p>The <code>pop()</code> function removes and returns the value of the last element in a linked list, updating the head and tail
|
|
473
|
+
pointers accordingly.</p>
|
|
653
474
|
</div>
|
|
654
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">
|
|
475
|
+
<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>pop()</code> returns the value of the node that is being removed from the end of the linked list. If
|
|
476
|
+
the linked list is empty, it returns <code>null</code>.</p>
|
|
655
477
|
|
|
656
478
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
657
479
|
<ul>
|
|
658
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
659
|
-
<section class="tsd-panel tsd-member"><a id="prepend" class="tsd-anchor"></a>
|
|
660
|
-
<h3 class="tsd-anchor-link"><span>prepend</span><a href="#prepend" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
661
|
-
<ul class="tsd-signatures">
|
|
662
|
-
<li class="tsd-signature tsd-anchor-link" id="prepend.prepend-1"><span class="tsd-kind-call-signature">prepend</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="SinglyLinkedList.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedList</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">></span><a href="#prepend.prepend-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
663
|
-
<li class="tsd-description">
|
|
664
|
-
<div class="tsd-comment tsd-typography"><p>The <code>prepend</code> function adds new nodes to the beginning of a singly linked list.</p>
|
|
665
|
-
</div>
|
|
666
|
-
<div class="tsd-parameters">
|
|
667
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
668
|
-
<ul class="tsd-parameter-list">
|
|
669
|
-
<li>
|
|
670
|
-
<h5><code class="tsd-tag ts-flagRest">Rest</code> <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">[]</span></h5>
|
|
671
|
-
<div class="tsd-comment tsd-typography"><p>An array of NodeVal objects.</p>
|
|
672
|
-
</div>
|
|
673
|
-
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
674
|
-
<h4 class="tsd-returns-title">Returns <a href="SinglyLinkedList.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedList</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">></span></h4><p>The <code>prepend</code> method is returning the updated <code>SinglyLinkedList</code> object.</p>
|
|
675
|
-
|
|
676
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
677
|
-
<ul>
|
|
678
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/singly-linked-list.ts#L310">src/data-structures/linked-list/singly-linked-list.ts:310</a></li></ul></aside></li></ul></section>
|
|
480
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/singly-linked-list.ts#L123">src/data-structures/linked-list/singly-linked-list.ts:123</a></li></ul></aside></li></ul></section>
|
|
679
481
|
<section class="tsd-panel tsd-member"><a id="push" class="tsd-anchor"></a>
|
|
680
482
|
<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>
|
|
681
483
|
<ul class="tsd-signatures">
|
|
682
|
-
<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-
|
|
683
|
-
<li class="tsd-description">
|
|
684
|
-
<div class="tsd-comment tsd-typography"><p>The push function appends multiple NodeVal objects to a data structure and returns the new size of the data
|
|
685
|
-
structure.</p>
|
|
686
|
-
</div>
|
|
687
|
-
<div class="tsd-parameters">
|
|
688
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
689
|
-
<ul class="tsd-parameter-list">
|
|
690
|
-
<li>
|
|
691
|
-
<h5><code class="tsd-tag ts-flagRest">Rest</code> <span class="tsd-signature-symbol">...</span><span class="tsd-kind-parameter">args</span>: <span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">[]</span></h5>
|
|
692
|
-
<div class="tsd-comment tsd-typography"><p>args is a rest parameter of type NodeVal[]. It allows the function to accept any number
|
|
693
|
-
of arguments of type NodeVal.</p>
|
|
694
|
-
</div>
|
|
695
|
-
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
696
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>The size of the data structure after the nodes are appended.</p>
|
|
697
|
-
|
|
698
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
699
|
-
<ul>
|
|
700
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/singly-linked-list.ts#L300">src/data-structures/linked-list/singly-linked-list.ts:300</a></li></ul></aside></li></ul></section>
|
|
701
|
-
<section class="tsd-panel tsd-member"><a id="reduce" class="tsd-anchor"></a>
|
|
702
|
-
<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>
|
|
703
|
-
<ul class="tsd-signatures">
|
|
704
|
-
<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-kind-parameter">callbackFn</span>, <span class="tsd-kind-parameter">start</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">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">any</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>
|
|
705
|
-
<li class="tsd-description">
|
|
706
|
-
<div class="tsd-comment tsd-typography"><p>The <code>reduce</code> function iterates over a singly linked list and applies a callback function to each element,
|
|
707
|
-
accumulating a single value.</p>
|
|
708
|
-
</div>
|
|
709
|
-
<div class="tsd-parameters">
|
|
710
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
711
|
-
<ul class="tsd-parameter-list">
|
|
712
|
-
<li>
|
|
713
|
-
<h5><span class="tsd-kind-parameter">callbackFn</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">currentNode</span>, <span class="tsd-kind-parameter">index</span>, <span class="tsd-kind-parameter">list</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span></h5>
|
|
714
|
-
<div class="tsd-comment tsd-typography"><p>A callback function that will be called for each element in the linked list. It takes four
|
|
715
|
-
parameters:</p>
|
|
716
|
-
</div>
|
|
717
|
-
<div class="tsd-comment tsd-typography"></div>
|
|
718
|
-
<ul class="tsd-parameters">
|
|
719
|
-
<li class="tsd-parameter-signature">
|
|
720
|
-
<ul class="tsd-signatures">
|
|
721
|
-
<li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">accumulator</span>, <span class="tsd-kind-parameter">currentNode</span>, <span class="tsd-kind-parameter">index</span>, <span class="tsd-kind-parameter">list</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li>
|
|
722
|
-
<li class="tsd-description">
|
|
723
|
-
<div class="tsd-parameters">
|
|
724
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
725
|
-
<ul class="tsd-parameter-list">
|
|
726
|
-
<li>
|
|
727
|
-
<h5><span class="tsd-kind-parameter">accumulator</span>: <span class="tsd-signature-type">any</span></h5></li>
|
|
728
|
-
<li>
|
|
729
|
-
<h5><span class="tsd-kind-parameter">currentNode</span>: <span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span></h5></li>
|
|
730
|
-
<li>
|
|
731
|
-
<h5><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></h5></li>
|
|
732
|
-
<li>
|
|
733
|
-
<h5><span class="tsd-kind-parameter">list</span>: <a href="SinglyLinkedList.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedList</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">></span></h5></li></ul></div>
|
|
734
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4></li></ul></li></ul></li>
|
|
735
|
-
<li>
|
|
736
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">start</span>: <span class="tsd-signature-type">any</span></h5>
|
|
737
|
-
<div class="tsd-comment tsd-typography"><p>The <code>start</code> parameter is an optional initial value for the accumulator. If provided, the
|
|
738
|
-
<code>reduce</code> function will start accumulating from this value. If not provided, the <code>reduce</code> function will use the value
|
|
739
|
-
of the first element in the linked list as the initial value.</p>
|
|
740
|
-
</div>
|
|
741
|
-
<div class="tsd-comment tsd-typography"></div></li>
|
|
742
|
-
<li>
|
|
743
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">reverse</span>: <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></h5>
|
|
744
|
-
<div class="tsd-comment tsd-typography"><p>A boolean value indicating whether to iterate over the linked list in reverse order. If set
|
|
745
|
-
to true, the iteration will start from the tail of the linked list and move towards the head. If set to false
|
|
746
|
-
(default), the iteration will start from the head and move towards the tail.</p>
|
|
747
|
-
</div>
|
|
748
|
-
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
749
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4><p>The <code>reduce</code> method returns the accumulated value after applying the callback function to each element in
|
|
750
|
-
the linked list.</p>
|
|
751
|
-
|
|
752
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
753
|
-
<ul>
|
|
754
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/singly-linked-list.ts#L682">src/data-structures/linked-list/singly-linked-list.ts:682</a></li></ul></aside></li></ul></section>
|
|
755
|
-
<section class="tsd-panel tsd-member"><a id="removeAt" class="tsd-anchor"></a>
|
|
756
|
-
<h3 class="tsd-anchor-link"><span>remove<wbr/>At</span><a href="#removeAt" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
757
|
-
<ul class="tsd-signatures">
|
|
758
|
-
<li class="tsd-signature tsd-anchor-link" id="removeAt.removeAt-1"><span class="tsd-kind-call-signature">remove<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">undefined</span><span class="tsd-signature-symbol"> | </span><a href="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">></span><a href="#removeAt.removeAt-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
759
|
-
<li class="tsd-description">
|
|
760
|
-
<div class="tsd-comment tsd-typography"><p>The <code>removeAt</code> function removes a node at a specified index from a singly linked list.</p>
|
|
761
|
-
</div>
|
|
762
|
-
<div class="tsd-parameters">
|
|
763
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
764
|
-
<ul class="tsd-parameter-list">
|
|
765
|
-
<li>
|
|
766
|
-
<h5><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></h5>
|
|
767
|
-
<div class="tsd-comment tsd-typography"><p>The index parameter is a number that represents the position of the node to be removed in
|
|
768
|
-
the singly linked list.</p>
|
|
769
|
-
</div>
|
|
770
|
-
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
771
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">></span></h4><p>The method <code>removeAt</code> returns a <code>SinglyLinkedListNode<NodeVal></code> if the node at the specified index is
|
|
772
|
-
found and removed successfully. If the node is not found, it returns <code>undefined</code>.</p>
|
|
773
|
-
|
|
774
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
775
|
-
<ul>
|
|
776
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/singly-linked-list.ts#L394">src/data-structures/linked-list/singly-linked-list.ts:394</a></li></ul></aside></li></ul></section>
|
|
777
|
-
<section class="tsd-panel tsd-member tsd-is-protected"><a id="removeFromAnyEnd" class="tsd-anchor"></a>
|
|
778
|
-
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>remove<wbr/>From<wbr/>Any<wbr/>End</span><a href="#removeFromAnyEnd" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
779
|
-
<ul class="tsd-signatures tsd-is-protected">
|
|
780
|
-
<li class="tsd-signature tsd-anchor-link" id="removeFromAnyEnd.removeFromAnyEnd-1"><span class="tsd-kind-call-signature">remove<wbr/>From<wbr/>Any<wbr/>End</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><a href="#removeFromAnyEnd.removeFromAnyEnd-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
781
|
-
<li class="tsd-description">
|
|
782
|
-
<div class="tsd-comment tsd-typography"><p>The function removes a node from either end of a singly linked list and returns its value.</p>
|
|
783
|
-
</div>
|
|
784
|
-
<div class="tsd-parameters">
|
|
785
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
786
|
-
<ul class="tsd-parameter-list">
|
|
787
|
-
<li>
|
|
788
|
-
<h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">></span></h5>
|
|
789
|
-
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a reference to a node in a singly
|
|
790
|
-
linked list. It can be either a <code>SinglyLinkedListNode</code> object or <code>null</code>.</p>
|
|
791
|
-
</div>
|
|
792
|
-
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
793
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span></h4><p>The value of the removed node if the node is not null, otherwise undefined.</p>
|
|
794
|
-
|
|
795
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
796
|
-
<ul>
|
|
797
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/singly-linked-list.ts#L754">src/data-structures/linked-list/singly-linked-list.ts:754</a></li></ul></aside></li></ul></section>
|
|
798
|
-
<section class="tsd-panel tsd-member"><a id="removeNode" class="tsd-anchor"></a>
|
|
799
|
-
<h3 class="tsd-anchor-link"><span>remove<wbr/>Node</span><a href="#removeNode" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
800
|
-
<ul class="tsd-signatures">
|
|
801
|
-
<li class="tsd-signature tsd-anchor-link" id="removeNode.removeNode-1"><span class="tsd-kind-call-signature">remove<wbr/>Node</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">></span><a href="#removeNode.removeNode-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
484
|
+
<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">data</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>
|
|
802
485
|
<li class="tsd-description">
|
|
803
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
804
|
-
accordingly.</p>
|
|
486
|
+
<div class="tsd-comment tsd-typography"><p>The <code>push</code> function adds a new node with the given data to the end of a singly linked list.</p>
|
|
805
487
|
</div>
|
|
806
488
|
<div class="tsd-parameters">
|
|
807
489
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
808
490
|
<ul class="tsd-parameter-list">
|
|
809
491
|
<li>
|
|
810
|
-
<h5><span class="tsd-kind-parameter">
|
|
811
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
812
|
-
|
|
492
|
+
<h5><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
493
|
+
<div class="tsd-comment tsd-typography"><p>The "data" parameter represents the value that you want to add to the linked list. It can be of
|
|
494
|
+
any type (T) as specified in the generic type declaration of the class or function.</p>
|
|
813
495
|
</div>
|
|
814
496
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
815
|
-
<h4 class="tsd-returns-title">Returns <
|
|
816
|
-
|
|
497
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
817
498
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
818
499
|
<ul>
|
|
819
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
500
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/singly-linked-list.ts#L105">src/data-structures/linked-list/singly-linked-list.ts:105</a></li></ul></aside></li></ul></section>
|
|
820
501
|
<section class="tsd-panel tsd-member"><a id="reverse" class="tsd-anchor"></a>
|
|
821
502
|
<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>
|
|
822
503
|
<ul class="tsd-signatures">
|
|
823
|
-
<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><
|
|
504
|
+
<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>
|
|
824
505
|
<li class="tsd-description">
|
|
825
|
-
<div class="tsd-comment tsd-typography"><p>The reverse
|
|
506
|
+
<div class="tsd-comment tsd-typography"><p>The <code>reverse</code> function reverses the order of the nodes in a singly linked list.</p>
|
|
826
507
|
</div>
|
|
827
|
-
<h4 class="tsd-returns-title">Returns <
|
|
508
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><p>The reverse() method does not return anything. It has a return type of void.</p>
|
|
828
509
|
|
|
829
510
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
830
511
|
<ul>
|
|
831
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
512
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/singly-linked-list.ts#L322">src/data-structures/linked-list/singly-linked-list.ts:322</a></li></ul></aside></li></ul></section>
|
|
832
513
|
<section class="tsd-panel tsd-member"><a id="shift" class="tsd-anchor"></a>
|
|
833
514
|
<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>
|
|
834
515
|
<ul class="tsd-signatures">
|
|
835
|
-
<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">
|
|
836
|
-
<li class="tsd-description">
|
|
837
|
-
<div class="tsd-comment tsd-typography"><p>The <code>shift()</code> function removes and returns the first element from a linked list.</p>
|
|
838
|
-
</div>
|
|
839
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span></h4><p>The <code>shift()</code> method is returning a value of type <code>NodeVal</code> or <code>undefined</code>.</p>
|
|
840
|
-
|
|
841
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
842
|
-
<ul>
|
|
843
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/singly-linked-list.ts#L510">src/data-structures/linked-list/singly-linked-list.ts:510</a></li></ul></aside></li></ul></section>
|
|
844
|
-
<section class="tsd-panel tsd-member"><a id="slice" class="tsd-anchor"></a>
|
|
845
|
-
<h3 class="tsd-anchor-link"><span>slice</span><a href="#slice" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
846
|
-
<ul class="tsd-signatures">
|
|
847
|
-
<li class="tsd-signature tsd-anchor-link" id="slice.slice-1"><span class="tsd-kind-call-signature">slice</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">start</span>, <span class="tsd-kind-parameter">end</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="SinglyLinkedList.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedList</a><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">NodeVal</span><span class="tsd-signature-symbol">></span><a href="#slice.slice-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
848
|
-
<li class="tsd-description">
|
|
849
|
-
<div class="tsd-comment tsd-typography"><p>The <code>slice</code> function returns a new SinglyLinkedList containing a portion of the original list, starting from the
|
|
850
|
-
specified index and ending at the optional end index.</p>
|
|
851
|
-
</div>
|
|
852
|
-
<div class="tsd-parameters">
|
|
853
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
854
|
-
<ul class="tsd-parameter-list">
|
|
855
|
-
<li>
|
|
856
|
-
<h5><span class="tsd-kind-parameter">start</span>: <span class="tsd-signature-type">number</span></h5>
|
|
857
|
-
<div class="tsd-comment tsd-typography"><p>The <code>start</code> parameter is a number that represents the index at which to start slicing the
|
|
858
|
-
linked list.</p>
|
|
859
|
-
</div>
|
|
860
|
-
<div class="tsd-comment tsd-typography"></div></li>
|
|
861
|
-
<li>
|
|
862
|
-
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">end</span>: <span class="tsd-signature-type">number</span></h5>
|
|
863
|
-
<div class="tsd-comment tsd-typography"><p>The <code>end</code> parameter is an optional number that specifies the index at which to end the
|
|
864
|
-
slicing. If no value is provided for <code>end</code>, or if the provided value is less than the <code>start</code> index, the slicing
|
|
865
|
-
will continue until the end of the list.</p>
|
|
866
|
-
</div>
|
|
867
|
-
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
868
|
-
<h4 class="tsd-returns-title">Returns <a href="SinglyLinkedList.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedList</a><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">NodeVal</span><span class="tsd-signature-symbol">></span></h4><p>a new SinglyLinkedList containing the sliced elements from the original list.</p>
|
|
869
|
-
|
|
870
|
-
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
871
|
-
<ul>
|
|
872
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/singly-linked-list.ts#L563">src/data-structures/linked-list/singly-linked-list.ts:563</a></li></ul></aside></li></ul></section>
|
|
873
|
-
<section class="tsd-panel tsd-member"><a id="sort" class="tsd-anchor"></a>
|
|
874
|
-
<h3 class="tsd-anchor-link"><span>sort</span><a href="#sort" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
875
|
-
<ul class="tsd-signatures">
|
|
876
|
-
<li class="tsd-signature tsd-anchor-link" id="sort.sort-1"><span class="tsd-kind-call-signature">sort</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">compare</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="SinglyLinkedList.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedList</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">></span><a href="#sort.sort-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
516
|
+
<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>
|
|
877
517
|
<li class="tsd-description">
|
|
878
|
-
<div class="tsd-comment tsd-typography"><p>The <code>
|
|
879
|
-
comparison function.</p>
|
|
518
|
+
<div class="tsd-comment tsd-typography"><p>The <code>shift()</code> function removes and returns the value of the first node in a linked list.</p>
|
|
880
519
|
</div>
|
|
881
|
-
<
|
|
882
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
883
|
-
<ul class="tsd-parameter-list">
|
|
884
|
-
<li>
|
|
885
|
-
<h5><span class="tsd-kind-parameter">compare</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">a</span>, <span class="tsd-kind-parameter">b</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>
|
|
886
|
-
<ul class="tsd-parameters">
|
|
887
|
-
<li class="tsd-parameter-signature">
|
|
888
|
-
<ul class="tsd-signatures">
|
|
889
|
-
<li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">a</span>, <span class="tsd-kind-parameter">b</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
|
|
890
|
-
<li class="tsd-description">
|
|
891
|
-
<div class="tsd-parameters">
|
|
892
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
893
|
-
<ul class="tsd-parameter-list">
|
|
894
|
-
<li>
|
|
895
|
-
<h5><span class="tsd-kind-parameter">a</span>: <span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span></h5></li>
|
|
896
|
-
<li>
|
|
897
|
-
<h5><span class="tsd-kind-parameter">b</span>: <span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span></h5></li></ul></div>
|
|
898
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></li></ul></li></ul></div>
|
|
899
|
-
<h4 class="tsd-returns-title">Returns <a href="SinglyLinkedList.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedList</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">></span></h4><p>The <code>sort</code> method is returning the sorted <code>SinglyLinkedList</code> object.</p>
|
|
520
|
+
<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 value of the node that is being removed from the beginning of the linked list.</p>
|
|
900
521
|
|
|
901
522
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
902
523
|
<ul>
|
|
903
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
524
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/singly-linked-list.ts#L148">src/data-structures/linked-list/singly-linked-list.ts:148</a></li></ul></aside></li></ul></section>
|
|
904
525
|
<section class="tsd-panel tsd-member"><a id="toArray" class="tsd-anchor"></a>
|
|
905
526
|
<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>
|
|
906
527
|
<ul class="tsd-signatures">
|
|
907
|
-
<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">
|
|
528
|
+
<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>
|
|
908
529
|
<li class="tsd-description">
|
|
909
|
-
<div class="tsd-comment tsd-typography"><p>The toArray
|
|
530
|
+
<div class="tsd-comment tsd-typography"><p>The <code>toArray</code> function converts a linked list into an array.</p>
|
|
910
531
|
</div>
|
|
911
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">
|
|
532
|
+
<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>
|
|
912
533
|
|
|
913
534
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
914
535
|
<ul>
|
|
915
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
916
|
-
<section class="tsd-panel tsd-member"><a id="
|
|
917
|
-
<h3 class="tsd-anchor-link"><span>
|
|
536
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/singly-linked-list.ts#L308">src/data-structures/linked-list/singly-linked-list.ts:308</a></li></ul></aside></li></ul></section>
|
|
537
|
+
<section class="tsd-panel tsd-member"><a id="unshift" class="tsd-anchor"></a>
|
|
538
|
+
<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>
|
|
918
539
|
<ul class="tsd-signatures">
|
|
919
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
540
|
+
<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>
|
|
920
541
|
<li class="tsd-description">
|
|
921
|
-
<div class="tsd-comment tsd-typography"><p>The
|
|
922
|
-
element separated by the specified separator.</p>
|
|
542
|
+
<div class="tsd-comment tsd-typography"><p>The unshift function adds a new node with the given value to the beginning of a singly linked list.</p>
|
|
923
543
|
</div>
|
|
924
544
|
<div class="tsd-parameters">
|
|
925
545
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
926
546
|
<ul class="tsd-parameter-list">
|
|
927
547
|
<li>
|
|
928
|
-
<h5><
|
|
929
|
-
<
|
|
930
|
-
|
|
548
|
+
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
|
|
549
|
+
<div class="tsd-comment tsd-typography"><p>The parameter "val" represents the value of the new node that will be added to the beginning of the
|
|
550
|
+
linked list.</p>
|
|
551
|
+
</div>
|
|
552
|
+
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
553
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
931
554
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
932
555
|
<ul>
|
|
933
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
934
|
-
<section class="tsd-panel tsd-member"><a id="
|
|
935
|
-
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>from</span><a href="#
|
|
556
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/singly-linked-list.ts#L161">src/data-structures/linked-list/singly-linked-list.ts:161</a></li></ul></aside></li></ul></section>
|
|
557
|
+
<section class="tsd-panel tsd-member"><a id="fromArray" class="tsd-anchor"></a>
|
|
558
|
+
<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>
|
|
936
559
|
<ul class="tsd-signatures">
|
|
937
|
-
<li class="tsd-signature tsd-anchor-link" id="
|
|
560
|
+
<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="SinglyLinkedList.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedList</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>
|
|
938
561
|
<li class="tsd-description">
|
|
939
|
-
<div class="tsd-comment tsd-typography"><p>The <code>
|
|
562
|
+
<div class="tsd-comment tsd-typography"><p>The <code>fromArray</code> function creates a new SinglyLinkedList instance and populates it with the elements from the given
|
|
563
|
+
array.</p>
|
|
940
564
|
</div>
|
|
941
565
|
<section class="tsd-panel">
|
|
942
566
|
<h4>Type Parameters</h4>
|
|
@@ -947,16 +571,15 @@ element separated by the specified separator.</p>
|
|
|
947
571
|
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
948
572
|
<ul class="tsd-parameter-list">
|
|
949
573
|
<li>
|
|
950
|
-
<h5><span class="tsd-kind-parameter">
|
|
951
|
-
<div class="tsd-comment tsd-typography"><p>The <code>
|
|
952
|
-
contains a collection of elements of type <code>T</code>.</p>
|
|
574
|
+
<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>
|
|
575
|
+
<div class="tsd-comment tsd-typography"><p>The <code>data</code> parameter is an array of elements of type <code>T</code>.</p>
|
|
953
576
|
</div>
|
|
954
577
|
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
955
|
-
<h4 class="tsd-returns-title">Returns <a href="SinglyLinkedList.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedList</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
|
|
578
|
+
<h4 class="tsd-returns-title">Returns <a href="SinglyLinkedList.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedList</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 <code>SinglyLinkedList</code> object.</p>
|
|
956
579
|
|
|
957
580
|
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
958
581
|
<ul>
|
|
959
|
-
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/
|
|
582
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/dcec645/src/data-structures/linked-list/singly-linked-list.ts#L88">src/data-structures/linked-list/singly-linked-list.ts:88</a></li></ul></aside></li></ul></section></section></div>
|
|
960
583
|
<div class="col-sidebar">
|
|
961
584
|
<div class="page-menu">
|
|
962
585
|
<div class="tsd-navigation settings">
|
|
@@ -977,42 +600,33 @@ contains a collection of elements of type <code>T</code>.</p>
|
|
|
977
600
|
<div class="tsd-accordion-details">
|
|
978
601
|
<ul>
|
|
979
602
|
<li><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-512"></use></svg><span>constructor</span></a></li>
|
|
980
|
-
<li><a href="#_head" class="tsd-is-
|
|
981
|
-
<li><a href="#
|
|
982
|
-
<li><a href="#_tail" class="tsd-is-
|
|
603
|
+
<li><a href="#_head" class="tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_head</span></a></li>
|
|
604
|
+
<li><a href="#_length" class="tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_length</span></a></li>
|
|
605
|
+
<li><a href="#_tail" class="tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_tail</span></a></li>
|
|
983
606
|
<li><a href="#head" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>head</span></a></li>
|
|
984
|
-
<li><a href="#
|
|
607
|
+
<li><a href="#length" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>length</span></a></li>
|
|
985
608
|
<li><a href="#tail" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>tail</span></a></li>
|
|
986
|
-
<li><a href="#_iterator_" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>[iterator]</span></a></li>
|
|
987
|
-
<li><a href="#append" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>append</span></a></li>
|
|
988
609
|
<li><a href="#clear" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>clear</span></a></li>
|
|
989
|
-
<li><a href="#
|
|
610
|
+
<li><a href="#countOccurrences" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>count<wbr/>Occurrences</span></a></li>
|
|
611
|
+
<li><a href="#delete" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>delete</span></a></li>
|
|
612
|
+
<li><a href="#deleteAt" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>delete<wbr/>At</span></a></li>
|
|
990
613
|
<li><a href="#find" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>find</span></a></li>
|
|
991
|
-
<li><a href="#findIndex" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>find<wbr/>Index</span></a></li>
|
|
992
614
|
<li><a href="#findNode" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>find<wbr/>Node</span></a></li>
|
|
993
|
-
<li><a href="#
|
|
994
|
-
<li><a href="#
|
|
995
|
-
<li><a href="#
|
|
996
|
-
<li><a href="#
|
|
615
|
+
<li><a href="#getAt" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>At</span></a></li>
|
|
616
|
+
<li><a href="#getLength" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Length</span></a></li>
|
|
617
|
+
<li><a href="#getNodeAt" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Node<wbr/>At</span></a></li>
|
|
618
|
+
<li><a href="#indexOf" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>index<wbr/>Of</span></a></li>
|
|
619
|
+
<li><a href="#insert" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>insert</span></a></li>
|
|
997
620
|
<li><a href="#insertAfter" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>insert<wbr/>After</span></a></li>
|
|
998
|
-
<li><a href="#insertAt" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>insert<wbr/>At</span></a></li>
|
|
999
621
|
<li><a href="#insertBefore" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>insert<wbr/>Before</span></a></li>
|
|
1000
|
-
<li><a href="#
|
|
1001
|
-
<li><a href="#merge" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>merge</span></a></li>
|
|
622
|
+
<li><a href="#isEmpty" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>is<wbr/>Empty</span></a></li>
|
|
1002
623
|
<li><a href="#pop" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>pop</span></a></li>
|
|
1003
|
-
<li><a href="#prepend" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>prepend</span></a></li>
|
|
1004
624
|
<li><a href="#push" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>push</span></a></li>
|
|
1005
|
-
<li><a href="#reduce" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>reduce</span></a></li>
|
|
1006
|
-
<li><a href="#removeAt" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>remove<wbr/>At</span></a></li>
|
|
1007
|
-
<li><a href="#removeFromAnyEnd" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>remove<wbr/>From<wbr/>Any<wbr/>End</span></a></li>
|
|
1008
|
-
<li><a href="#removeNode" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>remove<wbr/>Node</span></a></li>
|
|
1009
625
|
<li><a href="#reverse" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>reverse</span></a></li>
|
|
1010
626
|
<li><a href="#shift" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>shift</span></a></li>
|
|
1011
|
-
<li><a href="#slice" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>slice</span></a></li>
|
|
1012
|
-
<li><a href="#sort" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>sort</span></a></li>
|
|
1013
627
|
<li><a href="#toArray" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>to<wbr/>Array</span></a></li>
|
|
1014
|
-
<li><a href="#
|
|
1015
|
-
<li><a href="#
|
|
628
|
+
<li><a href="#unshift" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>unshift</span></a></li>
|
|
629
|
+
<li><a href="#fromArray" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>from<wbr/>Array</span></a></li></ul></div></details></div>
|
|
1016
630
|
<div class="site-menu">
|
|
1017
631
|
<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>
|
|
1018
632
|
<ul class="tsd-small-nested-navigation">
|
|
@@ -1070,7 +684,6 @@ contains a collection of elements of type <code>T</code>.</p>
|
|
|
1070
684
|
<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>
|
|
1071
685
|
<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>
|
|
1072
686
|
<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>
|
|
1073
|
-
<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>
|
|
1074
687
|
<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>
|
|
1075
688
|
<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>
|
|
1076
689
|
<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>
|