data-structure-typed 1.16.1 → 1.17.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/README.md +1 -1
  2. package/dist/data-structures/linked-list/doubly-linked-list.d.ts +178 -70
  3. package/dist/data-structures/linked-list/doubly-linked-list.js +475 -244
  4. package/dist/data-structures/linked-list/index.d.ts +1 -0
  5. package/dist/data-structures/linked-list/index.js +1 -0
  6. package/dist/data-structures/linked-list/singly-linked-list.d.ts +111 -248
  7. package/dist/data-structures/linked-list/singly-linked-list.js +338 -619
  8. package/dist/data-structures/linked-list/skip-linked-list.d.ts +2 -1
  9. package/dist/data-structures/linked-list/skip-linked-list.js +7 -0
  10. package/dist/data-structures/matrix/vector2d.js +2 -2
  11. package/dist/data-structures/types/binary-tree.d.ts +0 -5
  12. package/docs/assets/search.js +1 -1
  13. package/docs/classes/AVLTree.html +94 -94
  14. package/docs/classes/AVLTreeNode.html +37 -37
  15. package/docs/classes/AaTree.html +2 -2
  16. package/docs/classes/AbstractEdge.html +12 -12
  17. package/docs/classes/AbstractGraph.html +30 -30
  18. package/docs/classes/AbstractVertex.html +7 -7
  19. package/docs/classes/ArrayDeque.html +15 -15
  20. package/docs/classes/BST.html +87 -87
  21. package/docs/classes/BSTNode.html +37 -37
  22. package/docs/classes/BTree.html +2 -2
  23. package/docs/classes/BinaryIndexedTree.html +8 -8
  24. package/docs/classes/BinaryTree.html +83 -83
  25. package/docs/classes/BinaryTreeNode.html +37 -37
  26. package/docs/classes/Character.html +5 -5
  27. package/docs/classes/CoordinateMap.html +11 -11
  28. package/docs/classes/CoordinateSet.html +10 -10
  29. package/docs/classes/Deque.html +564 -356
  30. package/docs/classes/DirectedEdge.html +18 -18
  31. package/docs/classes/DirectedGraph.html +42 -42
  32. package/docs/classes/DirectedVertex.html +7 -7
  33. package/docs/classes/DoublyLinkedList.html +546 -313
  34. package/docs/classes/DoublyLinkedListNode.html +53 -36
  35. package/docs/classes/Heap.html +21 -21
  36. package/docs/classes/HeapItem.html +9 -9
  37. package/docs/classes/Matrix2D.html +17 -17
  38. package/docs/classes/MatrixNTI2D.html +5 -5
  39. package/docs/classes/MaxHeap.html +21 -21
  40. package/docs/classes/MaxPriorityQueue.html +35 -35
  41. package/docs/classes/MinHeap.html +21 -21
  42. package/docs/classes/MinPriorityQueue.html +35 -35
  43. package/docs/classes/Navigator.html +11 -11
  44. package/docs/classes/ObjectDeque.html +26 -26
  45. package/docs/classes/PriorityQueue.html +33 -33
  46. package/docs/classes/Queue.html +15 -15
  47. package/docs/classes/RBTree.html +2 -2
  48. package/docs/classes/SegmentTree.html +13 -13
  49. package/docs/classes/SegmentTreeNode.html +27 -27
  50. package/docs/classes/SinglyLinkedList.html +277 -606
  51. package/docs/classes/SinglyLinkedListNode.html +40 -167
  52. package/docs/classes/SkipLinkedList.html +150 -0
  53. package/docs/classes/SplayTree.html +2 -2
  54. package/docs/classes/Stack.html +13 -13
  55. package/docs/classes/TreeMultiSet.html +87 -87
  56. package/docs/classes/TreeNode.html +9 -9
  57. package/docs/classes/Trie.html +14 -14
  58. package/docs/classes/TrieNode.html +12 -12
  59. package/docs/classes/TwoThreeTree.html +2 -2
  60. package/docs/classes/UndirectedEdge.html +14 -14
  61. package/docs/classes/UndirectedGraph.html +36 -36
  62. package/docs/classes/UndirectedVertex.html +7 -7
  63. package/docs/classes/Vector2D.html +29 -29
  64. package/docs/enums/CP.html +5 -5
  65. package/docs/enums/FamilyPosition.html +5 -5
  66. package/docs/enums/LoopType.html +4 -4
  67. package/docs/index.html +3 -3
  68. package/docs/interfaces/AVLTreeDeleted.html +4 -4
  69. package/docs/interfaces/HeapOptions.html +3 -3
  70. package/docs/interfaces/IDirectedGraph.html +8 -8
  71. package/docs/interfaces/IGraph.html +20 -20
  72. package/docs/interfaces/NavigatorParams.html +6 -6
  73. package/docs/interfaces/PriorityQueueOptions.html +5 -5
  74. package/docs/modules.html +2 -2
  75. package/docs/types/BSTComparator.html +2 -2
  76. package/docs/types/BSTDeletedResult.html +2 -2
  77. package/docs/types/BinaryTreeDeleted.html +2 -2
  78. package/docs/types/BinaryTreeNodeId.html +2 -2
  79. package/docs/types/BinaryTreeNodePropertyName.html +2 -2
  80. package/docs/types/DFSOrderPattern.html +2 -2
  81. package/docs/types/DijkstraResult.html +2 -2
  82. package/docs/types/Direction.html +2 -2
  83. package/docs/types/DoublyLinkedListGetBy.html +2 -2
  84. package/docs/types/NodeOrPropertyName.html +2 -2
  85. package/docs/types/PriorityQueueComparator.html +2 -2
  86. package/docs/types/PriorityQueueDFSOrderPattern.html +2 -2
  87. package/docs/types/ResultByProperty.html +2 -2
  88. package/docs/types/ResultsByProperty.html +2 -2
  89. package/docs/types/SegmentTreeNodeVal.html +2 -2
  90. package/docs/types/SpecifyOptional.html +2 -2
  91. package/docs/types/Thunk.html +2 -2
  92. package/docs/types/ToThunkFn.html +2 -2
  93. package/docs/types/TopologicalStatus.html +2 -2
  94. package/docs/types/TreeMultiSetDeletedResult.html +2 -2
  95. package/docs/types/TrlAsyncFn.html +2 -2
  96. package/docs/types/TrlFn.html +2 -2
  97. package/docs/types/Turning.html +2 -2
  98. package/docs/types/VertexId.html +2 -2
  99. package/package.json +1 -3
  100. package/docs/interfaces/BinaryTreeNodeObj.html +0 -168
@@ -14,18 +14,18 @@
14
14
  <ul class="tsd-breadcrumb">
15
15
  <li><a href="../modules.html">data-structure-typed</a></li>
16
16
  <li><a href="SinglyLinkedList.html">SinglyLinkedList</a></li></ul>
17
- <h1>Class SinglyLinkedList&lt;NodeVal&gt;</h1></div>
17
+ <h1>Class SinglyLinkedList&lt;T&gt;</h1></div>
18
18
  <section class="tsd-panel">
19
19
  <h4>Type Parameters</h4>
20
20
  <ul class="tsd-type-parameter-list">
21
21
  <li>
22
- <h4><span class="tsd-kind-type-parameter">NodeVal</span> = <span class="tsd-signature-type">any</span></h4></li></ul></section>
22
+ <h4><span class="tsd-kind-type-parameter">T</span></h4></li></ul></section>
23
23
  <section class="tsd-panel tsd-hierarchy">
24
24
  <h4>Hierarchy</h4>
25
25
  <ul class="tsd-hierarchy">
26
26
  <li><span class="target">SinglyLinkedList</span></li></ul></section><aside class="tsd-sources">
27
27
  <ul>
28
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/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>
28
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/singly-linked-list.ts#L41">src/data-structures/linked-list/singly-linked-list.ts:41</a></li></ul></aside>
29
29
  <section class="tsd-panel-group tsd-index-group">
30
30
  <section class="tsd-panel tsd-index-panel">
31
31
  <details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
@@ -37,122 +37,104 @@
37
37
  </div></section>
38
38
  <section class="tsd-index-section">
39
39
  <h3 class="tsd-index-heading">Properties</h3>
40
- <div class="tsd-index-list"><a href="SinglyLinkedList.html#_head" class="tsd-index-link tsd-is-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>
40
+ <div class="tsd-index-list"><a href="SinglyLinkedList.html#_head" class="tsd-index-link tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-1024"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)"></path></g></svg><span>_head</span></a>
41
+ <a href="SinglyLinkedList.html#_length" class="tsd-index-link tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_length</span></a>
42
+ <a href="SinglyLinkedList.html#_tail" class="tsd-index-link tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_tail</span></a>
43
43
  </div></section>
44
44
  <section class="tsd-index-section">
45
45
  <h3 class="tsd-index-heading">Accessors</h3>
46
46
  <div class="tsd-index-list"><a href="SinglyLinkedList.html#head" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-262144"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)"></path></g></svg><span>head</span></a>
47
- <a href="SinglyLinkedList.html#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>
47
+ <a href="SinglyLinkedList.html#length" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>length</span></a>
48
48
  <a href="SinglyLinkedList.html#tail" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>tail</span></a>
49
49
  </div></section>
50
50
  <section class="tsd-index-section">
51
51
  <h3 class="tsd-index-heading">Methods</h3>
52
- <div class="tsd-index-list"><a href="SinglyLinkedList.html#_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>
52
+ <div class="tsd-index-list"><a href="SinglyLinkedList.html#clear" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-2048"><rect fill="var(--color-icon-background)" stroke="#FF4DB8" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)"></path></g></svg><span>clear</span></a>
53
+ <a href="SinglyLinkedList.html#countOccurrences" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>count<wbr/>Occurrences</span></a>
54
+ <a href="SinglyLinkedList.html#delete" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>delete</span></a>
55
+ <a href="SinglyLinkedList.html#deleteAt" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>delete<wbr/>At</span></a>
56
56
  <a href="SinglyLinkedList.html#find" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>find</span></a>
57
- <a href="SinglyLinkedList.html#findIndex" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>find<wbr/>Index</span></a>
58
57
  <a href="SinglyLinkedList.html#findNode" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>find<wbr/>Node</span></a>
59
- <a href="SinglyLinkedList.html#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>
58
+ <a href="SinglyLinkedList.html#getAt" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>At</span></a>
59
+ <a href="SinglyLinkedList.html#getLength" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Length</span></a>
60
+ <a href="SinglyLinkedList.html#getNodeAt" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Node<wbr/>At</span></a>
61
+ <a href="SinglyLinkedList.html#indexOf" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>index<wbr/>Of</span></a>
63
62
  <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
63
  <a href="SinglyLinkedList.html#insertAt" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>insert<wbr/>At</span></a>
65
64
  <a href="SinglyLinkedList.html#insertBefore" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>insert<wbr/>Before</span></a>
66
- <a href="SinglyLinkedList.html#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>
65
+ <a href="SinglyLinkedList.html#isEmpty" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>is<wbr/>Empty</span></a>
68
66
  <a href="SinglyLinkedList.html#pop" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>pop</span></a>
69
- <a href="SinglyLinkedList.html#prepend" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>prepend</span></a>
70
67
  <a href="SinglyLinkedList.html#push" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>push</span></a>
71
- <a href="SinglyLinkedList.html#reduce" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>reduce</span></a>
72
- <a href="SinglyLinkedList.html#removeAt" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>remove<wbr/>At</span></a>
73
- <a href="SinglyLinkedList.html#removeFromAnyEnd" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>remove<wbr/>From<wbr/>Any<wbr/>End</span></a>
74
- <a href="SinglyLinkedList.html#removeNode" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>remove<wbr/>Node</span></a>
75
68
  <a href="SinglyLinkedList.html#reverse" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>reverse</span></a>
76
69
  <a href="SinglyLinkedList.html#shift" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>shift</span></a>
77
- <a href="SinglyLinkedList.html#slice" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>slice</span></a>
78
- <a href="SinglyLinkedList.html#sort" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>sort</span></a>
79
70
  <a href="SinglyLinkedList.html#toArray" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>to<wbr/>Array</span></a>
80
- <a href="SinglyLinkedList.html#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>
71
+ <a href="SinglyLinkedList.html#unshift" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>unshift</span></a>
72
+ <a href="SinglyLinkedList.html#fromArray" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>from<wbr/>Array</span></a>
82
73
  </div></section></div></details></section></section>
83
74
  <section class="tsd-panel-group tsd-member-group">
84
75
  <h2>Constructors</h2>
85
76
  <section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a>
86
77
  <h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><g stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round" id="icon-anchor"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></g></svg></a></h3>
87
78
  <ul class="tsd-signatures">
88
- <li class="tsd-signature tsd-anchor-link" id="constructor.new_SinglyLinkedList"><span class="tsd-kind-constructor-signature">new <wbr/>Singly<wbr/>Linked<wbr/>List</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</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>
79
+ <li class="tsd-signature tsd-anchor-link" id="constructor.new_SinglyLinkedList"><span class="tsd-kind-constructor-signature">new <wbr/>Singly<wbr/>Linked<wbr/>List</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span><a href="#constructor.new_SinglyLinkedList" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
89
80
  <li class="tsd-description">
90
- <div class="tsd-comment tsd-typography"><p>The constructor initializes a linked list with the given arguments as nodes.</p>
81
+ <div class="tsd-comment tsd-typography"><p>The constructor initializes the linked list with an empty head, tail, and length.</p>
91
82
  </div>
92
83
  <section class="tsd-panel">
93
84
  <h4>Type Parameters</h4>
94
85
  <ul class="tsd-type-parameter-list">
95
86
  <li>
96
- <h4><span class="tsd-kind-type-parameter">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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</span></h4>
87
+ <h4><span class="tsd-kind-type-parameter">T</span></h4></li></ul></section>
88
+ <h4 class="tsd-returns-title">Returns <a href="SinglyLinkedList.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedList</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span></h4>
107
89
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
108
90
  <ul>
109
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/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>
91
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/singly-linked-list.ts#L46">src/data-structures/linked-list/singly-linked-list.ts:46</a></li></ul></aside></li></ul></section></section>
110
92
  <section class="tsd-panel-group tsd-member-group">
111
93
  <h2>Properties</h2>
112
- <section class="tsd-panel tsd-member tsd-is-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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources">
94
+ <section class="tsd-panel tsd-member tsd-is-private"><a id="_head" class="tsd-anchor"></a>
95
+ <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>_head</span><a href="#_head" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
96
+ <div class="tsd-signature"><span class="tsd-kind-property">_head</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources">
115
97
  <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">
98
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/singly-linked-list.ts#L52">src/data-structures/linked-list/singly-linked-list.ts:52</a></li></ul></aside></section>
99
+ <section class="tsd-panel tsd-member tsd-is-private"><a id="_length" class="tsd-anchor"></a>
100
+ <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>_length</span><a href="#_length" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
101
+ <div class="tsd-signature"><span class="tsd-kind-property">_length</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources">
120
102
  <ul>
121
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources">
103
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/singly-linked-list.ts#L72">src/data-structures/linked-list/singly-linked-list.ts:72</a></li></ul></aside></section>
104
+ <section class="tsd-panel tsd-member tsd-is-private"><a id="_tail" class="tsd-anchor"></a>
105
+ <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagPrivate">Private</code> <span>_tail</span><a href="#_tail" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
106
+ <div class="tsd-signature"><span class="tsd-kind-property">_tail</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources">
125
107
  <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>
108
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/singly-linked-list.ts#L62">src/data-structures/linked-list/singly-linked-list.ts:62</a></li></ul></aside></section></section>
127
109
  <section class="tsd-panel-group tsd-member-group">
128
110
  <h2>Accessors</h2>
129
111
  <section class="tsd-panel tsd-member"><a id="head" class="tsd-anchor"></a>
130
112
  <h3 class="tsd-anchor-link"><span>head</span><a href="#head" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
131
113
  <ul class="tsd-signatures">
132
- <li class="tsd-signature" id="head.head-1"><span class="tsd-signature-symbol">get</span> head<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</span></li>
114
+ <li class="tsd-signature" id="head.head-1"><span class="tsd-signature-symbol">get</span> head<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span></li>
133
115
  <li class="tsd-description">
134
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources">
116
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources">
135
117
  <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>
118
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/singly-linked-list.ts#L54">src/data-structures/linked-list/singly-linked-list.ts:54</a></li></ul></aside></li>
137
119
  <li class="tsd-signature" id="head.head-2"><span class="tsd-signature-symbol">set</span> head<span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
138
120
  <li class="tsd-description">
139
121
  <div class="tsd-parameters">
140
122
  <h4 class="tsd-parameters-title">Parameters</h4>
141
123
  <ul class="tsd-parameter-list">
142
124
  <li>
143
- <h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</span></h5></li></ul></div>
125
+ <h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span></h5></li></ul></div>
144
126
  <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
145
127
  <ul>
146
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/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>
128
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/singly-linked-list.ts#L58">src/data-structures/linked-list/singly-linked-list.ts:58</a></li></ul></aside></li></ul></section>
129
+ <section class="tsd-panel tsd-member"><a id="length" class="tsd-anchor"></a>
130
+ <h3 class="tsd-anchor-link"><span>length</span><a href="#length" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
149
131
  <ul class="tsd-signatures">
150
- <li class="tsd-signature" id="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>
132
+ <li class="tsd-signature" id="length.length-1"><span class="tsd-signature-symbol">get</span> length<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
151
133
  <li class="tsd-description">
152
134
  <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
153
135
  <ul>
154
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/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>
136
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/singly-linked-list.ts#L74">src/data-structures/linked-list/singly-linked-list.ts:74</a></li></ul></aside></li>
137
+ <li class="tsd-signature" id="length.length-2"><span class="tsd-signature-symbol">set</span> length<span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
156
138
  <li class="tsd-description">
157
139
  <div class="tsd-parameters">
158
140
  <h4 class="tsd-parameters-title">Parameters</h4>
@@ -161,330 +143,212 @@ arguments of type NodeVal.</p>
161
143
  <h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div>
162
144
  <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
163
145
  <ul>
164
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/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>
146
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/singly-linked-list.ts#L78">src/data-structures/linked-list/singly-linked-list.ts:78</a></li></ul></aside></li></ul></section>
165
147
  <section class="tsd-panel tsd-member"><a id="tail" class="tsd-anchor"></a>
166
148
  <h3 class="tsd-anchor-link"><span>tail</span><a href="#tail" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
167
149
  <ul class="tsd-signatures">
168
- <li class="tsd-signature" id="tail.tail-1"><span class="tsd-signature-symbol">get</span> tail<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</span></li>
150
+ <li class="tsd-signature" id="tail.tail-1"><span class="tsd-signature-symbol">get</span> tail<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span></li>
169
151
  <li class="tsd-description">
170
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources">
152
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources">
171
153
  <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>
154
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/singly-linked-list.ts#L64">src/data-structures/linked-list/singly-linked-list.ts:64</a></li></ul></aside></li>
173
155
  <li class="tsd-signature" id="tail.tail-2"><span class="tsd-signature-symbol">set</span> tail<span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
174
156
  <li class="tsd-description">
175
157
  <div class="tsd-parameters">
176
158
  <h4 class="tsd-parameters-title">Parameters</h4>
177
159
  <ul class="tsd-parameter-list">
178
160
  <li>
179
- <h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</span></h5></li></ul></div>
161
+ <h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span></h5></li></ul></div>
180
162
  <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
181
163
  <ul>
182
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/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>
164
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/singly-linked-list.ts#L68">src/data-structures/linked-list/singly-linked-list.ts:68</a></li></ul></aside></li></ul></section></section>
183
165
  <section class="tsd-panel-group tsd-member-group">
184
166
  <h2>Methods</h2>
185
- <section class="tsd-panel tsd-member"><a id="_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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</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
167
  <section class="tsd-panel tsd-member"><a id="clear" class="tsd-anchor"></a>
210
168
  <h3 class="tsd-anchor-link"><span>clear</span><a href="#clear" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
211
169
  <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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</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>
170
+ <li class="tsd-signature tsd-anchor-link" id="clear.clear-1"><span class="tsd-kind-call-signature">clear</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#clear.clear-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
213
171
  <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>
172
+ <div class="tsd-comment tsd-typography"><p>The <code>clear</code> function resets the linked list by setting the head, tail, and length to null and 0 respectively.</p>
215
173
  </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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</span></h4><p>The &quot;this&quot; object is being returned.</p>
217
-
174
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
218
175
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
219
176
  <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>
177
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/singly-linked-list.ts#L304">src/data-structures/linked-list/singly-linked-list.ts:304</a></li></ul></aside></li></ul></section>
178
+ <section class="tsd-panel tsd-member"><a id="countOccurrences" class="tsd-anchor"></a>
179
+ <h3 class="tsd-anchor-link"><span>count<wbr/>Occurrences</span><a href="#countOccurrences" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
223
180
  <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">&lt;</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">&gt;</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>
181
+ <li class="tsd-signature tsd-anchor-link" id="countOccurrences.countOccurrences-1"><span class="tsd-kind-call-signature">count<wbr/>Occurrences</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#countOccurrences.countOccurrences-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
225
182
  <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>
183
+ <div class="tsd-comment tsd-typography"><p>The function counts the number of occurrences of a given value in a linked list.</p>
227
184
  </div>
228
185
  <div class="tsd-parameters">
229
186
  <h4 class="tsd-parameters-title">Parameters</h4>
230
187
  <ul class="tsd-parameter-list">
231
188
  <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"> =&gt; </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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</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>
189
+ <h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
190
+ <div class="tsd-comment tsd-typography"><p>The value parameter is the value that you want to count the occurrences of in the linked list.</p>
257
191
  </div>
258
192
  <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">&lt;</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">&gt;</span></h4><p>The <code>filter</code> method is returning a new <code>SinglyLinkedList</code> object.</p>
193
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>The count of occurrences of the given value in the linked list.</p>
260
194
 
261
195
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
262
196
  <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>
197
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/singly-linked-list.ts#L481">src/data-structures/linked-list/singly-linked-list.ts:481</a></li></ul></aside></li></ul></section>
198
+ <section class="tsd-panel tsd-member"><a id="delete" class="tsd-anchor"></a>
199
+ <h3 class="tsd-anchor-link"><span>delete</span><a href="#delete" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
266
200
  <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>
201
+ <li class="tsd-signature tsd-anchor-link" id="delete.delete-1"><span class="tsd-kind-call-signature">delete</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">valueOrNode</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#delete.delete-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
268
202
  <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>
203
+ <div class="tsd-comment tsd-typography"><p>The delete function removes a node with a specific value from a singly linked list.</p>
271
204
  </div>
272
205
  <div class="tsd-parameters">
273
206
  <h4 class="tsd-parameters-title">Parameters</h4>
274
207
  <ul class="tsd-parameter-list">
275
208
  <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"> =&gt; </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>
209
+ <h5><span class="tsd-kind-parameter">valueOrNode</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
210
+ <div class="tsd-comment tsd-typography"><p>The <code>valueOrNode</code> parameter can accept either a value of type <code>T</code>
211
+ or a <code>SinglyLinkedListNode&lt;T&gt;</code> object.</p>
279
212
  </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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</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>
213
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
214
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The <code>delete</code> method returns a boolean value. It returns <code>true</code> if the value or node is found and
215
+ successfully deleted from the linked list, and <code>false</code> if the value or node is not found in the linked list.</p>
298
216
 
299
217
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
300
218
  <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>
219
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/singly-linked-list.ts#L223">src/data-structures/linked-list/singly-linked-list.ts:223</a></li></ul></aside></li>
220
+ <li class="tsd-signature tsd-anchor-link" id="delete.delete-2"><span class="tsd-kind-call-signature">delete</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">valueOrNode</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#delete.delete-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
306
221
  <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>
222
+ <div class="tsd-comment tsd-typography"><p>The delete function removes a node with a specific value from a singly linked list.</p>
309
223
  </div>
310
224
  <div class="tsd-parameters">
311
225
  <h4 class="tsd-parameters-title">Parameters</h4>
312
226
  <ul class="tsd-parameter-list">
313
227
  <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"> =&gt; </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>
228
+ <h5><span class="tsd-kind-parameter">valueOrNode</span>: <a href="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span></h5>
229
+ <div class="tsd-comment tsd-typography"><p>The <code>valueOrNode</code> parameter can accept either a value of type <code>T</code>
230
+ or a <code>SinglyLinkedListNode&lt;T&gt;</code> object.</p>
317
231
  </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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</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>
232
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
233
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The <code>delete</code> method returns a boolean value. It returns <code>true</code> if the value or node is found and
234
+ successfully deleted from the linked list, and <code>false</code> if the value or node is not found in the linked list.</p>
335
235
 
336
236
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
337
237
  <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>
238
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/singly-linked-list.ts#L224">src/data-structures/linked-list/singly-linked-list.ts:224</a></li></ul></aside></li></ul></section>
239
+ <section class="tsd-panel tsd-member"><a id="deleteAt" class="tsd-anchor"></a>
240
+ <h3 class="tsd-anchor-link"><span>delete<wbr/>At</span><a href="#deleteAt" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
341
241
  <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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</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>
242
+ <li class="tsd-signature tsd-anchor-link" id="deleteAt.deleteAt-1"><span class="tsd-kind-call-signature">delete<wbr/>At</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">index</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><a href="#deleteAt.deleteAt-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
343
243
  <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>
244
+ <div class="tsd-comment tsd-typography"><p>The <code>deleteAt</code> function removes an element at a specified index from a linked list and returns the removed element.</p>
345
245
  </div>
346
246
  <div class="tsd-parameters">
347
247
  <h4 class="tsd-parameters-title">Parameters</h4>
348
248
  <ul class="tsd-parameter-list">
349
249
  <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"> =&gt; </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>
250
+ <h5><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></h5>
251
+ <div class="tsd-comment tsd-typography"><p>The index parameter represents the position of the element that needs to be deleted in the
252
+ data structure. It is of type number.</p>
353
253
  </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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</span></h4><p>The function <code>findNode</code> returns a <code>SinglyLinkedListNode&lt;NodeVal&gt;</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>
254
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
255
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span></h4><p>The method <code>deleteAt</code> returns the value of the node that was deleted, or <code>null</code> if the index is out of
256
+ bounds.</p>
372
257
 
373
258
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
374
259
  <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>
260
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/singly-linked-list.ts#L211">src/data-structures/linked-list/singly-linked-list.ts:211</a></li></ul></aside></li></ul></section>
261
+ <section class="tsd-panel tsd-member"><a id="find" class="tsd-anchor"></a>
262
+ <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>
378
263
  <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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</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>
264
+ <li class="tsd-signature tsd-anchor-link" id="find.find-1"><span class="tsd-kind-call-signature">find</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">callback</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><a href="#find.find-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
380
265
  <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>
266
+ <div class="tsd-comment tsd-typography"><p>The <code>find</code> function iterates through a linked list and returns the first element that satisfies a given condition.</p>
383
267
  </div>
384
268
  <div class="tsd-parameters">
385
269
  <h4 class="tsd-parameters-title">Parameters</h4>
386
270
  <ul class="tsd-parameter-list">
387
271
  <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"> =&gt; </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>
272
+ <h5><span class="tsd-kind-parameter">callback</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span></h5>
273
+ <div class="tsd-comment tsd-typography"><p>A function that takes a value of type T as its parameter and returns a boolean value. This
274
+ function is used to determine whether a particular value in the linked list satisfies a certain condition.</p>
392
275
  </div>
393
276
  <div class="tsd-comment tsd-typography"></div>
394
277
  <ul class="tsd-parameters">
395
278
  <li class="tsd-parameter-signature">
396
279
  <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>
280
+ <li class="tsd-signature"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
398
281
  <li class="tsd-description">
399
282
  <div class="tsd-parameters">
400
283
  <h4 class="tsd-parameters-title">Parameters</h4>
401
284
  <ul class="tsd-parameter-list">
402
285
  <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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</span></h5></li></ul></div>
286
+ <h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5></li></ul></div>
408
287
  <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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</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>
288
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span></h4><p>The method <code>find</code> returns the first element in the linked list that satisfies the condition specified by
289
+ the callback function. If no element satisfies the condition, it returns <code>null</code>.</p>
413
290
 
414
291
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
415
292
  <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>
293
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/singly-linked-list.ts#L352">src/data-structures/linked-list/singly-linked-list.ts:352</a></li></ul></aside></li></ul></section>
294
+ <section class="tsd-panel tsd-member"><a id="findNode" class="tsd-anchor"></a>
295
+ <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>
419
296
  <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>
297
+ <li class="tsd-signature tsd-anchor-link" id="findNode.findNode-1"><span class="tsd-kind-call-signature">find<wbr/>Node</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</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>
421
298
  <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>
299
+ <div class="tsd-comment tsd-typography"><p>The function finds a node in a singly linked list by its value and returns the node if found, otherwise returns
300
+ null.</p>
424
301
  </div>
425
302
  <div class="tsd-parameters">
426
303
  <h4 class="tsd-parameters-title">Parameters</h4>
427
304
  <ul class="tsd-parameter-list">
428
305
  <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"> =&gt; </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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</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>
306
+ <h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
307
+ <div class="tsd-comment tsd-typography"><p>The value parameter is the value that we want to search for in the linked list.</p>
454
308
  </div>
455
309
  <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>
310
+ <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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span></h4><p>a <code>SinglyLinkedListNode&lt;T&gt;</code> if a node with the specified value is found in the linked list. If no node with
311
+ the specified value is found, the function returns <code>null</code>.</p>
312
+
457
313
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
458
314
  <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>
315
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/singly-linked-list.ts#L391">src/data-structures/linked-list/singly-linked-list.ts:391</a></li></ul></aside></li></ul></section>
316
+ <section class="tsd-panel tsd-member"><a id="getAt" class="tsd-anchor"></a>
317
+ <h3 class="tsd-anchor-link"><span>get<wbr/>At</span><a href="#getAt" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
462
318
  <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>
319
+ <li class="tsd-signature tsd-anchor-link" id="getAt.getAt-1"><span class="tsd-kind-call-signature">get<wbr/>At</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">index</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><a href="#getAt.getAt-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
464
320
  <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>
321
+ <div class="tsd-comment tsd-typography"><p>The function <code>getAt</code> returns the value at a specified index in a linked list, or null if the index is out of range.</p>
466
322
  </div>
467
323
  <div class="tsd-parameters">
468
324
  <h4 class="tsd-parameters-title">Parameters</h4>
469
325
  <ul class="tsd-parameter-list">
470
326
  <li>
471
327
  <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>
328
+ <div class="tsd-comment tsd-typography"><p>The index parameter is a number that represents the position of the element we want to
329
+ retrieve from the list.</p>
474
330
  </div>
475
331
  <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>
332
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span></h4><p>The method <code>getAt(index: number): T | null</code> returns the value at the specified index in the linked list, or
333
+ <code>null</code> if the index is out of bounds.</p>
478
334
 
479
335
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
480
336
  <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>
337
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/singly-linked-list.ts#L180">src/data-structures/linked-list/singly-linked-list.ts:180</a></li></ul></aside></li></ul></section>
338
+ <section class="tsd-panel tsd-member"><a id="getLength" class="tsd-anchor"></a>
339
+ <h3 class="tsd-anchor-link"><span>get<wbr/>Length</span><a href="#getLength" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
340
+ <ul class="tsd-signatures">
341
+ <li class="tsd-signature tsd-anchor-link" id="getLength.getLength-1"><span class="tsd-kind-call-signature">get<wbr/>Length</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#getLength.getLength-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
342
+ <li class="tsd-description">
343
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
344
+ <ul>
345
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/singly-linked-list.ts#L96">src/data-structures/linked-list/singly-linked-list.ts:96</a></li></ul></aside></li></ul></section>
346
+ <section class="tsd-panel tsd-member"><a id="getNodeAt" class="tsd-anchor"></a>
347
+ <h3 class="tsd-anchor-link"><span>get<wbr/>Node<wbr/>At</span><a href="#getNodeAt" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
484
348
  <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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</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>
349
+ <li class="tsd-signature tsd-anchor-link" id="getNodeAt.getNodeAt-1"><span class="tsd-kind-call-signature">get<wbr/>Node<wbr/>At</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">index</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span><a href="#getNodeAt.getNodeAt-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
486
350
  <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>
351
+ <div class="tsd-comment tsd-typography"><p>The function <code>getNodeAt</code> returns the node at a given index in a singly linked list.</p>
488
352
  </div>
489
353
  <div class="tsd-parameters">
490
354
  <h4 class="tsd-parameters-title">Parameters</h4>
@@ -492,451 +356,268 @@ returns undefined.</p>
492
356
  <li>
493
357
  <h5><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></h5>
494
358
  <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>
359
+ retrieve from the linked list. It indicates the zero-based index of the node we want to access.</p>
496
360
  </div>
497
361
  <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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</span></h4><p>a SinglyLinkedListNode<NodeVal> object or undefined.</p>
362
+ <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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span></h4><p>The method <code>getNodeAt(index: number)</code> returns a <code>SinglyLinkedListNode&lt;T&gt;</code> object if the node at the
363
+ specified index exists, or <code>null</code> if the index is out of bounds.</p>
499
364
 
500
365
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
501
366
  <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>
367
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/singly-linked-list.ts#L196">src/data-structures/linked-list/singly-linked-list.ts:196</a></li></ul></aside></li></ul></section>
368
+ <section class="tsd-panel tsd-member"><a id="indexOf" class="tsd-anchor"></a>
369
+ <h3 class="tsd-anchor-link"><span>index<wbr/>Of</span><a href="#indexOf" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
505
370
  <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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</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>
371
+ <li class="tsd-signature tsd-anchor-link" id="indexOf.indexOf-1"><span class="tsd-kind-call-signature">index<wbr/>Of</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#indexOf.indexOf-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
507
372
  <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>
373
+ <div class="tsd-comment tsd-typography"><p>The <code>indexOf</code> function returns the index of the first occurrence of a given value in a linked list.</p>
510
374
  </div>
511
375
  <div class="tsd-parameters">
512
376
  <h4 class="tsd-parameters-title">Parameters</h4>
513
377
  <ul class="tsd-parameter-list">
514
378
  <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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</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>
379
+ <h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
380
+ <div class="tsd-comment tsd-typography"><p>The value parameter is the value that you want to find the index of in the linked list.</p>
522
381
  </div>
523
382
  <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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</span></h4><p>The <code>insertAfter</code> method is returning the updated <code>SinglyLinkedList</code> object.</p>
383
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>The method is returning the index of the first occurrence of the specified value in the linked list. If the
384
+ value is not found, it returns -1.</p>
525
385
 
526
386
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
527
387
  <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>
388
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/singly-linked-list.ts#L369">src/data-structures/linked-list/singly-linked-list.ts:369</a></li></ul></aside></li></ul></section>
389
+ <section class="tsd-panel tsd-member"><a id="insertAfter" class="tsd-anchor"></a>
390
+ <h3 class="tsd-anchor-link"><span>insert<wbr/>After</span><a href="#insertAfter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
531
391
  <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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</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>
392
+ <li class="tsd-signature tsd-anchor-link" id="insertAfter.insertAfter-1"><span class="tsd-kind-call-signature">insert<wbr/>After</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">existingValueOrNode</span>, <span class="tsd-kind-parameter">newValue</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#insertAfter.insertAfter-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
533
393
  <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>
394
+ <div class="tsd-comment tsd-typography"><p>The <code>insertAfter</code> function inserts a new node with a given value after an existing node in a singly linked list.</p>
535
395
  </div>
536
396
  <div class="tsd-parameters">
537
397
  <h4 class="tsd-parameters-title">Parameters</h4>
538
398
  <ul class="tsd-parameter-list">
539
399
  <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>
400
+ <h5><span class="tsd-kind-parameter">existingValueOrNode</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
401
+ <div class="tsd-comment tsd-typography"><p>The existing value or node in the linked list after which
402
+ the new value will be inserted. It can be either the value of the existing node or the existing node itself.</p>
543
403
  </div>
544
404
  <div class="tsd-comment tsd-typography"></div></li>
545
405
  <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>
406
+ <h5><span class="tsd-kind-parameter">newValue</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
407
+ <div class="tsd-comment tsd-typography"><p>The value that you want to insert into the linked list after the existing value or node.</p>
549
408
  </div>
550
409
  <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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</span></h4><p>The method <code>insertAt</code> returns the updated <code>SinglyLinkedList</code> object.</p>
410
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The method returns a boolean value. It returns true if the new value was successfully inserted after the
411
+ existing value or node, and false if the existing value or node was not found in the linked list.</p>
552
412
 
553
413
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
554
414
  <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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</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>
415
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/singly-linked-list.ts#L443">src/data-structures/linked-list/singly-linked-list.ts:443</a></li></ul></aside></li>
416
+ <li class="tsd-signature tsd-anchor-link" id="insertAfter.insertAfter-2"><span class="tsd-kind-call-signature">insert<wbr/>After</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">existingValueOrNode</span>, <span class="tsd-kind-parameter">newValue</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#insertAfter.insertAfter-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
560
417
  <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>
418
+ <div class="tsd-comment tsd-typography"><p>The <code>insertAfter</code> function inserts a new node with a given value after an existing node in a singly linked list.</p>
563
419
  </div>
564
420
  <div class="tsd-parameters">
565
421
  <h4 class="tsd-parameters-title">Parameters</h4>
566
422
  <ul class="tsd-parameter-list">
567
423
  <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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</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>
424
+ <h5><span class="tsd-kind-parameter">existingValueOrNode</span>: <a href="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span></h5>
425
+ <div class="tsd-comment tsd-typography"><p>The existing value or node in the linked list after which
426
+ the new value will be inserted. It can be either the value of the existing node or the existing node itself.</p>
571
427
  </div>
572
428
  <div class="tsd-comment tsd-typography"></div></li>
573
429
  <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>
430
+ <h5><span class="tsd-kind-parameter">newValue</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
431
+ <div class="tsd-comment tsd-typography"><p>The value that you want to insert into the linked list after the existing value or node.</p>
576
432
  </div>
577
433
  <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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</span></h4><p>The method is returning the updated SinglyLinkedList object.</p>
434
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The method returns a boolean value. It returns true if the new value was successfully inserted after the
435
+ existing value or node, and false if the existing value or node was not found in the linked list.</p>
579
436
 
580
437
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
581
438
  <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>
439
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/singly-linked-list.ts#L444">src/data-structures/linked-list/singly-linked-list.ts:444</a></li></ul></aside></li></ul></section>
440
+ <section class="tsd-panel tsd-member"><a id="insertAt" class="tsd-anchor"></a>
441
+ <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>
585
442
  <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">&lt;</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">&gt;</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>
443
+ <li class="tsd-signature tsd-anchor-link" id="insertAt.insertAt-1"><span class="tsd-kind-call-signature">insert<wbr/>At</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">index</span>, <span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#insertAt.insertAt-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
587
444
  <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"> =&gt; </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>
445
+ <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>
598
446
  </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
447
  <div class="tsd-parameters">
606
448
  <h4 class="tsd-parameters-title">Parameters</h4>
607
449
  <ul class="tsd-parameter-list">
608
450
  <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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</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">&lt;</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">&gt;</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>
451
+ <h5><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></h5>
452
+ <div class="tsd-comment tsd-typography"><p>The index parameter represents the position at which the new value should be inserted in the
453
+ linked list. It is of type number.</p>
634
454
  </div>
635
- <div class="tsd-parameters">
636
- <h4 class="tsd-parameters-title">Parameters</h4>
637
- <ul class="tsd-parameter-list">
455
+ <div class="tsd-comment tsd-typography"></div></li>
638
456
  <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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</span></h5>
640
- <div class="tsd-comment tsd-typography"><p>The parameter &quot;list&quot; is a SinglyLinkedList object that contains nodes with data of type NodeVal.</p>
457
+ <h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
458
+ <div class="tsd-comment tsd-typography"><p>The <code>val</code> parameter represents the value that you want to insert into the linked list at the
459
+ specified index.</p>
641
460
  </div>
642
461
  <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>
462
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The <code>insert</code> method returns a boolean value. It returns <code>true</code> if the insertion is successful, and <code>false</code>
463
+ if the index is out of bounds.</p>
655
464
 
656
465
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
657
466
  <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>
467
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/singly-linked-list.ts#L273">src/data-structures/linked-list/singly-linked-list.ts:273</a></li></ul></aside></li></ul></section>
468
+ <section class="tsd-panel tsd-member"><a id="insertBefore" class="tsd-anchor"></a>
469
+ <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>
661
470
  <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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</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>
471
+ <li class="tsd-signature tsd-anchor-link" id="insertBefore.insertBefore-1"><span class="tsd-kind-call-signature">insert<wbr/>Before</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">existingValue</span>, <span class="tsd-kind-parameter">newValue</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#insertBefore.insertBefore-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
663
472
  <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>
473
+ <div class="tsd-comment tsd-typography"><p>The <code>insertBefore</code> function inserts a new value before an existing value in a singly linked list.</p>
665
474
  </div>
666
475
  <div class="tsd-parameters">
667
476
  <h4 class="tsd-parameters-title">Parameters</h4>
668
477
  <ul class="tsd-parameter-list">
669
478
  <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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</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">
479
+ <h5><span class="tsd-kind-parameter">existingValue</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5></li>
690
480
  <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>
481
+ <h5><span class="tsd-kind-parameter">newValue</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
482
+ <div class="tsd-comment tsd-typography"><p>The <code>newValue</code> parameter represents the value that you want to insert into the linked list.</p>
694
483
  </div>
695
484
  <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>
485
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The method <code>insertBefore</code> returns a boolean value. It returns <code>true</code> if the new value was successfully
486
+ inserted before the existing value, and <code>false</code> otherwise.</p>
697
487
 
698
488
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
699
489
  <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>
490
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/singly-linked-list.ts#L404">src/data-structures/linked-list/singly-linked-list.ts:404</a></li></ul></aside></li>
491
+ <li class="tsd-signature tsd-anchor-link" id="insertBefore.insertBefore-2"><span class="tsd-kind-call-signature">insert<wbr/>Before</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">existingValue</span>, <span class="tsd-kind-parameter">newValue</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#insertBefore.insertBefore-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
705
492
  <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>
493
+ <div class="tsd-comment tsd-typography"><p>The <code>insertBefore</code> function inserts a new value before an existing value in a singly linked list.</p>
708
494
  </div>
709
495
  <div class="tsd-parameters">
710
496
  <h4 class="tsd-parameters-title">Parameters</h4>
711
497
  <ul class="tsd-parameter-list">
712
498
  <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"> =&gt; </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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</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>
499
+ <h5><span class="tsd-kind-parameter">existingValue</span>: <a href="SinglyLinkedListNode.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedListNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span></h5></li>
742
500
  <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>
501
+ <h5><span class="tsd-kind-parameter">newValue</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
502
+ <div class="tsd-comment tsd-typography"><p>The <code>newValue</code> parameter represents the value that you want to insert into the linked list.</p>
747
503
  </div>
748
504
  <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>
505
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The method <code>insertBefore</code> returns a boolean value. It returns <code>true</code> if the new value was successfully
506
+ inserted before the existing value, and <code>false</code> otherwise.</p>
751
507
 
752
508
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
753
509
  <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>
510
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/singly-linked-list.ts#L405">src/data-structures/linked-list/singly-linked-list.ts:405</a></li></ul></aside></li></ul></section>
511
+ <section class="tsd-panel tsd-member"><a id="isEmpty" class="tsd-anchor"></a>
512
+ <h3 class="tsd-anchor-link"><span>is<wbr/>Empty</span><a href="#isEmpty" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
757
513
  <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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</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>
514
+ <li class="tsd-signature tsd-anchor-link" id="isEmpty.isEmpty-1"><span class="tsd-kind-call-signature">is<wbr/>Empty</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#isEmpty.isEmpty-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
759
515
  <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>
516
+ <div class="tsd-comment tsd-typography"><p>The function checks if the length of a data structure is equal to zero and returns a boolean value indicating
517
+ whether it is empty or not.</p>
761
518
  </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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</span></h4><p>The method <code>removeAt</code> returns a <code>SinglyLinkedListNode&lt;NodeVal&gt;</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>
519
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>A boolean value indicating whether the length of the object is equal to 0.</p>
773
520
 
774
521
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
775
522
  <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>
523
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/singly-linked-list.ts#L297">src/data-structures/linked-list/singly-linked-list.ts:297</a></li></ul></aside></li></ul></section>
524
+ <section class="tsd-panel tsd-member"><a id="pop" class="tsd-anchor"></a>
525
+ <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>
526
+ <ul class="tsd-signatures">
527
+ <li class="tsd-signature tsd-anchor-link" id="pop.pop-1"><span class="tsd-kind-call-signature">pop</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><a href="#pop.pop-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
781
528
  <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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</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>
529
+ <div class="tsd-comment tsd-typography"><p>The <code>pop()</code> function removes and returns the value of the last element in a linked list, updating the head and tail
530
+ pointers accordingly.</p>
791
531
  </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>
532
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span></h4><p>The method <code>pop()</code> returns the value of the node that is being removed from the end of the linked list. If
533
+ the linked list is empty, it returns <code>null</code>.</p>
794
534
 
795
535
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
796
536
  <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>
537
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/singly-linked-list.ts#L123">src/data-structures/linked-list/singly-linked-list.ts:123</a></li></ul></aside></li></ul></section>
538
+ <section class="tsd-panel tsd-member"><a id="push" class="tsd-anchor"></a>
539
+ <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>
800
540
  <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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</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>
541
+ <li class="tsd-signature tsd-anchor-link" id="push.push-1"><span class="tsd-kind-call-signature">push</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#push.push-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
802
542
  <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>
543
+ <div class="tsd-comment tsd-typography"><p>The <code>push</code> function adds a new node with the given data to the end of a singly linked list.</p>
805
544
  </div>
806
545
  <div class="tsd-parameters">
807
546
  <h4 class="tsd-parameters-title">Parameters</h4>
808
547
  <ul class="tsd-parameter-list">
809
548
  <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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</span></h5>
811
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is of type <code>SinglyLinkedListNode&lt;NodeVal&gt;</code>, which represents a node in a singly
812
- linked list.</p>
549
+ <h5><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
550
+ <div class="tsd-comment tsd-typography"><p>The &quot;data&quot; parameter represents the value that you want to add to the linked list. It can be of
551
+ any type (T) as specified in the generic type declaration of the class or function.</p>
813
552
  </div>
814
553
  <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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</span></h4><p>the removed node.</p>
816
-
554
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
817
555
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
818
556
  <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>
557
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/singly-linked-list.ts#L105">src/data-structures/linked-list/singly-linked-list.ts:105</a></li></ul></aside></li></ul></section>
820
558
  <section class="tsd-panel tsd-member"><a id="reverse" class="tsd-anchor"></a>
821
559
  <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
560
  <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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</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>
561
+ <li class="tsd-signature tsd-anchor-link" id="reverse.reverse-1"><span class="tsd-kind-call-signature">reverse</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#reverse.reverse-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
824
562
  <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>
563
+ <div class="tsd-comment tsd-typography"><p>The <code>reverse</code> function reverses the order of the nodes in a singly linked list.</p>
826
564
  </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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</span></h4><p>The reverse() method is returning the reversed SinglyLinkedList.</p>
565
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><p>The reverse() method does not return anything. It has a return type of void.</p>
828
566
 
829
567
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
830
568
  <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>
569
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/singly-linked-list.ts#L328">src/data-structures/linked-list/singly-linked-list.ts:328</a></li></ul></aside></li></ul></section>
832
570
  <section class="tsd-panel tsd-member"><a id="shift" class="tsd-anchor"></a>
833
571
  <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
572
  <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">&lt;</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">&gt;</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">&lt;</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">&gt;</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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</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>
573
+ <li class="tsd-signature tsd-anchor-link" id="shift.shift-1"><span class="tsd-kind-call-signature">shift</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><a href="#shift.shift-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
877
574
  <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>
575
+ <div class="tsd-comment tsd-typography"><p>The <code>shift()</code> function removes and returns the value of the first node in a linked list.</p>
880
576
  </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"> =&gt; </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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">NodeVal</span><span class="tsd-signature-symbol">&gt;</span></h4><p>The <code>sort</code> method is returning the sorted <code>SinglyLinkedList</code> object.</p>
577
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span></h4><p>The value of the node that is being removed from the beginning of the linked list.</p>
900
578
 
901
579
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
902
580
  <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>
581
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/singly-linked-list.ts#L148">src/data-structures/linked-list/singly-linked-list.ts:148</a></li></ul></aside></li></ul></section>
904
582
  <section class="tsd-panel tsd-member"><a id="toArray" class="tsd-anchor"></a>
905
583
  <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
584
  <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>
585
+ <li class="tsd-signature tsd-anchor-link" id="toArray.toArray-1"><span class="tsd-kind-call-signature">to<wbr/>Array</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">[]</span><a href="#toArray.toArray-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
908
586
  <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>
587
+ <div class="tsd-comment tsd-typography"><p>The <code>toArray</code> function converts a linked list into an array.</p>
910
588
  </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>
589
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">[]</span></h4><p>The <code>toArray()</code> method is returning an array of type <code>T[]</code>.</p>
912
590
 
913
591
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
914
592
  <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>
593
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/singly-linked-list.ts#L314">src/data-structures/linked-list/singly-linked-list.ts:314</a></li></ul></aside></li></ul></section>
594
+ <section class="tsd-panel tsd-member"><a id="unshift" class="tsd-anchor"></a>
595
+ <h3 class="tsd-anchor-link"><span>unshift</span><a href="#unshift" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
918
596
  <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>
597
+ <li class="tsd-signature tsd-anchor-link" id="unshift.unshift-1"><span class="tsd-kind-call-signature">unshift</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">val</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#unshift.unshift-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
920
598
  <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>
599
+ <div class="tsd-comment tsd-typography"><p>The unshift function adds a new node with the given value to the beginning of a singly linked list.</p>
923
600
  </div>
924
601
  <div class="tsd-parameters">
925
602
  <h4 class="tsd-parameters-title">Parameters</h4>
926
603
  <ul class="tsd-parameter-list">
927
604
  <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"> = &#39; &#39;</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
-
605
+ <h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
606
+ <div class="tsd-comment tsd-typography"><p>The parameter &quot;val&quot; represents the value of the new node that will be added to the beginning of the
607
+ linked list.</p>
608
+ </div>
609
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
610
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
931
611
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
932
612
  <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>
613
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/singly-linked-list.ts#L161">src/data-structures/linked-list/singly-linked-list.ts:161</a></li></ul></aside></li></ul></section>
614
+ <section class="tsd-panel tsd-member"><a id="fromArray" class="tsd-anchor"></a>
615
+ <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>from<wbr/>Array</span><a href="#fromArray" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
936
616
  <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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</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>
617
+ <li class="tsd-signature tsd-anchor-link" id="fromArray.fromArray-1"><span class="tsd-kind-call-signature">from<wbr/>Array</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="SinglyLinkedList.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedList</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span><a href="#fromArray.fromArray-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
938
618
  <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>
619
+ <div class="tsd-comment tsd-typography"><p>The <code>fromArray</code> function creates a new SinglyLinkedList instance and populates it with the elements from the given
620
+ array.</p>
940
621
  </div>
941
622
  <section class="tsd-panel">
942
623
  <h4>Type Parameters</h4>
@@ -947,16 +628,15 @@ element separated by the specified separator.</p>
947
628
  <h4 class="tsd-parameters-title">Parameters</h4>
948
629
  <ul class="tsd-parameter-list">
949
630
  <li>
950
- <h5><span class="tsd-kind-parameter">iterable</span>: <span class="tsd-signature-type ">Iterable</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</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>
631
+ <h5><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">[]</span></h5>
632
+ <div class="tsd-comment tsd-typography"><p>The <code>data</code> parameter is an array of elements of type <code>T</code>.</p>
953
633
  </div>
954
634
  <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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span></h4><p>The method is returning a new instance of the SinglyLinkedList class.</p>
635
+ <h4 class="tsd-returns-title">Returns <a href="SinglyLinkedList.html" class="tsd-signature-type tsd-kind-class">SinglyLinkedList</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">&gt;</span></h4><p>The <code>fromArray</code> function returns a <code>SinglyLinkedList</code> object.</p>
956
636
 
957
637
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
958
638
  <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>
639
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/4813c6d/src/data-structures/linked-list/singly-linked-list.ts#L88">src/data-structures/linked-list/singly-linked-list.ts:88</a></li></ul></aside></li></ul></section></section></div>
960
640
  <div class="col-sidebar">
961
641
  <div class="page-menu">
962
642
  <div class="tsd-navigation settings">
@@ -977,42 +657,33 @@ contains a collection of elements of type <code>T</code>.</p>
977
657
  <div class="tsd-accordion-details">
978
658
  <ul>
979
659
  <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>
660
+ <li><a href="#_head" class="tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_head</span></a></li>
661
+ <li><a href="#_length" class="tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_length</span></a></li>
662
+ <li><a href="#_tail" class="tsd-is-private"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_tail</span></a></li>
983
663
  <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>
664
+ <li><a href="#length" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>length</span></a></li>
985
665
  <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
666
  <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>
667
+ <li><a href="#countOccurrences" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>count<wbr/>Occurrences</span></a></li>
668
+ <li><a href="#delete" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>delete</span></a></li>
669
+ <li><a href="#deleteAt" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>delete<wbr/>At</span></a></li>
990
670
  <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
671
  <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>
672
+ <li><a href="#getAt" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>At</span></a></li>
673
+ <li><a href="#getLength" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Length</span></a></li>
674
+ <li><a href="#getNodeAt" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Node<wbr/>At</span></a></li>
675
+ <li><a href="#indexOf" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>index<wbr/>Of</span></a></li>
997
676
  <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
677
  <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
678
  <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>
679
+ <li><a href="#isEmpty" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>is<wbr/>Empty</span></a></li>
1002
680
  <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
681
  <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
682
  <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
683
  <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
684
  <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>
685
+ <li><a href="#unshift" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>unshift</span></a></li>
686
+ <li><a href="#fromArray" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>from<wbr/>Array</span></a></li></ul></div></details></div>
1016
687
  <div class="site-menu">
1017
688
  <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
689
  <ul class="tsd-small-nested-navigation">
@@ -1058,6 +729,7 @@ contains a collection of elements of type <code>T</code>.</p>
1058
729
  <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
730
  <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
731
  <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>
732
+ <li><a href="SkipLinkedList.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Skip<wbr/>Linked<wbr/>List</span></a></li>
1061
733
  <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
734
  <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
735
  <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>
@@ -1070,7 +742,6 @@ contains a collection of elements of type <code>T</code>.</p>
1070
742
  <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
743
  <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
744
  <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
745
  <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
746
  <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
747
  <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>