data-structure-typed 1.15.2 → 1.16.1
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 +24 -24
- package/dist/data-structures/heap/heap.d.ts +30 -15
- package/dist/data-structures/heap/heap.js +60 -15
- package/dist/data-structures/heap/max-heap.d.ts +3 -3
- package/dist/data-structures/heap/min-heap.d.ts +3 -3
- package/dist/data-structures/index.d.ts +1 -0
- package/dist/data-structures/index.js +1 -0
- package/dist/data-structures/priority-queue/max-priority-queue.d.ts +4 -5
- package/dist/data-structures/priority-queue/max-priority-queue.js +30 -6
- package/dist/data-structures/priority-queue/min-priority-queue.d.ts +4 -5
- package/dist/data-structures/priority-queue/min-priority-queue.js +31 -6
- package/dist/data-structures/priority-queue/priority-queue.d.ts +13 -2
- package/dist/data-structures/priority-queue/priority-queue.js +28 -22
- package/dist/data-structures/tree/index.d.ts +1 -0
- package/dist/data-structures/tree/index.js +17 -0
- package/dist/data-structures/tree/tree.d.ts +9 -0
- package/dist/data-structures/tree/tree.js +52 -0
- package/dist/data-structures/types/heap.d.ts +0 -4
- package/dist/utils/types/utils.d.ts +1 -0
- package/docs/.nojekyll +1 -0
- package/docs/assets/highlight.css +92 -0
- package/docs/assets/main.js +58 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1367 -0
- package/docs/classes/AVLTree.html +2192 -0
- package/docs/classes/AVLTreeNode.html +574 -0
- package/docs/classes/AaTree.html +150 -0
- package/docs/classes/AbstractEdge.html +269 -0
- package/docs/classes/AbstractGraph.html +927 -0
- package/docs/classes/AbstractVertex.html +215 -0
- package/docs/classes/ArrayDeque.html +417 -0
- package/docs/classes/BST.html +2038 -0
- package/docs/classes/BSTNode.html +570 -0
- package/docs/classes/BTree.html +150 -0
- package/docs/classes/BinaryIndexedTree.html +289 -0
- package/docs/classes/BinaryTree.html +1827 -0
- package/docs/classes/BinaryTreeNode.html +533 -0
- package/docs/classes/Character.html +198 -0
- package/docs/classes/CoordinateMap.html +469 -0
- package/docs/classes/CoordinateSet.html +430 -0
- package/docs/classes/Deque.html +767 -0
- package/docs/classes/DirectedEdge.html +354 -0
- package/docs/classes/DirectedGraph.html +1243 -0
- package/docs/classes/DirectedVertex.html +226 -0
- package/docs/classes/DoublyLinkedList.html +733 -0
- package/docs/classes/DoublyLinkedListNode.html +258 -0
- package/docs/classes/Heap.html +482 -0
- package/docs/classes/HeapItem.html +233 -0
- package/docs/classes/Matrix2D.html +480 -0
- package/docs/classes/MatrixNTI2D.html +218 -0
- package/docs/classes/MaxHeap.html +500 -0
- package/docs/classes/MaxPriorityQueue.html +809 -0
- package/docs/classes/MinHeap.html +501 -0
- package/docs/classes/MinPriorityQueue.html +811 -0
- package/docs/classes/Navigator.html +291 -0
- package/docs/classes/ObjectDeque.html +423 -0
- package/docs/classes/PriorityQueue.html +733 -0
- package/docs/classes/Queue.html +370 -0
- package/docs/classes/RBTree.html +150 -0
- package/docs/classes/SegmentTree.html +345 -0
- package/docs/classes/SegmentTreeNode.html +418 -0
- package/docs/classes/SinglyLinkedList.html +1105 -0
- package/docs/classes/SinglyLinkedListNode.html +375 -0
- package/docs/classes/SplayTree.html +150 -0
- package/docs/classes/Stack.html +346 -0
- package/docs/classes/TreeMultiSet.html +2036 -0
- package/docs/classes/TreeNode.html +236 -0
- package/docs/classes/Trie.html +350 -0
- package/docs/classes/TrieNode.html +258 -0
- package/docs/classes/TwoThreeTree.html +150 -0
- package/docs/classes/UndirectedEdge.html +313 -0
- package/docs/classes/UndirectedGraph.html +1080 -0
- package/docs/classes/UndirectedVertex.html +226 -0
- package/docs/classes/Vector2D.html +783 -0
- package/docs/enums/CP.html +159 -0
- package/docs/enums/FamilyPosition.html +159 -0
- package/docs/enums/LoopType.html +160 -0
- package/docs/index.html +494 -0
- package/docs/interfaces/AVLTreeDeleted.html +161 -0
- package/docs/interfaces/BinaryTreeNodeObj.html +168 -0
- package/docs/interfaces/HeapOptions.html +167 -0
- package/docs/interfaces/IDirectedGraph.html +243 -0
- package/docs/interfaces/IGraph.html +427 -0
- package/docs/interfaces/NavigatorParams.html +197 -0
- package/docs/interfaces/PriorityQueueOptions.html +168 -0
- package/docs/modules.html +218 -0
- package/docs/types/BSTComparator.html +140 -0
- package/docs/types/BSTDeletedResult.html +137 -0
- package/docs/types/BinaryTreeDeleted.html +137 -0
- package/docs/types/BinaryTreeNodeId.html +125 -0
- package/docs/types/BinaryTreeNodePropertyName.html +125 -0
- package/docs/types/DFSOrderPattern.html +125 -0
- package/docs/types/DijkstraResult.html +145 -0
- package/docs/types/Direction.html +125 -0
- package/docs/types/DoublyLinkedListGetBy.html +125 -0
- package/docs/types/NodeOrPropertyName.html +125 -0
- package/docs/types/PriorityQueueComparator.html +145 -0
- package/docs/types/PriorityQueueDFSOrderPattern.html +125 -0
- package/docs/types/ResultByProperty.html +130 -0
- package/docs/types/ResultsByProperty.html +130 -0
- package/docs/types/SegmentTreeNodeVal.html +125 -0
- package/docs/types/SpecifyOptional.html +132 -0
- package/docs/types/Thunk.html +133 -0
- package/docs/types/ToThunkFn.html +133 -0
- package/docs/types/TopologicalStatus.html +125 -0
- package/docs/types/TreeMultiSetDeletedResult.html +137 -0
- package/docs/types/TrlAsyncFn.html +138 -0
- package/docs/types/TrlFn.html +138 -0
- package/docs/types/Turning.html +125 -0
- package/docs/types/VertexId.html +125 -0
- package/{tests/unit/data-structures/binary-tree → notes}/bst.test.ts +37 -50
- package/notes/note.md +23 -0
- package/package.json +1 -1
- package/.idea/data-structure-typed.iml +0 -14
- package/.idea/modules.xml +0 -8
- package/.idea/vcs.xml +0 -6
- package/src/assets/complexities-diff.jpg +0 -0
- package/src/assets/data-structure-complexities.jpg +0 -0
- package/src/assets/logo.png +0 -0
- package/src/assets/overview-diagram-of-data-structures.png +0 -0
- package/src/data-structures/binary-tree/aa-tree.ts +0 -3
- package/src/data-structures/binary-tree/avl-tree.ts +0 -293
- package/src/data-structures/binary-tree/b-tree.ts +0 -3
- package/src/data-structures/binary-tree/binary-indexed-tree.ts +0 -69
- package/src/data-structures/binary-tree/binary-tree.ts +0 -1492
- package/src/data-structures/binary-tree/bst.ts +0 -497
- package/src/data-structures/binary-tree/diagrams/avl-tree-inserting.gif +0 -0
- package/src/data-structures/binary-tree/diagrams/bst-rotation.gif +0 -0
- package/src/data-structures/binary-tree/diagrams/segment-tree.png +0 -0
- package/src/data-structures/binary-tree/index.ts +0 -11
- package/src/data-structures/binary-tree/rb-tree.ts +0 -3
- package/src/data-structures/binary-tree/segment-tree.ts +0 -267
- package/src/data-structures/binary-tree/splay-tree.ts +0 -3
- package/src/data-structures/binary-tree/tree-multiset.ts +0 -53
- package/src/data-structures/binary-tree/two-three-tree.ts +0 -3
- package/src/data-structures/diagrams/README.md +0 -5
- package/src/data-structures/graph/abstract-graph.ts +0 -958
- package/src/data-structures/graph/diagrams/adjacency-list-pros-cons.jpg +0 -0
- package/src/data-structures/graph/diagrams/adjacency-list.jpg +0 -0
- package/src/data-structures/graph/diagrams/adjacency-matrix-pros-cons.jpg +0 -0
- package/src/data-structures/graph/diagrams/adjacency-matrix.jpg +0 -0
- package/src/data-structures/graph/diagrams/dfs-can-do.jpg +0 -0
- package/src/data-structures/graph/diagrams/edge-list-pros-cons.jpg +0 -0
- package/src/data-structures/graph/diagrams/edge-list.jpg +0 -0
- package/src/data-structures/graph/diagrams/max-flow.jpg +0 -0
- package/src/data-structures/graph/diagrams/mst.jpg +0 -0
- package/src/data-structures/graph/diagrams/tarjan-articulation-point-bridge.png +0 -0
- package/src/data-structures/graph/diagrams/tarjan-complicate-simple.png +0 -0
- package/src/data-structures/graph/diagrams/tarjan-strongly-connected-component.png +0 -0
- package/src/data-structures/graph/diagrams/tarjan.mp4 +0 -0
- package/src/data-structures/graph/diagrams/tarjan.webp +0 -0
- package/src/data-structures/graph/directed-graph.ts +0 -429
- package/src/data-structures/graph/index.ts +0 -3
- package/src/data-structures/graph/undirected-graph.ts +0 -259
- package/src/data-structures/hash/coordinate-map.ts +0 -74
- package/src/data-structures/hash/coordinate-set.ts +0 -63
- package/src/data-structures/hash/hash-table.ts +0 -1
- package/src/data-structures/hash/index.ts +0 -6
- package/src/data-structures/hash/pair.ts +0 -1
- package/src/data-structures/hash/tree-map.ts +0 -1
- package/src/data-structures/hash/tree-set.ts +0 -1
- package/src/data-structures/heap/heap.ts +0 -162
- package/src/data-structures/heap/index.ts +0 -3
- package/src/data-structures/heap/max-heap.ts +0 -31
- package/src/data-structures/heap/min-heap.ts +0 -34
- package/src/data-structures/index.ts +0 -13
- package/src/data-structures/linked-list/doubly-linked-list.ts +0 -365
- package/src/data-structures/linked-list/index.ts +0 -2
- package/src/data-structures/linked-list/singly-linked-list.ts +0 -757
- package/src/data-structures/linked-list/skip-linked-list.ts +0 -1
- package/src/data-structures/matrix/index.ts +0 -4
- package/src/data-structures/matrix/matrix.ts +0 -27
- package/src/data-structures/matrix/matrix2d.ts +0 -208
- package/src/data-structures/matrix/navigator.ts +0 -122
- package/src/data-structures/matrix/vector2d.ts +0 -316
- package/src/data-structures/priority-queue/index.ts +0 -3
- package/src/data-structures/priority-queue/max-priority-queue.ts +0 -24
- package/src/data-structures/priority-queue/min-priority-queue.ts +0 -24
- package/src/data-structures/priority-queue/priority-queue.ts +0 -349
- package/src/data-structures/queue/deque.ts +0 -251
- package/src/data-structures/queue/index.ts +0 -2
- package/src/data-structures/queue/queue.ts +0 -120
- package/src/data-structures/stack/index.ts +0 -1
- package/src/data-structures/stack/stack.ts +0 -98
- package/src/data-structures/trie/index.ts +0 -1
- package/src/data-structures/trie/trie.ts +0 -225
- package/src/data-structures/types/abstract-graph.ts +0 -51
- package/src/data-structures/types/avl-tree.ts +0 -6
- package/src/data-structures/types/binary-tree.ts +0 -15
- package/src/data-structures/types/bst.ts +0 -5
- package/src/data-structures/types/directed-graph.ts +0 -18
- package/src/data-structures/types/doubly-linked-list.ts +0 -1
- package/src/data-structures/types/heap.ts +0 -8
- package/src/data-structures/types/index.ts +0 -13
- package/src/data-structures/types/navigator.ts +0 -13
- package/src/data-structures/types/priority-queue.ts +0 -9
- package/src/data-structures/types/segment-tree.ts +0 -1
- package/src/data-structures/types/singly-linked-list.ts +0 -1
- package/src/data-structures/types/tree-multiset.ts +0 -3
- package/src/index.ts +0 -1
- package/src/utils/index.ts +0 -2
- package/src/utils/types/index.ts +0 -1
- package/src/utils/types/utils.ts +0 -4
- package/src/utils/utils.ts +0 -78
- package/tests/unit/data-structures/graph/abstract-graph.ts +0 -0
- package/tests/unit/data-structures/graph/directed-graph.test.ts +0 -492
- package/tests/unit/data-structures/graph/index.ts +0 -3
- package/tests/unit/data-structures/graph/undirected-graph.ts +0 -0
|
@@ -0,0 +1,1105 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>SinglyLinkedList | data-structure-typed</title><meta name="description" content="Documentation for data-structure-typed"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
|
2
|
+
<div class="tsd-toolbar-contents container">
|
|
3
|
+
<div class="table-cell" id="tsd-search" data-base="..">
|
|
4
|
+
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
|
5
|
+
<div class="field">
|
|
6
|
+
<div id="tsd-toolbar-links"></div></div>
|
|
7
|
+
<ul class="results">
|
|
8
|
+
<li class="state loading">Preparing search index...</li>
|
|
9
|
+
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">data-structure-typed</a></div>
|
|
10
|
+
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
|
11
|
+
<div class="container container-main">
|
|
12
|
+
<div class="col-content">
|
|
13
|
+
<div class="tsd-page-title">
|
|
14
|
+
<ul class="tsd-breadcrumb">
|
|
15
|
+
<li><a href="../modules.html">data-structure-typed</a></li>
|
|
16
|
+
<li><a href="SinglyLinkedList.html">SinglyLinkedList</a></li></ul>
|
|
17
|
+
<h1>Class SinglyLinkedList<NodeVal></h1></div>
|
|
18
|
+
<section class="tsd-panel">
|
|
19
|
+
<h4>Type Parameters</h4>
|
|
20
|
+
<ul class="tsd-type-parameter-list">
|
|
21
|
+
<li>
|
|
22
|
+
<h4><span class="tsd-kind-type-parameter">NodeVal</span> = <span class="tsd-signature-type">any</span></h4></li></ul></section>
|
|
23
|
+
<section class="tsd-panel tsd-hierarchy">
|
|
24
|
+
<h4>Hierarchy</h4>
|
|
25
|
+
<ul class="tsd-hierarchy">
|
|
26
|
+
<li><span class="target">SinglyLinkedList</span></li></ul></section><aside class="tsd-sources">
|
|
27
|
+
<ul>
|
|
28
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/singly-linked-list.ts#L102">src/data-structures/linked-list/singly-linked-list.ts:102</a></li></ul></aside>
|
|
29
|
+
<section class="tsd-panel-group tsd-index-group">
|
|
30
|
+
<section class="tsd-panel tsd-index-panel">
|
|
31
|
+
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
|
|
32
|
+
<h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex=0><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></svg> Index</h5></summary>
|
|
33
|
+
<div class="tsd-accordion-details">
|
|
34
|
+
<section class="tsd-index-section">
|
|
35
|
+
<h3 class="tsd-index-heading">Constructors</h3>
|
|
36
|
+
<div class="tsd-index-list"><a href="SinglyLinkedList.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-512"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g></svg><span>constructor</span></a>
|
|
37
|
+
</div></section>
|
|
38
|
+
<section class="tsd-index-section">
|
|
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-protected"><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#_size" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_size</span></a>
|
|
42
|
+
<a href="SinglyLinkedList.html#_tail" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_tail</span></a>
|
|
43
|
+
</div></section>
|
|
44
|
+
<section class="tsd-index-section">
|
|
45
|
+
<h3 class="tsd-index-heading">Accessors</h3>
|
|
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#size" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>size</span></a>
|
|
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
|
+
</div></section>
|
|
50
|
+
<section class="tsd-index-section">
|
|
51
|
+
<h3 class="tsd-index-heading">Methods</h3>
|
|
52
|
+
<div class="tsd-index-list"><a href="SinglyLinkedList.html#_iterator_" 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>[iterator]</span></a>
|
|
53
|
+
<a href="SinglyLinkedList.html#append" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>append</span></a>
|
|
54
|
+
<a href="SinglyLinkedList.html#clear" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>clear</span></a>
|
|
55
|
+
<a href="SinglyLinkedList.html#filter" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>filter</span></a>
|
|
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
|
+
<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#findNodeIndex" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>find<wbr/>Node<wbr/>Index</span></a>
|
|
60
|
+
<a href="SinglyLinkedList.html#forEach" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>for<wbr/>Each</span></a>
|
|
61
|
+
<a href="SinglyLinkedList.html#get" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get</span></a>
|
|
62
|
+
<a href="SinglyLinkedList.html#getNode" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Node</span></a>
|
|
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
|
+
<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#map" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>map</span></a>
|
|
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>
|
|
68
|
+
<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
|
+
<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
|
+
<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
|
+
<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
|
+
<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#toString" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>to<wbr/>String</span></a>
|
|
81
|
+
<a href="SinglyLinkedList.html#from" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>from</span></a>
|
|
82
|
+
</div></section></div></details></section></section>
|
|
83
|
+
<section class="tsd-panel-group tsd-member-group">
|
|
84
|
+
<h2>Constructors</h2>
|
|
85
|
+
<section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a>
|
|
86
|
+
<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
|
+
<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">NodeVal</span><span class="tsd-signature-symbol">></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="#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
|
+
<li class="tsd-description">
|
|
90
|
+
<div class="tsd-comment tsd-typography"><p>The constructor initializes a linked list with the given arguments as nodes.</p>
|
|
91
|
+
</div>
|
|
92
|
+
<section class="tsd-panel">
|
|
93
|
+
<h4>Type Parameters</h4>
|
|
94
|
+
<ul class="tsd-type-parameter-list">
|
|
95
|
+
<li>
|
|
96
|
+
<h4><span class="tsd-kind-type-parameter">NodeVal</span> = <span class="tsd-signature-type">any</span></h4></li></ul></section>
|
|
97
|
+
<div class="tsd-parameters">
|
|
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>
|
|
107
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
108
|
+
<ul>
|
|
109
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/singly-linked-list.ts#L109">src/data-structures/linked-list/singly-linked-list.ts:109</a></li></ul></aside></li></ul></section></section>
|
|
110
|
+
<section class="tsd-panel-group tsd-member-group">
|
|
111
|
+
<h2>Properties</h2>
|
|
112
|
+
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_head" class="tsd-anchor"></a>
|
|
113
|
+
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</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>
|
|
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">NodeVal</span><span class="tsd-signature-symbol">></span></div><aside class="tsd-sources">
|
|
115
|
+
<ul>
|
|
116
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/singly-linked-list.ts#L119">src/data-structures/linked-list/singly-linked-list.ts:119</a></li></ul></aside></section>
|
|
117
|
+
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_size" class="tsd-anchor"></a>
|
|
118
|
+
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_size</span><a href="#_size" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
119
|
+
<div class="tsd-signature"><span class="tsd-kind-property">_size</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources">
|
|
120
|
+
<ul>
|
|
121
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/singly-linked-list.ts#L139">src/data-structures/linked-list/singly-linked-list.ts:139</a></li></ul></aside></section>
|
|
122
|
+
<section class="tsd-panel tsd-member tsd-is-protected"><a id="_tail" class="tsd-anchor"></a>
|
|
123
|
+
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</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>
|
|
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">NodeVal</span><span class="tsd-signature-symbol">></span></div><aside class="tsd-sources">
|
|
125
|
+
<ul>
|
|
126
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/singly-linked-list.ts#L129">src/data-structures/linked-list/singly-linked-list.ts:129</a></li></ul></aside></section></section>
|
|
127
|
+
<section class="tsd-panel-group tsd-member-group">
|
|
128
|
+
<h2>Accessors</h2>
|
|
129
|
+
<section class="tsd-panel tsd-member"><a id="head" class="tsd-anchor"></a>
|
|
130
|
+
<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
|
+
<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">NodeVal</span><span class="tsd-signature-symbol">></span></li>
|
|
133
|
+
<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">NodeVal</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources">
|
|
135
|
+
<ul>
|
|
136
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/singly-linked-list.ts#L121">src/data-structures/linked-list/singly-linked-list.ts:121</a></li></ul></aside></li>
|
|
137
|
+
<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
|
+
<li class="tsd-description">
|
|
139
|
+
<div class="tsd-parameters">
|
|
140
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
141
|
+
<ul class="tsd-parameter-list">
|
|
142
|
+
<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">NodeVal</span><span class="tsd-signature-symbol">></span></h5></li></ul></div>
|
|
144
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
145
|
+
<ul>
|
|
146
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/singly-linked-list.ts#L125">src/data-structures/linked-list/singly-linked-list.ts:125</a></li></ul></aside></li></ul></section>
|
|
147
|
+
<section class="tsd-panel tsd-member"><a id="size" class="tsd-anchor"></a>
|
|
148
|
+
<h3 class="tsd-anchor-link"><span>size</span><a href="#size" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
149
|
+
<ul class="tsd-signatures">
|
|
150
|
+
<li class="tsd-signature" id="size.size-1"><span class="tsd-signature-symbol">get</span> size<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
|
+
<li class="tsd-description">
|
|
152
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
|
|
153
|
+
<ul>
|
|
154
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/singly-linked-list.ts#L141">src/data-structures/linked-list/singly-linked-list.ts:141</a></li></ul></aside></li>
|
|
155
|
+
<li class="tsd-signature" id="size.size-2"><span class="tsd-signature-symbol">set</span> size<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
|
+
<li class="tsd-description">
|
|
157
|
+
<div class="tsd-parameters">
|
|
158
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
159
|
+
<ul class="tsd-parameter-list">
|
|
160
|
+
<li>
|
|
161
|
+
<h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div>
|
|
162
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
163
|
+
<ul>
|
|
164
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/singly-linked-list.ts#L145">src/data-structures/linked-list/singly-linked-list.ts:145</a></li></ul></aside></li></ul></section>
|
|
165
|
+
<section class="tsd-panel tsd-member"><a id="tail" class="tsd-anchor"></a>
|
|
166
|
+
<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
|
+
<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">NodeVal</span><span class="tsd-signature-symbol">></span></li>
|
|
169
|
+
<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">NodeVal</span><span class="tsd-signature-symbol">></span></h4><aside class="tsd-sources">
|
|
171
|
+
<ul>
|
|
172
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/singly-linked-list.ts#L131">src/data-structures/linked-list/singly-linked-list.ts:131</a></li></ul></aside></li>
|
|
173
|
+
<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
|
+
<li class="tsd-description">
|
|
175
|
+
<div class="tsd-parameters">
|
|
176
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
177
|
+
<ul class="tsd-parameter-list">
|
|
178
|
+
<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">NodeVal</span><span class="tsd-signature-symbol">></span></h5></li></ul></div>
|
|
180
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
|
|
181
|
+
<ul>
|
|
182
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/singly-linked-list.ts#L135">src/data-structures/linked-list/singly-linked-list.ts:135</a></li></ul></aside></li></ul></section></section>
|
|
183
|
+
<section class="tsd-panel-group tsd-member-group">
|
|
184
|
+
<h2>Methods</h2>
|
|
185
|
+
<section class="tsd-panel tsd-member"><a id="_iterator_" class="tsd-anchor"></a>
|
|
186
|
+
<h3 class="tsd-anchor-link"><span>[iterator]</span><a href="#_iterator_" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
187
|
+
<ul class="tsd-signatures">
|
|
188
|
+
<li class="tsd-signature tsd-anchor-link" id="_iterator_._iterator_-1"><span class="tsd-kind-call-signature">[iterator]</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type ">IterableIterator</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="#_iterator_._iterator_-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
189
|
+
<li class="tsd-description">
|
|
190
|
+
<div class="tsd-comment tsd-typography"><p>The function is an iterator that returns the values of each node in a linked list.</p>
|
|
191
|
+
</div>
|
|
192
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">IterableIterator</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>
|
|
193
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
194
|
+
<ul>
|
|
195
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/singly-linked-list.ts#L739">src/data-structures/linked-list/singly-linked-list.ts:739</a></li></ul></aside></li></ul></section>
|
|
196
|
+
<section class="tsd-panel tsd-member"><a id="append" class="tsd-anchor"></a>
|
|
197
|
+
<h3 class="tsd-anchor-link"><span>append</span><a href="#append" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
198
|
+
<ul class="tsd-signatures">
|
|
199
|
+
<li class="tsd-signature tsd-anchor-link" id="append.append-1"><span class="tsd-kind-call-signature">append</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="#append.append-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
200
|
+
<li class="tsd-description">
|
|
201
|
+
<div class="tsd-parameters">
|
|
202
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
203
|
+
<ul class="tsd-parameter-list">
|
|
204
|
+
<li>
|
|
205
|
+
<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></li></ul></div>
|
|
206
|
+
<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><aside class="tsd-sources">
|
|
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>
|
|
215
|
+
</div>
|
|
216
|
+
<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 "this" object is being returned.</p>
|
|
217
|
+
|
|
218
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
219
|
+
<ul>
|
|
220
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/singly-linked-list.ts#L546">src/data-structures/linked-list/singly-linked-list.ts:546</a></li></ul></aside></li></ul></section>
|
|
221
|
+
<section class="tsd-panel tsd-member"><a id="filter" class="tsd-anchor"></a>
|
|
222
|
+
<h3 class="tsd-anchor-link"><span>filter</span><a href="#filter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
223
|
+
<ul class="tsd-signatures">
|
|
224
|
+
<li class="tsd-signature tsd-anchor-link" id="filter.filter-1"><span class="tsd-kind-call-signature">filter</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">callbackFn</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><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="#filter.filter-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
225
|
+
<li class="tsd-description">
|
|
226
|
+
<div class="tsd-comment tsd-typography"><p>The <code>filter</code> function filters the elements of a singly linked list based on a given callback function.</p>
|
|
227
|
+
</div>
|
|
228
|
+
<div class="tsd-parameters">
|
|
229
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
230
|
+
<ul class="tsd-parameter-list">
|
|
231
|
+
<li>
|
|
232
|
+
<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">boolean</span><span class="tsd-signature-symbol">)</span></h5>
|
|
233
|
+
<div class="tsd-comment tsd-typography"><p>A callback function that takes three parameters: data, index, and list. It should return a
|
|
234
|
+
boolean value indicating whether the current element should be included in the filtered list or not.</p>
|
|
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>
|
|
257
|
+
</div>
|
|
258
|
+
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
259
|
+
<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>filter</code> method is returning a new <code>SinglyLinkedList</code> object.</p>
|
|
260
|
+
|
|
261
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
262
|
+
<ul>
|
|
263
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/singly-linked-list.ts#L654">src/data-structures/linked-list/singly-linked-list.ts:654</a></li></ul></aside></li></ul></section>
|
|
264
|
+
<section class="tsd-panel tsd-member"><a id="find" class="tsd-anchor"></a>
|
|
265
|
+
<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>
|
|
266
|
+
<ul class="tsd-signatures">
|
|
267
|
+
<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">callbackFn</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="#find.find-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
268
|
+
<li class="tsd-description">
|
|
269
|
+
<div class="tsd-comment tsd-typography"><p>The <code>find</code> function in TypeScript searches for a node in a singly linked list based on a given callback function and
|
|
270
|
+
returns the value of the found node.</p>
|
|
271
|
+
</div>
|
|
272
|
+
<div class="tsd-parameters">
|
|
273
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
274
|
+
<ul class="tsd-parameter-list">
|
|
275
|
+
<li>
|
|
276
|
+
<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">boolean</span><span class="tsd-signature-symbol">)</span></h5>
|
|
277
|
+
<div class="tsd-comment tsd-typography"><p>A callback function that takes three parameters: data, index, and list. It returns a boolean
|
|
278
|
+
value indicating whether the condition is met for a particular node in the linked list.</p>
|
|
279
|
+
</div>
|
|
280
|
+
<div class="tsd-comment tsd-typography"></div>
|
|
281
|
+
<ul class="tsd-parameters">
|
|
282
|
+
<li class="tsd-parameter-signature">
|
|
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>
|
|
298
|
+
|
|
299
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
300
|
+
<ul>
|
|
301
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/singly-linked-list.ts#L252">src/data-structures/linked-list/singly-linked-list.ts:252</a></li></ul></aside></li></ul></section>
|
|
302
|
+
<section class="tsd-panel tsd-member"><a id="findIndex" class="tsd-anchor"></a>
|
|
303
|
+
<h3 class="tsd-anchor-link"><span>find<wbr/>Index</span><a href="#findIndex" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
304
|
+
<ul class="tsd-signatures">
|
|
305
|
+
<li class="tsd-signature tsd-anchor-link" id="findIndex.findIndex-1"><span class="tsd-kind-call-signature">find<wbr/>Index</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">callbackFn</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#findIndex.findIndex-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
306
|
+
<li class="tsd-description">
|
|
307
|
+
<div class="tsd-comment tsd-typography"><p>The findIndex function returns the index of the first node in a singly linked list that satisfies a given condition,
|
|
308
|
+
or -1 if no such node is found.</p>
|
|
309
|
+
</div>
|
|
310
|
+
<div class="tsd-parameters">
|
|
311
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
312
|
+
<ul class="tsd-parameter-list">
|
|
313
|
+
<li>
|
|
314
|
+
<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">boolean</span><span class="tsd-signature-symbol">)</span></h5>
|
|
315
|
+
<div class="tsd-comment tsd-typography"><p>A callback function that takes three parameters: data, index, and list. It returns a boolean
|
|
316
|
+
value indicating whether the condition is met for a particular node in the singly linked list.</p>
|
|
317
|
+
</div>
|
|
318
|
+
<div class="tsd-comment tsd-typography"></div>
|
|
319
|
+
<ul class="tsd-parameters">
|
|
320
|
+
<li class="tsd-parameter-signature">
|
|
321
|
+
<ul class="tsd-signatures">
|
|
322
|
+
<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>
|
|
323
|
+
<li class="tsd-description">
|
|
324
|
+
<div class="tsd-parameters">
|
|
325
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
326
|
+
<ul class="tsd-parameter-list">
|
|
327
|
+
<li>
|
|
328
|
+
<h5><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span></h5></li>
|
|
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>
|
|
333
|
+
<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">number</span></h4><p>The method <code>findIndex</code> returns a number.</p>
|
|
335
|
+
|
|
336
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
337
|
+
<ul>
|
|
338
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/singly-linked-list.ts#L268">src/data-structures/linked-list/singly-linked-list.ts:268</a></li></ul></aside></li></ul></section>
|
|
339
|
+
<section class="tsd-panel tsd-member"><a id="findNode" class="tsd-anchor"></a>
|
|
340
|
+
<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
|
+
<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">callbackFn</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="#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
|
+
<li class="tsd-description">
|
|
344
|
+
<div class="tsd-comment tsd-typography"><p>The findNode function searches for a node in a singly linked list based on a given callback function.</p>
|
|
345
|
+
</div>
|
|
346
|
+
<div class="tsd-parameters">
|
|
347
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
348
|
+
<ul class="tsd-parameter-list">
|
|
349
|
+
<li>
|
|
350
|
+
<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">boolean</span><span class="tsd-signature-symbol">)</span></h5>
|
|
351
|
+
<div class="tsd-comment tsd-typography"><p>A callback function that takes three parameters: data, index, and list. It returns a boolean
|
|
352
|
+
value indicating whether the current node matches the desired criteria.</p>
|
|
353
|
+
</div>
|
|
354
|
+
<div class="tsd-comment tsd-typography"></div>
|
|
355
|
+
<ul class="tsd-parameters">
|
|
356
|
+
<li class="tsd-parameter-signature">
|
|
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>
|
|
372
|
+
|
|
373
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
374
|
+
<ul>
|
|
375
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/singly-linked-list.ts#L235">src/data-structures/linked-list/singly-linked-list.ts:235</a></li></ul></aside></li></ul></section>
|
|
376
|
+
<section class="tsd-panel tsd-member"><a id="findNodeIndex" class="tsd-anchor"></a>
|
|
377
|
+
<h3 class="tsd-anchor-link"><span>find<wbr/>Node<wbr/>Index</span><a href="#findNodeIndex" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
378
|
+
<ul class="tsd-signatures">
|
|
379
|
+
<li class="tsd-signature tsd-anchor-link" id="findNodeIndex.findNodeIndex-1"><span class="tsd-kind-call-signature">find<wbr/>Node<wbr/>Index</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">callbackFn</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-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><a href="#findNodeIndex.findNodeIndex-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
380
|
+
<li class="tsd-description">
|
|
381
|
+
<div class="tsd-comment tsd-typography"><p>The function <code>findNodeIndex</code> searches for a node in a singly linked list that satisfies a given condition and
|
|
382
|
+
returns its index and the node itself.</p>
|
|
383
|
+
</div>
|
|
384
|
+
<div class="tsd-parameters">
|
|
385
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
386
|
+
<ul class="tsd-parameter-list">
|
|
387
|
+
<li>
|
|
388
|
+
<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">boolean</span><span class="tsd-signature-symbol">)</span></h5>
|
|
389
|
+
<div class="tsd-comment tsd-typography"><p>The callbackFn parameter is a function that takes three arguments: data, index, and list. It is
|
|
390
|
+
used to determine whether a node in the singly linked list matches a certain condition. The function should return a
|
|
391
|
+
boolean value indicating whether the condition is met for the given node.</p>
|
|
392
|
+
</div>
|
|
393
|
+
<div class="tsd-comment tsd-typography"></div>
|
|
394
|
+
<ul class="tsd-parameters">
|
|
395
|
+
<li class="tsd-parameter-signature">
|
|
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>
|
|
413
|
+
|
|
414
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
415
|
+
<ul>
|
|
416
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/singly-linked-list.ts#L205">src/data-structures/linked-list/singly-linked-list.ts:205</a></li></ul></aside></li></ul></section>
|
|
417
|
+
<section class="tsd-panel tsd-member"><a id="forEach" class="tsd-anchor"></a>
|
|
418
|
+
<h3 class="tsd-anchor-link"><span>for<wbr/>Each</span><a href="#forEach" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
419
|
+
<ul class="tsd-signatures">
|
|
420
|
+
<li class="tsd-signature tsd-anchor-link" id="forEach.forEach-1"><span class="tsd-kind-call-signature">for<wbr/>Each</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">callbackFn</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">void</span><a href="#forEach.forEach-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
421
|
+
<li class="tsd-description">
|
|
422
|
+
<div class="tsd-comment tsd-typography"><p>The <code>forEach</code> function iterates over a singly linked list and applies a callback function to each node, either in
|
|
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">
|
|
458
|
+
<ul>
|
|
459
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/singly-linked-list.ts#L609">src/data-structures/linked-list/singly-linked-list.ts:609</a></li></ul></aside></li></ul></section>
|
|
460
|
+
<section class="tsd-panel tsd-member"><a id="get" class="tsd-anchor"></a>
|
|
461
|
+
<h3 class="tsd-anchor-link"><span>get</span><a href="#get" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
462
|
+
<ul class="tsd-signatures">
|
|
463
|
+
<li class="tsd-signature tsd-anchor-link" id="get.get-1"><span class="tsd-kind-call-signature">get</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><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><a href="#get.get-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
464
|
+
<li class="tsd-description">
|
|
465
|
+
<div class="tsd-comment tsd-typography"><p>The <code>get</code> function returns the value of a node at a given index in a data structure.</p>
|
|
466
|
+
</div>
|
|
467
|
+
<div class="tsd-parameters">
|
|
468
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
469
|
+
<ul class="tsd-parameter-list">
|
|
470
|
+
<li>
|
|
471
|
+
<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 in the data
|
|
473
|
+
structure.</p>
|
|
474
|
+
</div>
|
|
475
|
+
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
476
|
+
<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 is returning the value of the node at the specified index if the node exists, otherwise it
|
|
477
|
+
returns undefined.</p>
|
|
478
|
+
|
|
479
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
480
|
+
<ul>
|
|
481
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/singly-linked-list.ts#L166">src/data-structures/linked-list/singly-linked-list.ts:166</a></li></ul></aside></li></ul></section>
|
|
482
|
+
<section class="tsd-panel tsd-member"><a id="getNode" class="tsd-anchor"></a>
|
|
483
|
+
<h3 class="tsd-anchor-link"><span>get<wbr/>Node</span><a href="#getNode" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
484
|
+
<ul class="tsd-signatures">
|
|
485
|
+
<li class="tsd-signature tsd-anchor-link" id="getNode.getNode-1"><span class="tsd-kind-call-signature">get<wbr/>Node</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="#getNode.getNode-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
486
|
+
<li class="tsd-description">
|
|
487
|
+
<div class="tsd-comment tsd-typography"><p>The function <code>getNode</code> returns the node at a given index in a singly linked list.</p>
|
|
488
|
+
</div>
|
|
489
|
+
<div class="tsd-parameters">
|
|
490
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
491
|
+
<ul class="tsd-parameter-list">
|
|
492
|
+
<li>
|
|
493
|
+
<h5><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></h5>
|
|
494
|
+
<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
|
|
495
|
+
retrieve from the linked list.</p>
|
|
496
|
+
</div>
|
|
497
|
+
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
498
|
+
<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>a SinglyLinkedListNode<NodeVal> object or undefined.</p>
|
|
499
|
+
|
|
500
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
501
|
+
<ul>
|
|
502
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/singly-linked-list.ts#L177">src/data-structures/linked-list/singly-linked-list.ts:177</a></li></ul></aside></li></ul></section>
|
|
503
|
+
<section class="tsd-panel tsd-member"><a id="insertAfter" class="tsd-anchor"></a>
|
|
504
|
+
<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>
|
|
505
|
+
<ul class="tsd-signatures">
|
|
506
|
+
<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">referenceNode</span>, <span class="tsd-kind-parameter">val</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="#insertAfter.insertAfter-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
507
|
+
<li class="tsd-description">
|
|
508
|
+
<div class="tsd-comment tsd-typography"><p>The <code>insertAfter</code> function inserts a new node with a given value after a specified reference node in a singly linked
|
|
509
|
+
list.</p>
|
|
510
|
+
</div>
|
|
511
|
+
<div class="tsd-parameters">
|
|
512
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
513
|
+
<ul class="tsd-parameter-list">
|
|
514
|
+
<li>
|
|
515
|
+
<h5><span class="tsd-kind-parameter">referenceNode</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>
|
|
516
|
+
<div class="tsd-comment tsd-typography"><p>The referenceNode parameter is the node after which the new node will be inserted.</p>
|
|
517
|
+
</div>
|
|
518
|
+
<div class="tsd-comment tsd-typography"></div></li>
|
|
519
|
+
<li>
|
|
520
|
+
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span></h5>
|
|
521
|
+
<div class="tsd-comment tsd-typography"><p>The value of the new node that will be inserted after the reference node.</p>
|
|
522
|
+
</div>
|
|
523
|
+
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
524
|
+
<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>insertAfter</code> method is returning the updated <code>SinglyLinkedList</code> object.</p>
|
|
525
|
+
|
|
526
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
527
|
+
<ul>
|
|
528
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/singly-linked-list.ts#L490">src/data-structures/linked-list/singly-linked-list.ts:490</a></li></ul></aside></li></ul></section>
|
|
529
|
+
<section class="tsd-panel tsd-member"><a id="insertAt" class="tsd-anchor"></a>
|
|
530
|
+
<h3 class="tsd-anchor-link"><span>insert<wbr/>At</span><a href="#insertAt" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
531
|
+
<ul class="tsd-signatures">
|
|
532
|
+
<li class="tsd-signature tsd-anchor-link" id="insertAt.insertAt-1"><span class="tsd-kind-call-signature">insert<wbr/>At</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">index</span>, <span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><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="#insertAt.insertAt-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
533
|
+
<li class="tsd-description">
|
|
534
|
+
<div class="tsd-comment tsd-typography"><p>The <code>insertAt</code> function inserts a value at a specified index in a singly linked list.</p>
|
|
535
|
+
</div>
|
|
536
|
+
<div class="tsd-parameters">
|
|
537
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
538
|
+
<ul class="tsd-parameter-list">
|
|
539
|
+
<li>
|
|
540
|
+
<h5><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></h5>
|
|
541
|
+
<div class="tsd-comment tsd-typography"><p>The index parameter is a number that represents the position at which the new node should be
|
|
542
|
+
inserted in the linked list.</p>
|
|
543
|
+
</div>
|
|
544
|
+
<div class="tsd-comment tsd-typography"></div></li>
|
|
545
|
+
<li>
|
|
546
|
+
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span></h5>
|
|
547
|
+
<div class="tsd-comment tsd-typography"><p>The <code>val</code> parameter represents the value of the node that you want to insert into the linked
|
|
548
|
+
list.</p>
|
|
549
|
+
</div>
|
|
550
|
+
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
551
|
+
<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 method <code>insertAt</code> returns the updated <code>SinglyLinkedList</code> object.</p>
|
|
552
|
+
|
|
553
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
554
|
+
<ul>
|
|
555
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/singly-linked-list.ts#L334">src/data-structures/linked-list/singly-linked-list.ts:334</a></li></ul></aside></li></ul></section>
|
|
556
|
+
<section class="tsd-panel tsd-member"><a id="insertBefore" class="tsd-anchor"></a>
|
|
557
|
+
<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
|
+
<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">referenceNode</span>, <span class="tsd-kind-parameter">val</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="#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
|
+
<li class="tsd-description">
|
|
561
|
+
<div class="tsd-comment tsd-typography"><p>The <code>insertBefore</code> function inserts a new node with a given value before a specified reference node in a singly
|
|
562
|
+
linked list.</p>
|
|
563
|
+
</div>
|
|
564
|
+
<div class="tsd-parameters">
|
|
565
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
566
|
+
<ul class="tsd-parameter-list">
|
|
567
|
+
<li>
|
|
568
|
+
<h5><span class="tsd-kind-parameter">referenceNode</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>
|
|
569
|
+
<div class="tsd-comment tsd-typography"><p>The referenceNode parameter is the node in the linked list before which the new node will be
|
|
570
|
+
inserted.</p>
|
|
571
|
+
</div>
|
|
572
|
+
<div class="tsd-comment tsd-typography"></div></li>
|
|
573
|
+
<li>
|
|
574
|
+
<h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span></h5>
|
|
575
|
+
<div class="tsd-comment tsd-typography"><p>The value of the new node that will be inserted before the reference node.</p>
|
|
576
|
+
</div>
|
|
577
|
+
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
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">NodeVal</span><span class="tsd-signature-symbol">></span></h4><p>The method is returning the updated SinglyLinkedList object.</p>
|
|
579
|
+
|
|
580
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
581
|
+
<ul>
|
|
582
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/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>
|
|
583
|
+
<section class="tsd-panel tsd-member"><a id="map" class="tsd-anchor"></a>
|
|
584
|
+
<h3 class="tsd-anchor-link"><span>map</span><a href="#map" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
585
|
+
<ul class="tsd-signatures">
|
|
586
|
+
<li class="tsd-signature tsd-anchor-link" id="map.map-1"><span class="tsd-kind-call-signature">map</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">callbackFn</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><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="#map.map-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
587
|
+
<li class="tsd-description">
|
|
588
|
+
<div class="tsd-comment tsd-typography"><p>The map function takes a callback function and applies it to each element in the linked list, returning a new linked
|
|
589
|
+
list with the results.</p>
|
|
590
|
+
</div>
|
|
591
|
+
<div class="tsd-parameters">
|
|
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>
|
|
623
|
+
|
|
624
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
625
|
+
<ul>
|
|
626
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/singly-linked-list.ts#L635">src/data-structures/linked-list/singly-linked-list.ts:635</a></li></ul></aside></li></ul></section>
|
|
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>
|
|
647
|
+
<section class="tsd-panel tsd-member"><a id="pop" class="tsd-anchor"></a>
|
|
648
|
+
<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
|
+
<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">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</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
|
+
<li class="tsd-description">
|
|
652
|
+
<div class="tsd-comment tsd-typography"><p>The <code>pop()</code> function removes and returns the last element from a linked list.</p>
|
|
653
|
+
</div>
|
|
654
|
+
<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>pop()</code> method is returning a value of type <code>NodeVal</code> or <code>undefined</code>.</p>
|
|
655
|
+
|
|
656
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
657
|
+
<ul>
|
|
658
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/singly-linked-list.ts#L518">src/data-structures/linked-list/singly-linked-list.ts:518</a></li></ul></aside></li></ul></section>
|
|
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>
|
|
679
|
+
<section class="tsd-panel tsd-member"><a id="push" class="tsd-anchor"></a>
|
|
680
|
+
<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
|
+
<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-signature-symbol">...</span><span class="tsd-kind-parameter">args</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</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>
|
|
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>
|
|
802
|
+
<li class="tsd-description">
|
|
803
|
+
<div class="tsd-comment tsd-typography"><p>The removeNode function removes a node from a singly linked list and updates the head, tail, and size properties
|
|
804
|
+
accordingly.</p>
|
|
805
|
+
</div>
|
|
806
|
+
<div class="tsd-parameters">
|
|
807
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
808
|
+
<ul class="tsd-parameter-list">
|
|
809
|
+
<li>
|
|
810
|
+
<h5><span class="tsd-kind-parameter">node</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>
|
|
811
|
+
<div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is of type <code>SinglyLinkedListNode<NodeVal></code>, which represents a node in a singly
|
|
812
|
+
linked list.</p>
|
|
813
|
+
</div>
|
|
814
|
+
<div class="tsd-comment tsd-typography"></div></li></ul></div>
|
|
815
|
+
<h4 class="tsd-returns-title">Returns <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 removed node.</p>
|
|
816
|
+
|
|
817
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
818
|
+
<ul>
|
|
819
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/singly-linked-list.ts#L359">src/data-structures/linked-list/singly-linked-list.ts:359</a></li></ul></aside></li></ul></section>
|
|
820
|
+
<section class="tsd-panel tsd-member"><a id="reverse" class="tsd-anchor"></a>
|
|
821
|
+
<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
|
+
<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><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="#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
|
+
<li class="tsd-description">
|
|
825
|
+
<div class="tsd-comment tsd-typography"><p>The reverse() function reverses the order of nodes in a singly linked list.</p>
|
|
826
|
+
</div>
|
|
827
|
+
<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 reverse() method is returning the reversed SinglyLinkedList.</p>
|
|
828
|
+
|
|
829
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
830
|
+
<ul>
|
|
831
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/singly-linked-list.ts#L586">src/data-structures/linked-list/singly-linked-list.ts:586</a></li></ul></aside></li></ul></section>
|
|
832
|
+
<section class="tsd-panel tsd-member"><a id="shift" class="tsd-anchor"></a>
|
|
833
|
+
<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
|
+
<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">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</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>
|
|
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>
|
|
877
|
+
<li class="tsd-description">
|
|
878
|
+
<div class="tsd-comment tsd-typography"><p>The <code>sort</code> function uses the quicksort algorithm to sort the elements of a singly linked list based on a provided
|
|
879
|
+
comparison function.</p>
|
|
880
|
+
</div>
|
|
881
|
+
<div class="tsd-parameters">
|
|
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>
|
|
900
|
+
|
|
901
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
902
|
+
<ul>
|
|
903
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/singly-linked-list.ts#L431">src/data-structures/linked-list/singly-linked-list.ts:431</a></li></ul></aside></li></ul></section>
|
|
904
|
+
<section class="tsd-panel tsd-member"><a id="toArray" class="tsd-anchor"></a>
|
|
905
|
+
<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
|
+
<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">NodeVal</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
|
+
<li class="tsd-description">
|
|
909
|
+
<div class="tsd-comment tsd-typography"><p>The toArray() function converts a NodeVal object into an array of NodeVal objects.</p>
|
|
910
|
+
</div>
|
|
911
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">[]</span></h4><p>An array of NodeVal objects.</p>
|
|
912
|
+
|
|
913
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
914
|
+
<ul>
|
|
915
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/singly-linked-list.ts#L720">src/data-structures/linked-list/singly-linked-list.ts:720</a></li></ul></aside></li></ul></section>
|
|
916
|
+
<section class="tsd-panel tsd-member"><a id="toString" class="tsd-anchor"></a>
|
|
917
|
+
<h3 class="tsd-anchor-link"><span>to<wbr/>String</span><a href="#toString" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
918
|
+
<ul class="tsd-signatures">
|
|
919
|
+
<li class="tsd-signature tsd-anchor-link" id="toString.toString-1"><span class="tsd-kind-call-signature">to<wbr/>String</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">separator</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><a href="#toString.toString-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
920
|
+
<li class="tsd-description">
|
|
921
|
+
<div class="tsd-comment tsd-typography"><p>The <code>toString</code> function takes an optional separator and returns a string representation of an array, with each
|
|
922
|
+
element separated by the specified separator.</p>
|
|
923
|
+
</div>
|
|
924
|
+
<div class="tsd-parameters">
|
|
925
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
926
|
+
<ul class="tsd-parameter-list">
|
|
927
|
+
<li>
|
|
928
|
+
<h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">separator</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = ' '</span></h5></li></ul></div>
|
|
929
|
+
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><p>The toString method is being returned as a string.</p>
|
|
930
|
+
|
|
931
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
932
|
+
<ul>
|
|
933
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/singly-linked-list.ts#L732">src/data-structures/linked-list/singly-linked-list.ts:732</a></li></ul></aside></li></ul></section>
|
|
934
|
+
<section class="tsd-panel tsd-member"><a id="from" class="tsd-anchor"></a>
|
|
935
|
+
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>from</span><a href="#from" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
|
|
936
|
+
<ul class="tsd-signatures">
|
|
937
|
+
<li class="tsd-signature tsd-anchor-link" id="from.from-1"><span class="tsd-kind-call-signature">from</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">iterable</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="#from.from-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
|
|
938
|
+
<li class="tsd-description">
|
|
939
|
+
<div class="tsd-comment tsd-typography"><p>The <code>from</code> function in TypeScript creates a new SinglyLinkedList instance from an iterable object.</p>
|
|
940
|
+
</div>
|
|
941
|
+
<section class="tsd-panel">
|
|
942
|
+
<h4>Type Parameters</h4>
|
|
943
|
+
<ul class="tsd-type-parameter-list">
|
|
944
|
+
<li>
|
|
945
|
+
<h4><span class="tsd-kind-type-parameter">T</span></h4></li></ul></section>
|
|
946
|
+
<div class="tsd-parameters">
|
|
947
|
+
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
948
|
+
<ul class="tsd-parameter-list">
|
|
949
|
+
<li>
|
|
950
|
+
<h5><span class="tsd-kind-parameter">iterable</span>: <span class="tsd-signature-type ">Iterable</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">></span></h5>
|
|
951
|
+
<div class="tsd-comment tsd-typography"><p>The <code>iterable</code> parameter is an object that can be iterated over, such as an array or a string. It
|
|
952
|
+
contains a collection of elements of type <code>T</code>.</p>
|
|
953
|
+
</div>
|
|
954
|
+
<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 method is returning a new instance of the SinglyLinkedList class.</p>
|
|
956
|
+
|
|
957
|
+
<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
|
|
958
|
+
<ul>
|
|
959
|
+
<li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/linked-list/singly-linked-list.ts#L155">src/data-structures/linked-list/singly-linked-list.ts:155</a></li></ul></aside></li></ul></section></section></div>
|
|
960
|
+
<div class="col-sidebar">
|
|
961
|
+
<div class="page-menu">
|
|
962
|
+
<div class="tsd-navigation settings">
|
|
963
|
+
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
|
964
|
+
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)" id="icon-chevronDown"></path></svg>Settings</h3></summary>
|
|
965
|
+
<div class="tsd-accordion-details">
|
|
966
|
+
<div class="tsd-filter-visibility">
|
|
967
|
+
<h4 class="uppercase">Member Visibility</h4><form>
|
|
968
|
+
<ul id="tsd-filter-options">
|
|
969
|
+
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
|
|
970
|
+
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li>
|
|
971
|
+
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
|
972
|
+
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
|
973
|
+
<div class="tsd-theme-toggle">
|
|
974
|
+
<h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
|
|
975
|
+
<details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary">
|
|
976
|
+
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="#icon-chevronDown"></use></svg>On This Page</h3></summary>
|
|
977
|
+
<div class="tsd-accordion-details">
|
|
978
|
+
<ul>
|
|
979
|
+
<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-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_head</span></a></li>
|
|
981
|
+
<li><a href="#_size" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_size</span></a></li>
|
|
982
|
+
<li><a href="#_tail" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_tail</span></a></li>
|
|
983
|
+
<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="#size" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>size</span></a></li>
|
|
985
|
+
<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
|
+
<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="#filter" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>filter</span></a></li>
|
|
990
|
+
<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
|
+
<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="#findNodeIndex" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>find<wbr/>Node<wbr/>Index</span></a></li>
|
|
994
|
+
<li><a href="#forEach" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>for<wbr/>Each</span></a></li>
|
|
995
|
+
<li><a href="#get" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get</span></a></li>
|
|
996
|
+
<li><a href="#getNode" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Node</span></a></li>
|
|
997
|
+
<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
|
+
<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="#map" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>map</span></a></li>
|
|
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>
|
|
1002
|
+
<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
|
+
<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
|
+
<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
|
+
<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
|
+
<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="#toString" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>to<wbr/>String</span></a></li>
|
|
1015
|
+
<li><a href="#from" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>from</span></a></li></ul></div></details></div>
|
|
1016
|
+
<div class="site-menu">
|
|
1017
|
+
<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
|
+
<ul class="tsd-small-nested-navigation">
|
|
1019
|
+
<li><a href="../enums/CP.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-8"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)"></path></g></svg><span>CP</span></a></li>
|
|
1020
|
+
<li><a href="../enums/FamilyPosition.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-8"></use></svg><span>Family<wbr/>Position</span></a></li>
|
|
1021
|
+
<li><a href="../enums/LoopType.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-8"></use></svg><span>Loop<wbr/>Type</span></a></li>
|
|
1022
|
+
<li><a href="AVLTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-128"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g></svg><span>AVLTree</span></a></li>
|
|
1023
|
+
<li><a href="AVLTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>AVLTree<wbr/>Node</span></a></li>
|
|
1024
|
+
<li><a href="AaTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Aa<wbr/>Tree</span></a></li>
|
|
1025
|
+
<li><a href="AbstractEdge.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Abstract<wbr/>Edge</span></a></li>
|
|
1026
|
+
<li><a href="AbstractGraph.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Abstract<wbr/>Graph</span></a></li>
|
|
1027
|
+
<li><a href="AbstractVertex.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Abstract<wbr/>Vertex</span></a></li>
|
|
1028
|
+
<li><a href="ArrayDeque.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Array<wbr/>Deque</span></a></li>
|
|
1029
|
+
<li><a href="BST.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>BST</span></a></li>
|
|
1030
|
+
<li><a href="BSTNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>BSTNode</span></a></li>
|
|
1031
|
+
<li><a href="BTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>BTree</span></a></li>
|
|
1032
|
+
<li><a href="BinaryIndexedTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Binary<wbr/>Indexed<wbr/>Tree</span></a></li>
|
|
1033
|
+
<li><a href="BinaryTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Binary<wbr/>Tree</span></a></li>
|
|
1034
|
+
<li><a href="BinaryTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Binary<wbr/>Tree<wbr/>Node</span></a></li>
|
|
1035
|
+
<li><a href="Character.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Character</span></a></li>
|
|
1036
|
+
<li><a href="CoordinateMap.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Coordinate<wbr/>Map</span></a></li>
|
|
1037
|
+
<li><a href="CoordinateSet.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Coordinate<wbr/>Set</span></a></li>
|
|
1038
|
+
<li><a href="Deque.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Deque</span></a></li>
|
|
1039
|
+
<li><a href="DirectedEdge.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Directed<wbr/>Edge</span></a></li>
|
|
1040
|
+
<li><a href="DirectedGraph.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Directed<wbr/>Graph</span></a></li>
|
|
1041
|
+
<li><a href="DirectedVertex.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Directed<wbr/>Vertex</span></a></li>
|
|
1042
|
+
<li><a href="DoublyLinkedList.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Doubly<wbr/>Linked<wbr/>List</span></a></li>
|
|
1043
|
+
<li><a href="DoublyLinkedListNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Doubly<wbr/>Linked<wbr/>List<wbr/>Node</span></a></li>
|
|
1044
|
+
<li><a href="Heap.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Heap</span></a></li>
|
|
1045
|
+
<li><a href="HeapItem.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Heap<wbr/>Item</span></a></li>
|
|
1046
|
+
<li><a href="Matrix2D.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Matrix2D</span></a></li>
|
|
1047
|
+
<li><a href="MatrixNTI2D.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>MatrixNTI2D</span></a></li>
|
|
1048
|
+
<li><a href="MaxHeap.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Max<wbr/>Heap</span></a></li>
|
|
1049
|
+
<li><a href="MaxPriorityQueue.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Max<wbr/>Priority<wbr/>Queue</span></a></li>
|
|
1050
|
+
<li><a href="MinHeap.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Min<wbr/>Heap</span></a></li>
|
|
1051
|
+
<li><a href="MinPriorityQueue.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Min<wbr/>Priority<wbr/>Queue</span></a></li>
|
|
1052
|
+
<li><a href="Navigator.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Navigator</span></a></li>
|
|
1053
|
+
<li><a href="ObjectDeque.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Object<wbr/>Deque</span></a></li>
|
|
1054
|
+
<li><a href="PriorityQueue.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Priority<wbr/>Queue</span></a></li>
|
|
1055
|
+
<li><a href="Queue.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Queue</span></a></li>
|
|
1056
|
+
<li><a href="RBTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>RBTree</span></a></li>
|
|
1057
|
+
<li><a href="SegmentTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Segment<wbr/>Tree</span></a></li>
|
|
1058
|
+
<li><a href="SegmentTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Segment<wbr/>Tree<wbr/>Node</span></a></li>
|
|
1059
|
+
<li><a href="SinglyLinkedList.html" class="current"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Singly<wbr/>Linked<wbr/>List</span></a></li>
|
|
1060
|
+
<li><a href="SinglyLinkedListNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Singly<wbr/>Linked<wbr/>List<wbr/>Node</span></a></li>
|
|
1061
|
+
<li><a href="SplayTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Splay<wbr/>Tree</span></a></li>
|
|
1062
|
+
<li><a href="Stack.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Stack</span></a></li>
|
|
1063
|
+
<li><a href="TreeMultiSet.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Tree<wbr/>Multi<wbr/>Set</span></a></li>
|
|
1064
|
+
<li><a href="TreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Tree<wbr/>Node</span></a></li>
|
|
1065
|
+
<li><a href="Trie.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Trie</span></a></li>
|
|
1066
|
+
<li><a href="TrieNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Trie<wbr/>Node</span></a></li>
|
|
1067
|
+
<li><a href="TwoThreeTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Two<wbr/>Three<wbr/>Tree</span></a></li>
|
|
1068
|
+
<li><a href="UndirectedEdge.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Undirected<wbr/>Edge</span></a></li>
|
|
1069
|
+
<li><a href="UndirectedGraph.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Undirected<wbr/>Graph</span></a></li>
|
|
1070
|
+
<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
|
+
<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
|
+
<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
|
+
<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
|
+
<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
|
+
<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>
|
|
1077
|
+
<li><a href="../interfaces/NavigatorParams.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>Navigator<wbr/>Params</span></a></li>
|
|
1078
|
+
<li><a href="../interfaces/PriorityQueueOptions.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>Priority<wbr/>Queue<wbr/>Options</span></a></li>
|
|
1079
|
+
<li><a href="../types/BSTComparator.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-4194304"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)"></path></g></svg><span>BSTComparator</span></a></li>
|
|
1080
|
+
<li><a href="../types/BSTDeletedResult.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>BSTDeleted<wbr/>Result</span></a></li>
|
|
1081
|
+
<li><a href="../types/BinaryTreeDeleted.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Binary<wbr/>Tree<wbr/>Deleted</span></a></li>
|
|
1082
|
+
<li><a href="../types/BinaryTreeNodeId.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Binary<wbr/>Tree<wbr/>Node<wbr/>Id</span></a></li>
|
|
1083
|
+
<li><a href="../types/BinaryTreeNodePropertyName.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Binary<wbr/>Tree<wbr/>Node<wbr/>Property<wbr/>Name</span></a></li>
|
|
1084
|
+
<li><a href="../types/DFSOrderPattern.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>DFSOrder<wbr/>Pattern</span></a></li>
|
|
1085
|
+
<li><a href="../types/DijkstraResult.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Dijkstra<wbr/>Result</span></a></li>
|
|
1086
|
+
<li><a href="../types/Direction.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Direction</span></a></li>
|
|
1087
|
+
<li><a href="../types/DoublyLinkedListGetBy.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Doubly<wbr/>Linked<wbr/>List<wbr/>Get<wbr/>By</span></a></li>
|
|
1088
|
+
<li><a href="../types/NodeOrPropertyName.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Node<wbr/>Or<wbr/>Property<wbr/>Name</span></a></li>
|
|
1089
|
+
<li><a href="../types/PriorityQueueComparator.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Priority<wbr/>Queue<wbr/>Comparator</span></a></li>
|
|
1090
|
+
<li><a href="../types/PriorityQueueDFSOrderPattern.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Priority<wbr/>QueueDFSOrder<wbr/>Pattern</span></a></li>
|
|
1091
|
+
<li><a href="../types/ResultByProperty.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Result<wbr/>By<wbr/>Property</span></a></li>
|
|
1092
|
+
<li><a href="../types/ResultsByProperty.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Results<wbr/>By<wbr/>Property</span></a></li>
|
|
1093
|
+
<li><a href="../types/SegmentTreeNodeVal.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Segment<wbr/>Tree<wbr/>Node<wbr/>Val</span></a></li>
|
|
1094
|
+
<li><a href="../types/SpecifyOptional.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Specify<wbr/>Optional</span></a></li>
|
|
1095
|
+
<li><a href="../types/Thunk.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Thunk</span></a></li>
|
|
1096
|
+
<li><a href="../types/ToThunkFn.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>To<wbr/>Thunk<wbr/>Fn</span></a></li>
|
|
1097
|
+
<li><a href="../types/TopologicalStatus.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Topological<wbr/>Status</span></a></li>
|
|
1098
|
+
<li><a href="../types/TreeMultiSetDeletedResult.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Tree<wbr/>Multi<wbr/>Set<wbr/>Deleted<wbr/>Result</span></a></li>
|
|
1099
|
+
<li><a href="../types/TrlAsyncFn.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Trl<wbr/>Async<wbr/>Fn</span></a></li>
|
|
1100
|
+
<li><a href="../types/TrlFn.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Trl<wbr/>Fn</span></a></li>
|
|
1101
|
+
<li><a href="../types/Turning.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Turning</span></a></li>
|
|
1102
|
+
<li><a href="../types/VertexId.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Vertex<wbr/>Id</span></a></li></ul></nav></div></div></div>
|
|
1103
|
+
<div class="tsd-generator">
|
|
1104
|
+
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
|
1105
|
+
<div class="overlay"></div></body></html>
|