data-structure-typed 1.15.1 → 1.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (224) hide show
  1. package/README.md +398 -27
  2. package/dist/data-structures/binary-tree/binary-tree.d.ts +30 -30
  3. package/dist/data-structures/binary-tree/binary-tree.js +55 -55
  4. package/dist/data-structures/binary-tree/segment-tree.d.ts +17 -17
  5. package/dist/data-structures/binary-tree/segment-tree.js +30 -30
  6. package/dist/data-structures/graph/abstract-graph.d.ts +6 -6
  7. package/dist/data-structures/graph/abstract-graph.js +6 -6
  8. package/dist/data-structures/graph/directed-graph.d.ts +4 -4
  9. package/dist/data-structures/graph/directed-graph.js +6 -6
  10. package/dist/data-structures/graph/undirected-graph.d.ts +3 -3
  11. package/dist/data-structures/hash/coordinate-map.d.ts +2 -2
  12. package/dist/data-structures/hash/coordinate-set.d.ts +2 -2
  13. package/dist/data-structures/heap/heap.d.ts +40 -25
  14. package/dist/data-structures/heap/heap.js +72 -27
  15. package/dist/data-structures/heap/max-heap.d.ts +3 -3
  16. package/dist/data-structures/heap/min-heap.d.ts +3 -3
  17. package/dist/data-structures/index.d.ts +1 -0
  18. package/dist/data-structures/index.js +1 -0
  19. package/dist/data-structures/linked-list/doubly-linked-list.d.ts +9 -9
  20. package/dist/data-structures/linked-list/doubly-linked-list.js +12 -12
  21. package/dist/data-structures/linked-list/singly-linked-list.d.ts +7 -7
  22. package/dist/data-structures/priority-queue/max-priority-queue.d.ts +4 -5
  23. package/dist/data-structures/priority-queue/max-priority-queue.js +30 -6
  24. package/dist/data-structures/priority-queue/min-priority-queue.d.ts +4 -5
  25. package/dist/data-structures/priority-queue/min-priority-queue.js +31 -6
  26. package/dist/data-structures/priority-queue/priority-queue.d.ts +20 -9
  27. package/dist/data-structures/priority-queue/priority-queue.js +34 -28
  28. package/dist/data-structures/queue/deque.d.ts +1 -1
  29. package/dist/data-structures/tree/index.d.ts +1 -0
  30. package/dist/data-structures/tree/index.js +17 -0
  31. package/dist/data-structures/tree/tree.d.ts +9 -0
  32. package/dist/data-structures/tree/tree.js +52 -0
  33. package/dist/data-structures/types/heap.d.ts +0 -4
  34. package/dist/utils/types/utils.d.ts +1 -3
  35. package/dist/utils/types/utils.js +0 -14
  36. package/dist/utils/utils.js +0 -197
  37. package/docs/.nojekyll +1 -0
  38. package/docs/assets/highlight.css +92 -0
  39. package/docs/assets/main.js +58 -0
  40. package/docs/assets/search.js +1 -0
  41. package/docs/assets/style.css +1367 -0
  42. package/docs/classes/AVLTree.html +2192 -0
  43. package/docs/classes/AVLTreeNode.html +574 -0
  44. package/docs/classes/AaTree.html +150 -0
  45. package/docs/classes/AbstractEdge.html +269 -0
  46. package/docs/classes/AbstractGraph.html +927 -0
  47. package/docs/classes/AbstractVertex.html +215 -0
  48. package/docs/classes/ArrayDeque.html +417 -0
  49. package/docs/classes/BST.html +2038 -0
  50. package/docs/classes/BSTNode.html +570 -0
  51. package/docs/classes/BTree.html +150 -0
  52. package/docs/classes/BinaryIndexedTree.html +289 -0
  53. package/docs/classes/BinaryTree.html +1827 -0
  54. package/docs/classes/BinaryTreeNode.html +533 -0
  55. package/docs/classes/Character.html +198 -0
  56. package/docs/classes/CoordinateMap.html +469 -0
  57. package/docs/classes/CoordinateSet.html +430 -0
  58. package/docs/classes/Deque.html +767 -0
  59. package/docs/classes/DirectedEdge.html +354 -0
  60. package/docs/classes/DirectedGraph.html +1243 -0
  61. package/docs/classes/DirectedVertex.html +226 -0
  62. package/docs/classes/DoublyLinkedList.html +733 -0
  63. package/docs/classes/DoublyLinkedListNode.html +258 -0
  64. package/docs/classes/Heap.html +482 -0
  65. package/docs/classes/HeapItem.html +233 -0
  66. package/docs/classes/Matrix2D.html +480 -0
  67. package/docs/classes/MatrixNTI2D.html +218 -0
  68. package/docs/classes/MaxHeap.html +500 -0
  69. package/docs/classes/MaxPriorityQueue.html +809 -0
  70. package/docs/classes/MinHeap.html +501 -0
  71. package/docs/classes/MinPriorityQueue.html +811 -0
  72. package/docs/classes/Navigator.html +291 -0
  73. package/docs/classes/ObjectDeque.html +423 -0
  74. package/docs/classes/PriorityQueue.html +733 -0
  75. package/docs/classes/Queue.html +370 -0
  76. package/docs/classes/RBTree.html +150 -0
  77. package/docs/classes/SegmentTree.html +345 -0
  78. package/docs/classes/SegmentTreeNode.html +418 -0
  79. package/docs/classes/SinglyLinkedList.html +1105 -0
  80. package/docs/classes/SinglyLinkedListNode.html +375 -0
  81. package/docs/classes/SplayTree.html +150 -0
  82. package/docs/classes/Stack.html +346 -0
  83. package/docs/classes/TreeMultiSet.html +2036 -0
  84. package/docs/classes/TreeNode.html +236 -0
  85. package/docs/classes/Trie.html +350 -0
  86. package/docs/classes/TrieNode.html +258 -0
  87. package/docs/classes/TwoThreeTree.html +150 -0
  88. package/docs/classes/UndirectedEdge.html +313 -0
  89. package/docs/classes/UndirectedGraph.html +1080 -0
  90. package/docs/classes/UndirectedVertex.html +226 -0
  91. package/docs/classes/Vector2D.html +783 -0
  92. package/docs/enums/CP.html +159 -0
  93. package/docs/enums/FamilyPosition.html +159 -0
  94. package/docs/enums/LoopType.html +160 -0
  95. package/docs/index.html +494 -0
  96. package/docs/interfaces/AVLTreeDeleted.html +161 -0
  97. package/docs/interfaces/BinaryTreeNodeObj.html +168 -0
  98. package/docs/interfaces/HeapOptions.html +167 -0
  99. package/docs/interfaces/IDirectedGraph.html +243 -0
  100. package/docs/interfaces/IGraph.html +427 -0
  101. package/docs/interfaces/NavigatorParams.html +197 -0
  102. package/docs/interfaces/PriorityQueueOptions.html +168 -0
  103. package/docs/modules.html +218 -0
  104. package/docs/types/BSTComparator.html +140 -0
  105. package/docs/types/BSTDeletedResult.html +137 -0
  106. package/docs/types/BinaryTreeDeleted.html +137 -0
  107. package/docs/types/BinaryTreeNodeId.html +125 -0
  108. package/docs/types/BinaryTreeNodePropertyName.html +125 -0
  109. package/docs/types/DFSOrderPattern.html +125 -0
  110. package/docs/types/DijkstraResult.html +145 -0
  111. package/docs/types/Direction.html +125 -0
  112. package/docs/types/DoublyLinkedListGetBy.html +125 -0
  113. package/docs/types/NodeOrPropertyName.html +125 -0
  114. package/docs/types/PriorityQueueComparator.html +145 -0
  115. package/docs/types/PriorityQueueDFSOrderPattern.html +125 -0
  116. package/docs/types/ResultByProperty.html +130 -0
  117. package/docs/types/ResultsByProperty.html +130 -0
  118. package/docs/types/SegmentTreeNodeVal.html +125 -0
  119. package/docs/types/SpecifyOptional.html +132 -0
  120. package/docs/types/Thunk.html +133 -0
  121. package/docs/types/ToThunkFn.html +133 -0
  122. package/docs/types/TopologicalStatus.html +125 -0
  123. package/docs/types/TreeMultiSetDeletedResult.html +137 -0
  124. package/docs/types/TrlAsyncFn.html +138 -0
  125. package/docs/types/TrlFn.html +138 -0
  126. package/docs/types/Turning.html +125 -0
  127. package/docs/types/VertexId.html +125 -0
  128. package/{tests/unit/data-structures/binary-tree → notes}/bst.test.ts +11 -15
  129. package/notes/note.md +23 -0
  130. package/package.json +2 -4
  131. package/.idea/data-structure-typed.iml +0 -14
  132. package/.idea/modules.xml +0 -8
  133. package/.idea/vcs.xml +0 -6
  134. package/src/assets/complexities-diff.jpg +0 -0
  135. package/src/assets/data-structure-complexities.jpg +0 -0
  136. package/src/assets/logo.png +0 -0
  137. package/src/data-structures/binary-tree/aa-tree.ts +0 -3
  138. package/src/data-structures/binary-tree/avl-tree.ts +0 -293
  139. package/src/data-structures/binary-tree/b-tree.ts +0 -3
  140. package/src/data-structures/binary-tree/binary-indexed-tree.ts +0 -69
  141. package/src/data-structures/binary-tree/binary-tree.ts +0 -1485
  142. package/src/data-structures/binary-tree/bst.ts +0 -497
  143. package/src/data-structures/binary-tree/diagrams/avl-tree-inserting.gif +0 -0
  144. package/src/data-structures/binary-tree/diagrams/bst-rotation.gif +0 -0
  145. package/src/data-structures/binary-tree/diagrams/segment-tree.png +0 -0
  146. package/src/data-structures/binary-tree/index.ts +0 -11
  147. package/src/data-structures/binary-tree/rb-tree.ts +0 -3
  148. package/src/data-structures/binary-tree/segment-tree.ts +0 -248
  149. package/src/data-structures/binary-tree/splay-tree.ts +0 -3
  150. package/src/data-structures/binary-tree/tree-multiset.ts +0 -53
  151. package/src/data-structures/binary-tree/two-three-tree.ts +0 -3
  152. package/src/data-structures/diagrams/README.md +0 -5
  153. package/src/data-structures/graph/abstract-graph.ts +0 -956
  154. package/src/data-structures/graph/diagrams/adjacency-list-pros-cons.jpg +0 -0
  155. package/src/data-structures/graph/diagrams/adjacency-list.jpg +0 -0
  156. package/src/data-structures/graph/diagrams/adjacency-matrix-pros-cons.jpg +0 -0
  157. package/src/data-structures/graph/diagrams/adjacency-matrix.jpg +0 -0
  158. package/src/data-structures/graph/diagrams/dfs-can-do.jpg +0 -0
  159. package/src/data-structures/graph/diagrams/edge-list-pros-cons.jpg +0 -0
  160. package/src/data-structures/graph/diagrams/edge-list.jpg +0 -0
  161. package/src/data-structures/graph/diagrams/max-flow.jpg +0 -0
  162. package/src/data-structures/graph/diagrams/mst.jpg +0 -0
  163. package/src/data-structures/graph/diagrams/tarjan-articulation-point-bridge.png +0 -0
  164. package/src/data-structures/graph/diagrams/tarjan-complicate-simple.png +0 -0
  165. package/src/data-structures/graph/diagrams/tarjan-strongly-connected-component.png +0 -0
  166. package/src/data-structures/graph/diagrams/tarjan.mp4 +0 -0
  167. package/src/data-structures/graph/diagrams/tarjan.webp +0 -0
  168. package/src/data-structures/graph/directed-graph.ts +0 -424
  169. package/src/data-structures/graph/index.ts +0 -3
  170. package/src/data-structures/graph/undirected-graph.ts +0 -254
  171. package/src/data-structures/hash/coordinate-map.ts +0 -71
  172. package/src/data-structures/hash/coordinate-set.ts +0 -60
  173. package/src/data-structures/hash/hash-table.ts +0 -1
  174. package/src/data-structures/hash/index.ts +0 -6
  175. package/src/data-structures/hash/pair.ts +0 -1
  176. package/src/data-structures/hash/tree-map.ts +0 -1
  177. package/src/data-structures/hash/tree-set.ts +0 -1
  178. package/src/data-structures/heap/heap.ts +0 -156
  179. package/src/data-structures/heap/index.ts +0 -3
  180. package/src/data-structures/heap/max-heap.ts +0 -31
  181. package/src/data-structures/heap/min-heap.ts +0 -34
  182. package/src/data-structures/index.ts +0 -13
  183. package/src/data-structures/linked-list/doubly-linked-list.ts +0 -351
  184. package/src/data-structures/linked-list/index.ts +0 -2
  185. package/src/data-structures/linked-list/singly-linked-list.ts +0 -748
  186. package/src/data-structures/linked-list/skip-linked-list.ts +0 -1
  187. package/src/data-structures/matrix/index.ts +0 -4
  188. package/src/data-structures/matrix/matrix.ts +0 -27
  189. package/src/data-structures/matrix/matrix2d.ts +0 -208
  190. package/src/data-structures/matrix/navigator.ts +0 -122
  191. package/src/data-structures/matrix/vector2d.ts +0 -316
  192. package/src/data-structures/priority-queue/index.ts +0 -3
  193. package/src/data-structures/priority-queue/max-priority-queue.ts +0 -24
  194. package/src/data-structures/priority-queue/min-priority-queue.ts +0 -24
  195. package/src/data-structures/priority-queue/priority-queue.ts +0 -346
  196. package/src/data-structures/queue/deque.ts +0 -241
  197. package/src/data-structures/queue/index.ts +0 -2
  198. package/src/data-structures/queue/queue.ts +0 -120
  199. package/src/data-structures/stack/index.ts +0 -1
  200. package/src/data-structures/stack/stack.ts +0 -98
  201. package/src/data-structures/trie/index.ts +0 -1
  202. package/src/data-structures/trie/trie.ts +0 -225
  203. package/src/data-structures/types/abstract-graph.ts +0 -51
  204. package/src/data-structures/types/avl-tree.ts +0 -6
  205. package/src/data-structures/types/binary-tree.ts +0 -15
  206. package/src/data-structures/types/bst.ts +0 -5
  207. package/src/data-structures/types/directed-graph.ts +0 -18
  208. package/src/data-structures/types/doubly-linked-list.ts +0 -1
  209. package/src/data-structures/types/heap.ts +0 -8
  210. package/src/data-structures/types/index.ts +0 -13
  211. package/src/data-structures/types/navigator.ts +0 -13
  212. package/src/data-structures/types/priority-queue.ts +0 -9
  213. package/src/data-structures/types/segment-tree.ts +0 -1
  214. package/src/data-structures/types/singly-linked-list.ts +0 -1
  215. package/src/data-structures/types/tree-multiset.ts +0 -3
  216. package/src/index.ts +0 -1
  217. package/src/utils/index.ts +0 -2
  218. package/src/utils/types/index.ts +0 -1
  219. package/src/utils/types/utils.ts +0 -176
  220. package/src/utils/utils.ts +0 -290
  221. package/tests/unit/data-structures/graph/abstract-graph.ts +0 -0
  222. package/tests/unit/data-structures/graph/directed-graph.test.ts +0 -495
  223. package/tests/unit/data-structures/graph/index.ts +0 -3
  224. package/tests/unit/data-structures/graph/undirected-graph.ts +0 -0
@@ -0,0 +1,2038 @@
1
+ <!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>BST | data-structure-typed</title><meta name="description" content="Documentation for data-structure-typed"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
2
+ <div class="tsd-toolbar-contents container">
3
+ <div class="table-cell" id="tsd-search" data-base="..">
4
+ <div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
5
+ <div class="field">
6
+ <div id="tsd-toolbar-links"></div></div>
7
+ <ul class="results">
8
+ <li class="state loading">Preparing search index...</li>
9
+ <li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">data-structure-typed</a></div>
10
+ <div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
11
+ <div class="container container-main">
12
+ <div class="col-content">
13
+ <div class="tsd-page-title">
14
+ <ul class="tsd-breadcrumb">
15
+ <li><a href="../modules.html">data-structure-typed</a></li>
16
+ <li><a href="BST.html">BST</a></li></ul>
17
+ <h1>Class BST&lt;T&gt;</h1></div>
18
+ <section class="tsd-panel">
19
+ <h4>Type Parameters</h4>
20
+ <ul class="tsd-type-parameter-list">
21
+ <li>
22
+ <h4><span class="tsd-kind-type-parameter">T</span></h4></li></ul></section>
23
+ <section class="tsd-panel tsd-hierarchy">
24
+ <h4>Hierarchy</h4>
25
+ <ul class="tsd-hierarchy">
26
+ <li><a href="BinaryTree.html" class="tsd-signature-type tsd-kind-class">BinaryTree</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>
27
+ <ul class="tsd-hierarchy">
28
+ <li><span class="target">BST</span>
29
+ <ul class="tsd-hierarchy">
30
+ <li><a href="AVLTree.html" class="tsd-signature-type tsd-kind-class">AVLTree</a></li>
31
+ <li><a href="TreeMultiSet.html" class="tsd-signature-type tsd-kind-class">TreeMultiSet</a></li></ul></li></ul></li></ul></section><aside class="tsd-sources">
32
+ <ul>
33
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/bst.ts#L19">src/data-structures/binary-tree/bst.ts:19</a></li></ul></aside>
34
+ <section class="tsd-panel-group tsd-index-group">
35
+ <section class="tsd-panel tsd-index-panel">
36
+ <details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
37
+ <h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex=0><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-text)"></path></svg> Index</h5></summary>
38
+ <div class="tsd-accordion-details">
39
+ <section class="tsd-index-section">
40
+ <h3 class="tsd-index-heading">Constructors</h3>
41
+ <div class="tsd-index-list"><a href="BST.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-512"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g></svg><span>constructor</span></a>
42
+ </div></section>
43
+ <section class="tsd-index-section">
44
+ <h3 class="tsd-index-heading">Properties</h3>
45
+ <div class="tsd-index-list"><a href="BST.html#_comparator" 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>_comparator</span></a>
46
+ <a href="BST.html#_count" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_count</span></a>
47
+ <a href="BST.html#_loopType" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_loop<wbr/>Type</span></a>
48
+ <a href="BST.html#_root" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_root</span></a>
49
+ <a href="BST.html#_size" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_size</span></a>
50
+ <a href="BST.html#_visitedCount" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_visited<wbr/>Count</span></a>
51
+ <a href="BST.html#_visitedId" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_visited<wbr/>Id</span></a>
52
+ <a href="BST.html#_visitedLeftSum" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_visited<wbr/>Left<wbr/>Sum</span></a>
53
+ <a href="BST.html#_visitedNode" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_visited<wbr/>Node</span></a>
54
+ <a href="BST.html#_visitedVal" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_visited<wbr/>Val</span></a>
55
+ </div></section>
56
+ <section class="tsd-index-section">
57
+ <h3 class="tsd-index-heading">Accessors</h3>
58
+ <div class="tsd-index-list"><a href="BST.html#count" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-262144"><rect fill="var(--color-icon-background)" stroke="#FF4D4D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M8.85 16L11.13 7.24H12.582L14.85 16H13.758L13.182 13.672H10.53L9.954 16H8.85ZM10.746 12.76H12.954L12.282 10.06C12.154 9.548 12.054 9.12 11.982 8.776C11.91 8.432 11.866 8.208 11.85 8.104C11.834 8.208 11.79 8.432 11.718 8.776C11.646 9.12 11.546 9.544 11.418 10.048L10.746 12.76Z" fill="var(--color-text)"></path></g></svg><span>count</span></a>
59
+ <a href="BST.html#root" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>root</span></a>
60
+ <a href="BST.html#size" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>size</span></a>
61
+ </div></section>
62
+ <section class="tsd-index-section">
63
+ <h3 class="tsd-index-heading">Methods</h3>
64
+ <div class="tsd-index-list"><a href="BST.html#BFS" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-2048"><rect fill="var(--color-icon-background)" stroke="#FF4DB8" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.162 16V7.24H10.578L11.514 10.072C11.602 10.328 11.674 10.584 11.73 10.84C11.794 11.088 11.842 11.28 11.874 11.416C11.906 11.28 11.954 11.088 12.018 10.84C12.082 10.584 12.154 10.324 12.234 10.06L13.122 7.24H14.538V16H13.482V12.82C13.482 12.468 13.49 12.068 13.506 11.62C13.53 11.172 13.558 10.716 13.59 10.252C13.622 9.78 13.654 9.332 13.686 8.908C13.726 8.476 13.762 8.1 13.794 7.78L12.366 12.16H11.334L9.894 7.78C9.934 8.092 9.97 8.456 10.002 8.872C10.042 9.28 10.078 9.716 10.11 10.18C10.142 10.636 10.166 11.092 10.182 11.548C10.206 12.004 10.218 12.428 10.218 12.82V16H9.162Z" fill="var(--color-text)"></path></g></svg><span>BFS</span></a>
65
+ <a href="BST.html#DFS" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>DFS</span></a>
66
+ <a href="BST.html#DFSIterative" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>DFSIterative</span></a>
67
+ <a href="BST.html#_accumulatedByPropertyName" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_accumulated<wbr/>By<wbr/>Property<wbr/>Name</span></a>
68
+ <a href="BST.html#_compare" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_compare</span></a>
69
+ <a href="BST.html#_getResultByPropertyName" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_get<wbr/>Result<wbr/>By<wbr/>Property<wbr/>Name</span></a>
70
+ <a href="BST.html#_pushByPropertyNameStopOrNot" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_push<wbr/>By<wbr/>Property<wbr/>Name<wbr/>Stop<wbr/>Or<wbr/>Not</span></a>
71
+ <a href="BST.html#_resetResults" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_reset<wbr/>Results</span></a>
72
+ <a href="BST.html#add" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>add</span></a>
73
+ <a href="BST.html#addMany" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>add<wbr/>Many</span></a>
74
+ <a href="BST.html#addTo" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>add<wbr/>To</span></a>
75
+ <a href="BST.html#allGreaterNodesAdd" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>all<wbr/>Greater<wbr/>Nodes<wbr/>Add</span></a>
76
+ <a href="BST.html#balance" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>balance</span></a>
77
+ <a href="BST.html#clear" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>clear</span></a>
78
+ <a href="BST.html#createNode" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>create<wbr/>Node</span></a>
79
+ <a href="BST.html#fill" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>fill</span></a>
80
+ <a href="BST.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>
81
+ <a href="BST.html#getCount" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Count</span></a>
82
+ <a href="BST.html#getDepth" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Depth</span></a>
83
+ <a href="BST.html#getHeight" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Height</span></a>
84
+ <a href="BST.html#getLeftMost" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Left<wbr/>Most</span></a>
85
+ <a href="BST.html#getMinHeight" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Min<wbr/>Height</span></a>
86
+ <a href="BST.html#getNodes" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Nodes</span></a>
87
+ <a href="BST.html#getPathToRoot" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Path<wbr/>To<wbr/>Root</span></a>
88
+ <a href="BST.html#getPredecessor" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Predecessor</span></a>
89
+ <a href="BST.html#getRightMost" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Right<wbr/>Most</span></a>
90
+ <a href="BST.html#getRoot" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Root</span></a>
91
+ <a href="BST.html#getSize" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Size</span></a>
92
+ <a href="BST.html#getSubTreeSizeAndCount" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Sub<wbr/>Tree<wbr/>Size<wbr/>And<wbr/>Count</span></a>
93
+ <a href="BST.html#has" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>has</span></a>
94
+ <a href="BST.html#isAVLBalanced" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>isAVLBalanced</span></a>
95
+ <a href="BST.html#isBST" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>isBST</span></a>
96
+ <a href="BST.html#isBalanced" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>is<wbr/>Balanced</span></a>
97
+ <a href="BST.html#isEmpty" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>is<wbr/>Empty</span></a>
98
+ <a href="BST.html#lastKey" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>last<wbr/>Key</span></a>
99
+ <a href="BST.html#lesserSum" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>lesser<wbr/>Sum</span></a>
100
+ <a href="BST.html#levelIterative" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>level<wbr/>Iterative</span></a>
101
+ <a href="BST.html#listLevels" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>list<wbr/>Levels</span></a>
102
+ <a href="BST.html#morris" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>morris</span></a>
103
+ <a href="BST.html#remove" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>remove</span></a>
104
+ <a href="BST.html#subTreeAdd" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>sub<wbr/>Tree<wbr/>Add</span></a>
105
+ <a href="BST.html#subTreeSum" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>sub<wbr/>Tree<wbr/>Sum</span></a>
106
+ </div></section></div></details></section></section>
107
+ <section class="tsd-panel-group tsd-member-group">
108
+ <h2>Constructors</h2>
109
+ <section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a>
110
+ <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>
111
+ <ul class="tsd-signatures">
112
+ <li class="tsd-signature tsd-anchor-link" id="constructor.new_BST"><span class="tsd-kind-constructor-signature">new BST</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">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="BST.html" class="tsd-signature-type tsd-kind-class">BST</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_BST" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
113
+ <li class="tsd-description">
114
+ <div class="tsd-comment tsd-typography"><p>The constructor function accepts an optional options object and sets the comparator property if provided.</p>
115
+ </div>
116
+ <section class="tsd-panel">
117
+ <h4>Type Parameters</h4>
118
+ <ul class="tsd-type-parameter-list">
119
+ <li>
120
+ <h4><span class="tsd-kind-type-parameter">T</span></h4></li></ul></section>
121
+ <div class="tsd-parameters">
122
+ <h4 class="tsd-parameters-title">Parameters</h4>
123
+ <ul class="tsd-parameter-list">
124
+ <li>
125
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <span class="tsd-signature-symbol">{ </span><br/><span>    </span><span class="tsd-kind-property">comparator</span><span class="tsd-signature-symbol">?: </span><a href="../types/BSTComparator.html" class="tsd-signature-type tsd-kind-type-alias">BSTComparator</a><span class="tsd-signature-symbol">; </span><br/><span>    </span><span class="tsd-kind-property">loopType</span><span class="tsd-signature-symbol">?: </span><a href="../enums/LoopType.html" class="tsd-signature-type tsd-kind-enum">LoopType</a><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></h5>
126
+ <div class="tsd-comment tsd-typography"><p>An optional object that can contain the following properties:</p>
127
+ </div>
128
+ <div class="tsd-comment tsd-typography"></div>
129
+ <ul class="tsd-parameters">
130
+ <li class="tsd-parameter">
131
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-property">comparator</span><span class="tsd-signature-symbol">?: </span><a href="../types/BSTComparator.html" class="tsd-signature-type tsd-kind-type-alias">BSTComparator</a></h5></li>
132
+ <li class="tsd-parameter">
133
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-property">loop<wbr/>Type</span><span class="tsd-signature-symbol">?: </span><a href="../enums/LoopType.html" class="tsd-signature-type tsd-kind-enum">LoopType</a></h5></li></ul></li></ul></div>
134
+ <h4 class="tsd-returns-title">Returns <a href="BST.html" class="tsd-signature-type tsd-kind-class">BST</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>
135
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
136
+ <p>Overrides <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#constructor">constructor</a></p>
137
+ <ul>
138
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/bst.ts#L24">src/data-structures/binary-tree/bst.ts:24</a></li></ul></aside></li></ul></section></section>
139
+ <section class="tsd-panel-group tsd-member-group">
140
+ <h2>Properties</h2>
141
+ <section class="tsd-panel tsd-member tsd-is-protected"><a id="_comparator" class="tsd-anchor"></a>
142
+ <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_comparator</span><a href="#_comparator" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
143
+ <div class="tsd-signature"><span class="tsd-kind-property">_comparator</span><span class="tsd-signature-symbol">:</span> <a href="../types/BSTComparator.html" class="tsd-signature-type tsd-kind-type-alias">BSTComparator</a><span class="tsd-signature-symbol"> = ...</span></div><aside class="tsd-sources">
144
+ <ul>
145
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/bst.ts#L479">src/data-structures/binary-tree/bst.ts:479</a></li></ul></aside></section>
146
+ <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_count" class="tsd-anchor"></a>
147
+ <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_count</span><a href="#_count" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
148
+ <div class="tsd-signature"><span class="tsd-kind-property">_count</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div><aside class="tsd-sources">
149
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_count">_count</a></p>
150
+ <ul>
151
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L263">src/data-structures/binary-tree/binary-tree.ts:263</a></li></ul></aside></section>
152
+ <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_loopType" class="tsd-anchor"></a>
153
+ <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_loop<wbr/>Type</span><a href="#_loopType" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
154
+ <div class="tsd-signature"><span class="tsd-kind-property">_loop<wbr/>Type</span><span class="tsd-signature-symbol">:</span> <a href="../enums/LoopType.html" class="tsd-signature-type tsd-kind-enum">LoopType</a><span class="tsd-signature-symbol"> = LoopType.iterative</span></div><aside class="tsd-sources">
155
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_loopType">_loopType</a></p>
156
+ <ul>
157
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L207">src/data-structures/binary-tree/binary-tree.ts:207</a></li></ul></aside></section>
158
+ <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_root" class="tsd-anchor"></a>
159
+ <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_root</span><a href="#_root" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
160
+ <div class="tsd-signature"><span class="tsd-kind-property">_root</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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><span class="tsd-signature-symbol"> = null</span></div><aside class="tsd-sources">
161
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_root">_root</a></p>
162
+ <ul>
163
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L239">src/data-structures/binary-tree/binary-tree.ts:239</a></li></ul></aside></section>
164
+ <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_size" class="tsd-anchor"></a>
165
+ <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>
166
+ <div class="tsd-signature"><span class="tsd-kind-property">_size</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div><aside class="tsd-sources">
167
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_size">_size</a></p>
168
+ <ul>
169
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L253">src/data-structures/binary-tree/binary-tree.ts:253</a></li></ul></aside></section>
170
+ <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_visitedCount" class="tsd-anchor"></a>
171
+ <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_visited<wbr/>Count</span><a href="#_visitedCount" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
172
+ <div class="tsd-signature"><span class="tsd-kind-property">_visited<wbr/>Count</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> = []</span></div><aside class="tsd-sources">
173
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_visitedCount">_visitedCount</a></p>
174
+ <ul>
175
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L211">src/data-structures/binary-tree/binary-tree.ts:211</a></li></ul></aside></section>
176
+ <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_visitedId" class="tsd-anchor"></a>
177
+ <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_visited<wbr/>Id</span><a href="#_visitedId" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
178
+ <div class="tsd-signature"><span class="tsd-kind-property">_visited<wbr/>Id</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> = []</span></div><aside class="tsd-sources">
179
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_visitedId">_visitedId</a></p>
180
+ <ul>
181
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L208">src/data-structures/binary-tree/binary-tree.ts:208</a></li></ul></aside></section>
182
+ <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_visitedLeftSum" class="tsd-anchor"></a>
183
+ <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_visited<wbr/>Left<wbr/>Sum</span><a href="#_visitedLeftSum" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
184
+ <div class="tsd-signature"><span class="tsd-kind-property">_visited<wbr/>Left<wbr/>Sum</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> = []</span></div><aside class="tsd-sources">
185
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_visitedLeftSum">_visitedLeftSum</a></p>
186
+ <ul>
187
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L212">src/data-structures/binary-tree/binary-tree.ts:212</a></li></ul></aside></section>
188
+ <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_visitedNode" class="tsd-anchor"></a>
189
+ <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_visited<wbr/>Node</span><a href="#_visitedNode" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
190
+ <div class="tsd-signature"><span class="tsd-kind-property">_visited<wbr/>Node</span><span class="tsd-signature-symbol">:</span> <a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> = []</span></div><aside class="tsd-sources">
191
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_visitedNode">_visitedNode</a></p>
192
+ <ul>
193
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L210">src/data-structures/binary-tree/binary-tree.ts:210</a></li></ul></aside></section>
194
+ <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_visitedVal" class="tsd-anchor"></a>
195
+ <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_visited<wbr/>Val</span><a href="#_visitedVal" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
196
+ <div class="tsd-signature"><span class="tsd-kind-property">_visited<wbr/>Val</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> = []</span></div><aside class="tsd-sources">
197
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_visitedVal">_visitedVal</a></p>
198
+ <ul>
199
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L209">src/data-structures/binary-tree/binary-tree.ts:209</a></li></ul></aside></section></section>
200
+ <section class="tsd-panel-group tsd-member-group">
201
+ <h2>Accessors</h2>
202
+ <section class="tsd-panel tsd-member tsd-is-inherited"><a id="count" class="tsd-anchor"></a>
203
+ <h3 class="tsd-anchor-link"><span>count</span><a href="#count" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
204
+ <ul class="tsd-signatures tsd-is-inherited">
205
+ <li class="tsd-signature" id="count.count-1"><span class="tsd-signature-symbol">get</span> count<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>
206
+ <li class="tsd-description">
207
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
208
+ <p>Inherited from BinaryTree.count</p>
209
+ <ul>
210
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L265">src/data-structures/binary-tree/binary-tree.ts:265</a></li></ul></aside></li>
211
+ <li class="tsd-signature" id="count.count-2"><span class="tsd-signature-symbol">set</span> count<span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">v</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
212
+ <li class="tsd-description">
213
+ <div class="tsd-parameters">
214
+ <h4 class="tsd-parameters-title">Parameters</h4>
215
+ <ul class="tsd-parameter-list">
216
+ <li>
217
+ <h5><span class="tsd-kind-parameter">v</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div>
218
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
219
+ <p>Inherited from BinaryTree.count</p>
220
+ <ul>
221
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L269">src/data-structures/binary-tree/binary-tree.ts:269</a></li></ul></aside></li></ul></section>
222
+ <section class="tsd-panel tsd-member tsd-is-inherited"><a id="root" class="tsd-anchor"></a>
223
+ <h3 class="tsd-anchor-link"><span>root</span><a href="#root" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
224
+ <ul class="tsd-signatures tsd-is-inherited">
225
+ <li class="tsd-signature" id="root.root-1"><span class="tsd-signature-symbol">get</span> root<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="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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>
226
+ <li class="tsd-description">
227
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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">
228
+ <p>Inherited from BinaryTree.root</p>
229
+ <ul>
230
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L241">src/data-structures/binary-tree/binary-tree.ts:241</a></li></ul></aside></li>
231
+ <li class="tsd-signature" id="root.root-2"><span class="tsd-signature-symbol">set</span> root<span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">v</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
232
+ <li class="tsd-description">
233
+ <div class="tsd-parameters">
234
+ <h4 class="tsd-parameters-title">Parameters</h4>
235
+ <ul class="tsd-parameter-list">
236
+ <li>
237
+ <h5><span class="tsd-kind-parameter">v</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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>
238
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
239
+ <p>Inherited from BinaryTree.root</p>
240
+ <ul>
241
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L245">src/data-structures/binary-tree/binary-tree.ts:245</a></li></ul></aside></li></ul></section>
242
+ <section class="tsd-panel tsd-member tsd-is-inherited"><a id="size" class="tsd-anchor"></a>
243
+ <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>
244
+ <ul class="tsd-signatures tsd-is-inherited">
245
+ <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>
246
+ <li class="tsd-description">
247
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
248
+ <p>Inherited from BinaryTree.size</p>
249
+ <ul>
250
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L255">src/data-structures/binary-tree/binary-tree.ts:255</a></li></ul></aside></li>
251
+ <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">v</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
252
+ <li class="tsd-description">
253
+ <div class="tsd-parameters">
254
+ <h4 class="tsd-parameters-title">Parameters</h4>
255
+ <ul class="tsd-parameter-list">
256
+ <li>
257
+ <h5><span class="tsd-kind-parameter">v</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div>
258
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
259
+ <p>Inherited from BinaryTree.size</p>
260
+ <ul>
261
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L259">src/data-structures/binary-tree/binary-tree.ts:259</a></li></ul></aside></li></ul></section></section>
262
+ <section class="tsd-panel-group tsd-member-group">
263
+ <h2>Methods</h2>
264
+ <section class="tsd-panel tsd-member tsd-is-inherited"><a id="BFS" class="tsd-anchor"></a>
265
+ <h3 class="tsd-anchor-link"><span>BFS</span><a href="#BFS" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
266
+ <ul class="tsd-signatures tsd-is-inherited">
267
+ <li class="tsd-signature tsd-anchor-link" id="BFS.BFS-1"><span class="tsd-kind-call-signature">BFS</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><span class="tsd-signature-symbol">[]</span><a href="#BFS.BFS-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
268
+ <li class="tsd-description">
269
+ <div class="tsd-comment tsd-typography"><p>The BFS function performs a breadth-first search on a binary tree and returns the results based on a specified node
270
+ or property name.</p>
271
+ </div>
272
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>ResultsByProperty&lt;T&gt;</code>.</p>
273
+
274
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
275
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#BFS">BFS</a></p>
276
+ <ul>
277
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L991">src/data-structures/binary-tree/binary-tree.ts:991</a></li></ul></aside></li>
278
+ <li class="tsd-signature tsd-anchor-link" id="BFS.BFS-2"><span class="tsd-kind-call-signature">BFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><a href="#BFS.BFS-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
279
+ <li class="tsd-description">
280
+ <div class="tsd-comment tsd-typography"><p>The BFS function performs a breadth-first search on a binary tree and returns the results based on a specified node
281
+ or property name.</p>
282
+ </div>
283
+ <div class="tsd-parameters">
284
+ <h4 class="tsd-parameters-title">Parameters</h4>
285
+ <ul class="tsd-parameter-list">
286
+ <li>
287
+ <h5><span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;id&quot;</span></h5>
288
+ <div class="tsd-comment tsd-typography"><p>The parameter <code>nodeOrPropertyName</code> is an optional parameter that
289
+ represents either a node or a property name. If a node is provided, the breadth-first search algorithm will be
290
+ performed starting from that node. If a property name is provided, the breadth-first search algorithm will be
291
+ performed starting from the root node</p>
292
+ </div>
293
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
294
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>ResultsByProperty&lt;T&gt;</code>.</p>
295
+
296
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
297
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#BFS">BFS</a></p>
298
+ <ul>
299
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L993">src/data-structures/binary-tree/binary-tree.ts:993</a></li></ul></aside></li>
300
+ <li class="tsd-signature tsd-anchor-link" id="BFS.BFS-3"><span class="tsd-kind-call-signature">BFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeOrPropertyName</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="#BFS.BFS-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
301
+ <li class="tsd-description">
302
+ <div class="tsd-comment tsd-typography"><p>The BFS function performs a breadth-first search on a binary tree and returns the results based on a specified node
303
+ or property name.</p>
304
+ </div>
305
+ <div class="tsd-parameters">
306
+ <h4 class="tsd-parameters-title">Parameters</h4>
307
+ <ul class="tsd-parameter-list">
308
+ <li>
309
+ <h5><span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;val&quot;</span></h5>
310
+ <div class="tsd-comment tsd-typography"><p>The parameter <code>nodeOrPropertyName</code> is an optional parameter that
311
+ represents either a node or a property name. If a node is provided, the breadth-first search algorithm will be
312
+ performed starting from that node. If a property name is provided, the breadth-first search algorithm will be
313
+ performed starting from the root node</p>
314
+ </div>
315
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
316
+ <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>an object of type <code>ResultsByProperty&lt;T&gt;</code>.</p>
317
+
318
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
319
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#BFS">BFS</a></p>
320
+ <ul>
321
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L995">src/data-structures/binary-tree/binary-tree.ts:995</a></li></ul></aside></li>
322
+ <li class="tsd-signature tsd-anchor-link" id="BFS.BFS-4"><span class="tsd-kind-call-signature">BFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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><span class="tsd-signature-symbol">[]</span><a href="#BFS.BFS-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
323
+ <li class="tsd-description">
324
+ <div class="tsd-comment tsd-typography"><p>The BFS function performs a breadth-first search on a binary tree and returns the results based on a specified node
325
+ or property name.</p>
326
+ </div>
327
+ <div class="tsd-parameters">
328
+ <h4 class="tsd-parameters-title">Parameters</h4>
329
+ <ul class="tsd-parameter-list">
330
+ <li>
331
+ <h5><span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;node&quot;</span></h5>
332
+ <div class="tsd-comment tsd-typography"><p>The parameter <code>nodeOrPropertyName</code> is an optional parameter that
333
+ represents either a node or a property name. If a node is provided, the breadth-first search algorithm will be
334
+ performed starting from that node. If a property name is provided, the breadth-first search algorithm will be
335
+ performed starting from the root node</p>
336
+ </div>
337
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
338
+ <h4 class="tsd-returns-title">Returns <a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>ResultsByProperty&lt;T&gt;</code>.</p>
339
+
340
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
341
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#BFS">BFS</a></p>
342
+ <ul>
343
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L997">src/data-structures/binary-tree/binary-tree.ts:997</a></li></ul></aside></li>
344
+ <li class="tsd-signature tsd-anchor-link" id="BFS.BFS-5"><span class="tsd-kind-call-signature">BFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><a href="#BFS.BFS-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
345
+ <li class="tsd-description">
346
+ <div class="tsd-comment tsd-typography"><p>The BFS function performs a breadth-first search on a binary tree and returns the results based on a specified node
347
+ or property name.</p>
348
+ </div>
349
+ <div class="tsd-parameters">
350
+ <h4 class="tsd-parameters-title">Parameters</h4>
351
+ <ul class="tsd-parameter-list">
352
+ <li>
353
+ <h5><span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;count&quot;</span></h5>
354
+ <div class="tsd-comment tsd-typography"><p>The parameter <code>nodeOrPropertyName</code> is an optional parameter that
355
+ represents either a node or a property name. If a node is provided, the breadth-first search algorithm will be
356
+ performed starting from that node. If a property name is provided, the breadth-first search algorithm will be
357
+ performed starting from the root node</p>
358
+ </div>
359
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
360
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>ResultsByProperty&lt;T&gt;</code>.</p>
361
+
362
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
363
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#BFS">BFS</a></p>
364
+ <ul>
365
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L999">src/data-structures/binary-tree/binary-tree.ts:999</a></li></ul></aside></li></ul></section>
366
+ <section class="tsd-panel tsd-member tsd-is-inherited"><a id="DFS" class="tsd-anchor"></a>
367
+ <h3 class="tsd-anchor-link"><span>DFS</span><a href="#DFS" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
368
+ <ul class="tsd-signatures tsd-is-inherited">
369
+ <li class="tsd-signature tsd-anchor-link" id="DFS.DFS-1"><span class="tsd-kind-call-signature">DFS</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><span class="tsd-signature-symbol">[]</span><a href="#DFS.DFS-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
370
+ <li class="tsd-description">
371
+ <div class="tsd-comment tsd-typography"><p>The DFS function performs a depth-first search traversal on a binary tree and returns the results based on the
372
+ specified pattern and node or property name.</p>
373
+ </div>
374
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>ResultsByProperty&lt;T&gt;</code>.</p>
375
+
376
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
377
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#DFS">DFS</a></p>
378
+ <ul>
379
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L1027">src/data-structures/binary-tree/binary-tree.ts:1027</a></li></ul></aside></li>
380
+ <li class="tsd-signature tsd-anchor-link" id="DFS.DFS-2"><span class="tsd-kind-call-signature">DFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</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><span class="tsd-signature-symbol">[]</span><a href="#DFS.DFS-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
381
+ <li class="tsd-description">
382
+ <div class="tsd-comment tsd-typography"><p>The DFS function performs a depth-first search traversal on a binary tree and returns the results based on the
383
+ specified pattern and node or property name.</p>
384
+ </div>
385
+ <div class="tsd-parameters">
386
+ <h4 class="tsd-parameters-title">Parameters</h4>
387
+ <ul class="tsd-parameter-list">
388
+ <li>
389
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pattern</span>: <a href="../types/DFSOrderPattern.html" class="tsd-signature-type tsd-kind-type-alias">DFSOrderPattern</a></h5>
390
+ <div class="tsd-comment tsd-typography"><p>The &quot;pattern&quot; parameter is used to specify the order in which the nodes
391
+ of a binary tree are traversed during the Depth-First Search (DFS) algorithm. It can take one of three values: &#39;in&#39;,
392
+ &#39;pre&#39;, or &#39;post&#39;.</p>
393
+ </div>
394
+ <div class="tsd-comment tsd-typography"></div></li>
395
+ <li>
396
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;id&quot;</span></h5>
397
+ <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is a string that represents
398
+ either the name of a property in the <code>BinaryTreeNode</code> object or the value of the <code>id</code> property in the
399
+ <code>BinaryTreeNode</code> object. This parameter is used to accumulate the results based on the specified property name. If
400
+ no value</p>
401
+ </div>
402
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
403
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>ResultsByProperty&lt;T&gt;</code>.</p>
404
+
405
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
406
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#DFS">DFS</a></p>
407
+ <ul>
408
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L1029">src/data-structures/binary-tree/binary-tree.ts:1029</a></li></ul></aside></li>
409
+ <li class="tsd-signature tsd-anchor-link" id="DFS.DFS-3"><span class="tsd-kind-call-signature">DFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</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="#DFS.DFS-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
410
+ <li class="tsd-description">
411
+ <div class="tsd-comment tsd-typography"><p>The DFS function performs a depth-first search traversal on a binary tree and returns the results based on the
412
+ specified pattern and node or property name.</p>
413
+ </div>
414
+ <div class="tsd-parameters">
415
+ <h4 class="tsd-parameters-title">Parameters</h4>
416
+ <ul class="tsd-parameter-list">
417
+ <li>
418
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pattern</span>: <a href="../types/DFSOrderPattern.html" class="tsd-signature-type tsd-kind-type-alias">DFSOrderPattern</a></h5>
419
+ <div class="tsd-comment tsd-typography"><p>The &quot;pattern&quot; parameter is used to specify the order in which the nodes
420
+ of a binary tree are traversed during the Depth-First Search (DFS) algorithm. It can take one of three values: &#39;in&#39;,
421
+ &#39;pre&#39;, or &#39;post&#39;.</p>
422
+ </div>
423
+ <div class="tsd-comment tsd-typography"></div></li>
424
+ <li>
425
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;val&quot;</span></h5>
426
+ <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is a string that represents
427
+ either the name of a property in the <code>BinaryTreeNode</code> object or the value of the <code>id</code> property in the
428
+ <code>BinaryTreeNode</code> object. This parameter is used to accumulate the results based on the specified property name. If
429
+ no value</p>
430
+ </div>
431
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
432
+ <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>an object of type <code>ResultsByProperty&lt;T&gt;</code>.</p>
433
+
434
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
435
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#DFS">DFS</a></p>
436
+ <ul>
437
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L1031">src/data-structures/binary-tree/binary-tree.ts:1031</a></li></ul></aside></li>
438
+ <li class="tsd-signature tsd-anchor-link" id="DFS.DFS-4"><span class="tsd-kind-call-signature">DFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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><span class="tsd-signature-symbol">[]</span><a href="#DFS.DFS-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
439
+ <li class="tsd-description">
440
+ <div class="tsd-comment tsd-typography"><p>The DFS function performs a depth-first search traversal on a binary tree and returns the results based on the
441
+ specified pattern and node or property name.</p>
442
+ </div>
443
+ <div class="tsd-parameters">
444
+ <h4 class="tsd-parameters-title">Parameters</h4>
445
+ <ul class="tsd-parameter-list">
446
+ <li>
447
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pattern</span>: <a href="../types/DFSOrderPattern.html" class="tsd-signature-type tsd-kind-type-alias">DFSOrderPattern</a></h5>
448
+ <div class="tsd-comment tsd-typography"><p>The &quot;pattern&quot; parameter is used to specify the order in which the nodes
449
+ of a binary tree are traversed during the Depth-First Search (DFS) algorithm. It can take one of three values: &#39;in&#39;,
450
+ &#39;pre&#39;, or &#39;post&#39;.</p>
451
+ </div>
452
+ <div class="tsd-comment tsd-typography"></div></li>
453
+ <li>
454
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;node&quot;</span></h5>
455
+ <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is a string that represents
456
+ either the name of a property in the <code>BinaryTreeNode</code> object or the value of the <code>id</code> property in the
457
+ <code>BinaryTreeNode</code> object. This parameter is used to accumulate the results based on the specified property name. If
458
+ no value</p>
459
+ </div>
460
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
461
+ <h4 class="tsd-returns-title">Returns <a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>ResultsByProperty&lt;T&gt;</code>.</p>
462
+
463
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
464
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#DFS">DFS</a></p>
465
+ <ul>
466
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L1033">src/data-structures/binary-tree/binary-tree.ts:1033</a></li></ul></aside></li>
467
+ <li class="tsd-signature tsd-anchor-link" id="DFS.DFS-5"><span class="tsd-kind-call-signature">DFS</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</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><span class="tsd-signature-symbol">[]</span><a href="#DFS.DFS-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
468
+ <li class="tsd-description">
469
+ <div class="tsd-comment tsd-typography"><p>The DFS function performs a depth-first search traversal on a binary tree and returns the results based on the
470
+ specified pattern and node or property name.</p>
471
+ </div>
472
+ <div class="tsd-parameters">
473
+ <h4 class="tsd-parameters-title">Parameters</h4>
474
+ <ul class="tsd-parameter-list">
475
+ <li>
476
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pattern</span>: <a href="../types/DFSOrderPattern.html" class="tsd-signature-type tsd-kind-type-alias">DFSOrderPattern</a></h5>
477
+ <div class="tsd-comment tsd-typography"><p>The &quot;pattern&quot; parameter is used to specify the order in which the nodes
478
+ of a binary tree are traversed during the Depth-First Search (DFS) algorithm. It can take one of three values: &#39;in&#39;,
479
+ &#39;pre&#39;, or &#39;post&#39;.</p>
480
+ </div>
481
+ <div class="tsd-comment tsd-typography"></div></li>
482
+ <li>
483
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;count&quot;</span></h5>
484
+ <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is a string that represents
485
+ either the name of a property in the <code>BinaryTreeNode</code> object or the value of the <code>id</code> property in the
486
+ <code>BinaryTreeNode</code> object. This parameter is used to accumulate the results based on the specified property name. If
487
+ no value</p>
488
+ </div>
489
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
490
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>ResultsByProperty&lt;T&gt;</code>.</p>
491
+
492
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
493
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#DFS">DFS</a></p>
494
+ <ul>
495
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L1035">src/data-structures/binary-tree/binary-tree.ts:1035</a></li></ul></aside></li></ul></section>
496
+ <section class="tsd-panel tsd-member tsd-is-inherited"><a id="DFSIterative" class="tsd-anchor"></a>
497
+ <h3 class="tsd-anchor-link"><span>DFSIterative</span><a href="#DFSIterative" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
498
+ <ul class="tsd-signatures tsd-is-inherited">
499
+ <li class="tsd-signature tsd-anchor-link" id="DFSIterative.DFSIterative-1"><span class="tsd-kind-call-signature">DFSIterative</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><span class="tsd-signature-symbol">[]</span><a href="#DFSIterative.DFSIterative-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
500
+ <li class="tsd-description">
501
+ <div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
502
+ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because of the stack</p>
503
+ </div>
504
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4>
505
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
506
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#DFSIterative">DFSIterative</a></p>
507
+ <ul>
508
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L1077">src/data-structures/binary-tree/binary-tree.ts:1077</a></li></ul></aside></li>
509
+ <li class="tsd-signature tsd-anchor-link" id="DFSIterative.DFSIterative-2"><span class="tsd-kind-call-signature">DFSIterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</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><span class="tsd-signature-symbol">[]</span><a href="#DFSIterative.DFSIterative-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
510
+ <li class="tsd-description">
511
+ <div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
512
+ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because of the stack</p>
513
+ </div>
514
+ <div class="tsd-parameters">
515
+ <h4 class="tsd-parameters-title">Parameters</h4>
516
+ <ul class="tsd-parameter-list">
517
+ <li>
518
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pattern</span>: <a href="../types/DFSOrderPattern.html" class="tsd-signature-type tsd-kind-type-alias">DFSOrderPattern</a></h5>
519
+ <div class="tsd-comment tsd-typography"></div></li>
520
+ <li>
521
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;id&quot;</span></h5>
522
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
523
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4>
524
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
525
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#DFSIterative">DFSIterative</a></p>
526
+ <ul>
527
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L1079">src/data-structures/binary-tree/binary-tree.ts:1079</a></li></ul></aside></li>
528
+ <li class="tsd-signature tsd-anchor-link" id="DFSIterative.DFSIterative-3"><span class="tsd-kind-call-signature">DFSIterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</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="#DFSIterative.DFSIterative-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
529
+ <li class="tsd-description">
530
+ <div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
531
+ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because of the stack</p>
532
+ </div>
533
+ <div class="tsd-parameters">
534
+ <h4 class="tsd-parameters-title">Parameters</h4>
535
+ <ul class="tsd-parameter-list">
536
+ <li>
537
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pattern</span>: <a href="../types/DFSOrderPattern.html" class="tsd-signature-type tsd-kind-type-alias">DFSOrderPattern</a></h5>
538
+ <div class="tsd-comment tsd-typography"></div></li>
539
+ <li>
540
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;val&quot;</span></h5>
541
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
542
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">[]</span></h4>
543
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
544
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#DFSIterative">DFSIterative</a></p>
545
+ <ul>
546
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L1081">src/data-structures/binary-tree/binary-tree.ts:1081</a></li></ul></aside></li>
547
+ <li class="tsd-signature tsd-anchor-link" id="DFSIterative.DFSIterative-4"><span class="tsd-kind-call-signature">DFSIterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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><span class="tsd-signature-symbol">[]</span><a href="#DFSIterative.DFSIterative-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
548
+ <li class="tsd-description">
549
+ <div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
550
+ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because of the stack</p>
551
+ </div>
552
+ <div class="tsd-parameters">
553
+ <h4 class="tsd-parameters-title">Parameters</h4>
554
+ <ul class="tsd-parameter-list">
555
+ <li>
556
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pattern</span>: <a href="../types/DFSOrderPattern.html" class="tsd-signature-type tsd-kind-type-alias">DFSOrderPattern</a></h5>
557
+ <div class="tsd-comment tsd-typography"></div></li>
558
+ <li>
559
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;node&quot;</span></h5>
560
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
561
+ <h4 class="tsd-returns-title">Returns <a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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><span class="tsd-signature-symbol">[]</span></h4>
562
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
563
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#DFSIterative">DFSIterative</a></p>
564
+ <ul>
565
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L1083">src/data-structures/binary-tree/binary-tree.ts:1083</a></li></ul></aside></li>
566
+ <li class="tsd-signature tsd-anchor-link" id="DFSIterative.DFSIterative-5"><span class="tsd-kind-call-signature">DFSIterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</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><span class="tsd-signature-symbol">[]</span><a href="#DFSIterative.DFSIterative-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
567
+ <li class="tsd-description">
568
+ <div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
569
+ Space complexity of Iterative DFS equals to recursive DFS which is O(n) because of the stack</p>
570
+ </div>
571
+ <div class="tsd-parameters">
572
+ <h4 class="tsd-parameters-title">Parameters</h4>
573
+ <ul class="tsd-parameter-list">
574
+ <li>
575
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pattern</span>: <a href="../types/DFSOrderPattern.html" class="tsd-signature-type tsd-kind-type-alias">DFSOrderPattern</a></h5>
576
+ <div class="tsd-comment tsd-typography"></div></li>
577
+ <li>
578
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;count&quot;</span></h5>
579
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
580
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4>
581
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
582
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#DFSIterative">DFSIterative</a></p>
583
+ <ul>
584
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L1085">src/data-structures/binary-tree/binary-tree.ts:1085</a></li></ul></aside></li></ul></section>
585
+ <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_accumulatedByPropertyName" class="tsd-anchor"></a>
586
+ <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_accumulated<wbr/>By<wbr/>Property<wbr/>Name</span><a href="#_accumulatedByPropertyName" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
587
+ <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
588
+ <li class="tsd-signature tsd-anchor-link" id="_accumulatedByPropertyName._accumulatedByPropertyName-1"><span class="tsd-kind-call-signature">_accumulated<wbr/>By<wbr/>Property<wbr/>Name</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</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="#_accumulatedByPropertyName._accumulatedByPropertyName-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
589
+ <li class="tsd-description">
590
+ <div class="tsd-comment tsd-typography"><p>The function <code>_accumulatedByPropertyName</code> pushes a property value of a binary tree node into an array based on the
591
+ provided property name or a default property name.</p>
592
+ </div>
593
+ <div class="tsd-parameters">
594
+ <h4 class="tsd-parameters-title">Parameters</h4>
595
+ <ul class="tsd-parameter-list">
596
+ <li>
597
+ <h5><span class="tsd-kind-parameter">node</span>: <a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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>
598
+ <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is of type <code>BinaryTreeNode&lt;T&gt;</code>, which represents a node in a binary tree.</p>
599
+ </div>
600
+ <div class="tsd-comment tsd-typography"></div></li>
601
+ <li>
602
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <a href="../types/NodeOrPropertyName.html" class="tsd-signature-type tsd-kind-type-alias">NodeOrPropertyName</a></h5>
603
+ <div class="tsd-comment tsd-typography"><p>The parameter <code>nodeOrPropertyName</code> is an optional parameter that
604
+ can be either a string representing a property name or a reference to a node object. If it is a string, it specifies
605
+ the property name of the node that should be accumulated. If it is a node object, it specifies the node itself</p>
606
+ </div>
607
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
608
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
609
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
610
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_accumulatedByPropertyName">_accumulatedByPropertyName</a></p>
611
+ <ul>
612
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L1445">src/data-structures/binary-tree/binary-tree.ts:1445</a></li></ul></aside></li></ul></section>
613
+ <section class="tsd-panel tsd-member tsd-is-protected"><a id="_compare" class="tsd-anchor"></a>
614
+ <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_compare</span><a href="#_compare" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
615
+ <ul class="tsd-signatures tsd-is-protected">
616
+ <li class="tsd-signature tsd-anchor-link" id="_compare._compare-1"><span class="tsd-kind-call-signature">_compare</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">a</span>, <span class="tsd-kind-parameter">b</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../enums/CP.html" class="tsd-signature-type tsd-kind-enum">CP</a><a href="#_compare._compare-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-description">
618
+ <div class="tsd-comment tsd-typography"><p>The function compares two binary tree node IDs using a comparator function and returns whether the first ID is
619
+ greater than, less than, or equal to the second ID.</p>
620
+ </div>
621
+ <div class="tsd-parameters">
622
+ <h4 class="tsd-parameters-title">Parameters</h4>
623
+ <ul class="tsd-parameter-list">
624
+ <li>
625
+ <h5><span class="tsd-kind-parameter">a</span>: <span class="tsd-signature-type">number</span></h5>
626
+ <div class="tsd-comment tsd-typography"><p>a is a BinaryTreeNodeId, which represents the identifier of a binary tree node.</p>
627
+ </div>
628
+ <div class="tsd-comment tsd-typography"></div></li>
629
+ <li>
630
+ <h5><span class="tsd-kind-parameter">b</span>: <span class="tsd-signature-type">number</span></h5>
631
+ <div class="tsd-comment tsd-typography"><p>The parameter &quot;b&quot; in the above code refers to a BinaryTreeNodeId.</p>
632
+ </div>
633
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
634
+ <h4 class="tsd-returns-title">Returns <a href="../enums/CP.html" class="tsd-signature-type tsd-kind-enum">CP</a></h4><p>a value of type CP (ComparisonResult). The possible return values are CP.gt (greater than), CP.lt (less
635
+ than), or CP.eq (equal).</p>
636
+
637
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
638
+ <ul>
639
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/bst.ts#L489">src/data-structures/binary-tree/bst.ts:489</a></li></ul></aside></li></ul></section>
640
+ <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_getResultByPropertyName" class="tsd-anchor"></a>
641
+ <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_get<wbr/>Result<wbr/>By<wbr/>Property<wbr/>Name</span><a href="#_getResultByPropertyName" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
642
+ <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
643
+ <li class="tsd-signature tsd-anchor-link" id="_getResultByPropertyName._getResultByPropertyName-1"><span class="tsd-kind-call-signature">_get<wbr/>Result<wbr/>By<wbr/>Property<wbr/>Name</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../types/ResultsByProperty.html" class="tsd-signature-type tsd-kind-type-alias">ResultsByProperty</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="#_getResultByPropertyName._getResultByPropertyName-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
644
+ <li class="tsd-description">
645
+ <div class="tsd-comment tsd-typography"><p>The function <code>_getResultByPropertyName</code> returns different results based on the provided property name or defaulting
646
+ to &#39;id&#39;.</p>
647
+ </div>
648
+ <div class="tsd-parameters">
649
+ <h4 class="tsd-parameters-title">Parameters</h4>
650
+ <ul class="tsd-parameter-list">
651
+ <li>
652
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <a href="../types/NodeOrPropertyName.html" class="tsd-signature-type tsd-kind-type-alias">NodeOrPropertyName</a></h5>
653
+ <div class="tsd-comment tsd-typography"><p>The parameter <code>nodeOrPropertyName</code> is an optional parameter that
654
+ can accept a value of type <code>NodeOrPropertyName</code>.</p>
655
+ </div>
656
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
657
+ <h4 class="tsd-returns-title">Returns <a href="../types/ResultsByProperty.html" class="tsd-signature-type tsd-kind-type-alias">ResultsByProperty</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 returns an object of type <code>ResultsByProperty&lt;T&gt;</code>.</p>
658
+
659
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
660
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_getResultByPropertyName">_getResultByPropertyName</a></p>
661
+ <ul>
662
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L1474">src/data-structures/binary-tree/binary-tree.ts:1474</a></li></ul></aside></li></ul></section>
663
+ <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_pushByPropertyNameStopOrNot" class="tsd-anchor"></a>
664
+ <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_push<wbr/>By<wbr/>Property<wbr/>Name<wbr/>Stop<wbr/>Or<wbr/>Not</span><a href="#_pushByPropertyNameStopOrNot" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
665
+ <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
666
+ <li class="tsd-signature tsd-anchor-link" id="_pushByPropertyNameStopOrNot._pushByPropertyNameStopOrNot-1"><span class="tsd-kind-call-signature">_push<wbr/>By<wbr/>Property<wbr/>Name<wbr/>Stop<wbr/>Or<wbr/>Not</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">cur</span>, <span class="tsd-kind-parameter">result</span>, <span class="tsd-kind-parameter">nodeProperty</span>, <span class="tsd-kind-parameter">propertyName</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">onlyOne</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">boolean</span><a href="#_pushByPropertyNameStopOrNot._pushByPropertyNameStopOrNot-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
667
+ <li class="tsd-description">
668
+ <div class="tsd-comment tsd-typography"><p>The function checks if a given property of a binary tree node matches a specified value, and if so, adds the node to
669
+ a result array.</p>
670
+ </div>
671
+ <div class="tsd-parameters">
672
+ <h4 class="tsd-parameters-title">Parameters</h4>
673
+ <ul class="tsd-parameter-list">
674
+ <li>
675
+ <h5><span class="tsd-kind-parameter">cur</span>: <a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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>
676
+ <div class="tsd-comment tsd-typography"><p>The current binary tree node that is being checked.</p>
677
+ </div>
678
+ <div class="tsd-comment tsd-typography"></div></li>
679
+ <li>
680
+ <h5><span class="tsd-kind-parameter">result</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">null</span><span class="tsd-signature-symbol"> | </span><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span></h5>
681
+ <div class="tsd-comment tsd-typography"><p>An array that stores the matching nodes found during the
682
+ traversal.</p>
683
+ </div>
684
+ <div class="tsd-comment tsd-typography"></div></li>
685
+ <li>
686
+ <h5><span class="tsd-kind-parameter">nodeProperty</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
687
+ <div class="tsd-comment tsd-typography"><p>The <code>nodeProperty</code> parameter is the value that we are searching for in
688
+ the binary tree nodes. It can be either the <code>id</code>, <code>count</code>, or <code>val</code> property of the node.</p>
689
+ </div>
690
+ <div class="tsd-comment tsd-typography"></div></li>
691
+ <li>
692
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">propertyName</span>: <a href="../types/BinaryTreeNodePropertyName.html" class="tsd-signature-type tsd-kind-type-alias">BinaryTreeNodePropertyName</a></h5>
693
+ <div class="tsd-comment tsd-typography"><p>The <code>propertyName</code> parameter is an optional parameter that
694
+ specifies the property of the <code>BinaryTreeNode</code> object that you want to compare with the <code>nodeProperty</code> value. It can
695
+ be one of the following values: &#39;id&#39;, &#39;count&#39;, or &#39;val&#39;. If no <code>propertyName</code> is provided,</p>
696
+ </div>
697
+ <div class="tsd-comment tsd-typography"></div></li>
698
+ <li>
699
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">onlyOne</span>: <span class="tsd-signature-type">boolean</span></h5>
700
+ <div class="tsd-comment tsd-typography"><p>The <code>onlyOne</code> parameter is an optional boolean parameter that determines whether to
701
+ stop after finding the first matching node or continue searching for all matching nodes. If <code>onlyOne</code> is set to
702
+ <code>true</code>, the function will stop after finding the first matching node and return <code>true</code>. If `onlyOne</p>
703
+ </div>
704
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
705
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">boolean</span></h4><p>a boolean value indicating whether or not a node was pushed into the result array.</p>
706
+
707
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
708
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_pushByPropertyNameStopOrNot">_pushByPropertyNameStopOrNot</a></p>
709
+ <ul>
710
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L1408">src/data-structures/binary-tree/binary-tree.ts:1408</a></li></ul></aside></li></ul></section>
711
+ <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_resetResults" class="tsd-anchor"></a>
712
+ <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_reset<wbr/>Results</span><a href="#_resetResults" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
713
+ <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
714
+ <li class="tsd-signature tsd-anchor-link" id="_resetResults._resetResults-1"><span class="tsd-kind-call-signature">_reset<wbr/>Results</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="#_resetResults._resetResults-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
715
+ <li class="tsd-description">
716
+ <div class="tsd-comment tsd-typography"><p>The function resets the values of several arrays used for tracking visited nodes and their properties.</p>
717
+ </div>
718
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
719
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
720
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#_resetResults">_resetResults</a></p>
721
+ <ul>
722
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L1384">src/data-structures/binary-tree/binary-tree.ts:1384</a></li></ul></aside></li></ul></section>
723
+ <section class="tsd-panel tsd-member"><a id="add" class="tsd-anchor"></a>
724
+ <h3 class="tsd-anchor-link"><span>add</span><a href="#add" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
725
+ <ul class="tsd-signatures">
726
+ <li class="tsd-signature tsd-anchor-link" id="add.add-1"><span class="tsd-kind-call-signature">add</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">id</span>, <span class="tsd-kind-parameter">val</span>, <span class="tsd-kind-parameter">count</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><a href="BSTNode.html" class="tsd-signature-type tsd-kind-class">BSTNode</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="#add.add-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
727
+ <li class="tsd-description">
728
+ <div class="tsd-comment tsd-typography"><p>The <code>add</code> function inserts a new node into a binary search tree, updating the count and value of an existing node if
729
+ the ID matches, and returns the inserted node.</p>
730
+ </div>
731
+ <div class="tsd-parameters">
732
+ <h4 class="tsd-parameters-title">Parameters</h4>
733
+ <ul class="tsd-parameter-list">
734
+ <li>
735
+ <h5><span class="tsd-kind-parameter">id</span>: <span class="tsd-signature-type">number</span></h5>
736
+ <div class="tsd-comment tsd-typography"><p>The <code>id</code> parameter represents the identifier of the binary tree node. It is used to
737
+ determine the position of the node in the binary search tree.</p>
738
+ </div>
739
+ <div class="tsd-comment tsd-typography"></div></li>
740
+ <li>
741
+ <h5><span class="tsd-kind-parameter">val</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></h5>
742
+ <div class="tsd-comment tsd-typography"><p>The <code>val</code> parameter represents the value to be stored in the binary search tree node. It can
743
+ be of type <code>T</code> (the generic type) or <code>null</code>.</p>
744
+ </div>
745
+ <div class="tsd-comment tsd-typography"></div></li>
746
+ <li>
747
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">count</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 1</span></h5>
748
+ <div class="tsd-comment tsd-typography"><p>The <code>count</code> parameter represents the number of times the value should be inserted into
749
+ the binary search tree. By default, it is set to 1, meaning that if no count is specified, the value will be
750
+ inserted once.</p>
751
+ </div>
752
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
753
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="BSTNode.html" class="tsd-signature-type tsd-kind-class">BSTNode</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>add</code> returns a <code>BSTNode&lt;T&gt;</code> object or <code>null</code>.</p>
754
+
755
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
756
+ <p>Overrides <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#add">add</a></p>
757
+ <ul>
758
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/bst.ts#L53">src/data-structures/binary-tree/bst.ts:53</a></li></ul></aside></li></ul></section>
759
+ <section class="tsd-panel tsd-member tsd-is-inherited"><a id="addMany" class="tsd-anchor"></a>
760
+ <h3 class="tsd-anchor-link"><span>add<wbr/>Many</span><a href="#addMany" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
761
+ <ul class="tsd-signatures tsd-is-inherited">
762
+ <li class="tsd-signature tsd-anchor-link" id="addMany.addMany-1"><span class="tsd-kind-call-signature">add<wbr/>Many</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-symbol">(</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span><a href="#addMany.addMany-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
763
+ <li class="tsd-description">
764
+ <div class="tsd-comment tsd-typography"><p>The <code>addMany</code> function inserts multiple items into a binary tree and returns an array of the inserted nodes or
765
+ null/undefined values.</p>
766
+ </div>
767
+ <div class="tsd-parameters">
768
+ <h4 class="tsd-parameters-title">Parameters</h4>
769
+ <ul class="tsd-parameter-list">
770
+ <li>
771
+ <h5><span class="tsd-kind-parameter">data</span>: <a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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><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></h5>
772
+ <div class="tsd-comment tsd-typography"><p>The <code>data</code> parameter can be either an array of elements of type <code>T</code> or an
773
+ array of <code>BinaryTreeNode&lt;T&gt;</code> objects.</p>
774
+ </div>
775
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
776
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>addMany</code> returns an array of <code>BinaryTreeNode&lt;T&gt;</code>, <code>null</code>, or <code>undefined</code> values.</p>
777
+
778
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
779
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#addMany">addMany</a></p>
780
+ <ul>
781
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L430">src/data-structures/binary-tree/binary-tree.ts:430</a></li></ul></aside></li></ul></section>
782
+ <section class="tsd-panel tsd-member tsd-is-inherited"><a id="addTo" class="tsd-anchor"></a>
783
+ <h3 class="tsd-anchor-link"><span>add<wbr/>To</span><a href="#addTo" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
784
+ <ul class="tsd-signatures tsd-is-inherited">
785
+ <li class="tsd-signature tsd-anchor-link" id="addTo.addTo-1"><span class="tsd-kind-call-signature">add<wbr/>To</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">newNode</span>, <span class="tsd-kind-parameter">parent</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">null</span><span class="tsd-signature-symbol"> | </span><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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="#addTo.addTo-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
786
+ <li class="tsd-description">
787
+ <div class="tsd-comment tsd-typography"><p>The function inserts a new node into a binary tree as the left or right child of a given parent node.</p>
788
+ </div>
789
+ <div class="tsd-parameters">
790
+ <h4 class="tsd-parameters-title">Parameters</h4>
791
+ <ul class="tsd-parameter-list">
792
+ <li>
793
+ <h5><span class="tsd-kind-parameter">newNode</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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>
794
+ <div class="tsd-comment tsd-typography"><p>The <code>newNode</code> parameter is an instance of the <code>BinaryTreeNode</code> class or
795
+ <code>null</code>. It represents the node that needs to be inserted into the binary tree.</p>
796
+ </div>
797
+ <div class="tsd-comment tsd-typography"></div></li>
798
+ <li>
799
+ <h5><span class="tsd-kind-parameter">parent</span>: <a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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>
800
+ <div class="tsd-comment tsd-typography"><p>The <code>parent</code> parameter is a BinaryTreeNode object representing the parent node to which the new node
801
+ will be inserted as a child.</p>
802
+ </div>
803
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
804
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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 returns the newly inserted node, either as the left child or the right child of the parent node.</p>
805
+
806
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
807
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#addTo">addTo</a></p>
808
+ <ul>
809
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L390">src/data-structures/binary-tree/binary-tree.ts:390</a></li></ul></aside></li></ul></section>
810
+ <section class="tsd-panel tsd-member"><a id="allGreaterNodesAdd" class="tsd-anchor"></a>
811
+ <h3 class="tsd-anchor-link"><span>all<wbr/>Greater<wbr/>Nodes<wbr/>Add</span><a href="#allGreaterNodesAdd" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
812
+ <ul class="tsd-signatures">
813
+ <li class="tsd-signature tsd-anchor-link" id="allGreaterNodesAdd.allGreaterNodesAdd-1"><span class="tsd-kind-call-signature">all<wbr/>Greater<wbr/>Nodes<wbr/>Add</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">delta</span>, <span class="tsd-kind-parameter">propertyName</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="#allGreaterNodesAdd.allGreaterNodesAdd-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
814
+ <li class="tsd-description">
815
+ <div class="tsd-comment tsd-typography"><p>The function <code>allGreaterNodesAdd</code> updates the value of a specified property for all nodes in a binary search tree
816
+ that have a greater value than a given node.</p>
817
+ </div>
818
+ <div class="tsd-parameters">
819
+ <h4 class="tsd-parameters-title">Parameters</h4>
820
+ <ul class="tsd-parameter-list">
821
+ <li>
822
+ <h5><span class="tsd-kind-parameter">node</span>: <a href="BSTNode.html" class="tsd-signature-type tsd-kind-class">BSTNode</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>
823
+ <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is of type <code>BSTNode&lt;T&gt;</code>, which represents a node in a binary search tree. It
824
+ contains properties such as <code>id</code> and <code>count</code>.</p>
825
+ </div>
826
+ <div class="tsd-comment tsd-typography"></div></li>
827
+ <li>
828
+ <h5><span class="tsd-kind-parameter">delta</span>: <span class="tsd-signature-type">number</span></h5>
829
+ <div class="tsd-comment tsd-typography"><p>The <code>delta</code> parameter is a number that represents the amount by which the property value of
830
+ each node should be increased.</p>
831
+ </div>
832
+ <div class="tsd-comment tsd-typography"></div></li>
833
+ <li>
834
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">propertyName</span>: <a href="../types/BinaryTreeNodePropertyName.html" class="tsd-signature-type tsd-kind-type-alias">BinaryTreeNodePropertyName</a></h5>
835
+ <div class="tsd-comment tsd-typography"><p>propertyName is an optional parameter that specifies the
836
+ property of the BSTNode to be modified. It can be either &#39;id&#39; or &#39;count&#39;. If propertyName is not provided, it
837
+ defaults to &#39;id&#39;.</p>
838
+ </div>
839
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
840
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>a boolean value.</p>
841
+
842
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
843
+ <ul>
844
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/bst.ts#L345">src/data-structures/binary-tree/bst.ts:345</a></li></ul></aside></li></ul></section>
845
+ <section class="tsd-panel tsd-member"><a id="balance" class="tsd-anchor"></a>
846
+ <h3 class="tsd-anchor-link"><span>balance</span><a href="#balance" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
847
+ <ul class="tsd-signatures">
848
+ <li class="tsd-signature tsd-anchor-link" id="balance.balance-1"><span class="tsd-kind-call-signature">balance</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="#balance.balance-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
849
+ <li class="tsd-description">
850
+ <div class="tsd-comment tsd-typography"><p>The <code>balance</code> function takes a sorted array of nodes and builds a balanced binary search tree using either a
851
+ recursive or iterative approach.</p>
852
+ </div>
853
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The <code>balance()</code> function returns a boolean value.</p>
854
+
855
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
856
+ <ul>
857
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/bst.ts#L396">src/data-structures/binary-tree/bst.ts:396</a></li></ul></aside></li></ul></section>
858
+ <section class="tsd-panel tsd-member tsd-is-inherited"><a id="clear" class="tsd-anchor"></a>
859
+ <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>
860
+ <ul class="tsd-signatures tsd-is-inherited">
861
+ <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>
862
+ <li class="tsd-description">
863
+ <div class="tsd-comment tsd-typography"><p>The clear function resets the state of an object by setting its properties to their initial values.</p>
864
+ </div>
865
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
866
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
867
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#clear">clear</a></p>
868
+ <ul>
869
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L314">src/data-structures/binary-tree/binary-tree.ts:314</a></li></ul></aside></li></ul></section>
870
+ <section class="tsd-panel tsd-member"><a id="createNode" class="tsd-anchor"></a>
871
+ <h3 class="tsd-anchor-link"><span>create<wbr/>Node</span><a href="#createNode" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
872
+ <ul class="tsd-signatures">
873
+ <li class="tsd-signature tsd-anchor-link" id="createNode.createNode-1"><span class="tsd-kind-call-signature">create<wbr/>Node</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">id</span>, <span class="tsd-kind-parameter">val</span>, <span class="tsd-kind-parameter">count</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><a href="BSTNode.html" class="tsd-signature-type tsd-kind-class">BSTNode</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="#createNode.createNode-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
874
+ <li class="tsd-description">
875
+ <div class="tsd-comment tsd-typography"><p>The function creates a new binary tree node with the given id, value, and count, or returns null if the value is
876
+ null.</p>
877
+ </div>
878
+ <div class="tsd-parameters">
879
+ <h4 class="tsd-parameters-title">Parameters</h4>
880
+ <ul class="tsd-parameter-list">
881
+ <li>
882
+ <h5><span class="tsd-kind-parameter">id</span>: <span class="tsd-signature-type">number</span></h5>
883
+ <div class="tsd-comment tsd-typography"><p>The <code>id</code> parameter is the identifier for the binary tree node. It is of type
884
+ <code>BinaryTreeNodeId</code>, which could be a string or a number, depending on how you want to identify your nodes.</p>
885
+ </div>
886
+ <div class="tsd-comment tsd-typography"></div></li>
887
+ <li>
888
+ <h5><span class="tsd-kind-parameter">val</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></h5>
889
+ <div class="tsd-comment tsd-typography"><p>The <code>val</code> parameter represents the value to be stored in the binary tree node. It can be of
890
+ any type <code>T</code> or <code>null</code>.</p>
891
+ </div>
892
+ <div class="tsd-comment tsd-typography"></div></li>
893
+ <li>
894
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">count</span>: <span class="tsd-signature-type">number</span></h5>
895
+ <div class="tsd-comment tsd-typography"><p>The count parameter is an optional parameter that represents the number of occurrences of
896
+ the value in the binary tree node. It is of type number.</p>
897
+ </div>
898
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
899
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="BSTNode.html" class="tsd-signature-type tsd-kind-class">BSTNode</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 function <code>createNode</code> returns a <code>BinaryTreeNode&lt;T&gt;</code> object if the <code>val</code> parameter is not null.
900
+ Otherwise, it returns null.</p>
901
+
902
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
903
+ <p>Overrides <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#createNode">createNode</a></p>
904
+ <ul>
905
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/bst.ts#L37">src/data-structures/binary-tree/bst.ts:37</a></li></ul></aside></li></ul></section>
906
+ <section class="tsd-panel tsd-member tsd-is-inherited"><a id="fill" class="tsd-anchor"></a>
907
+ <h3 class="tsd-anchor-link"><span>fill</span><a href="#fill" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
908
+ <ul class="tsd-signatures tsd-is-inherited">
909
+ <li class="tsd-signature tsd-anchor-link" id="fill.fill-1"><span class="tsd-kind-call-signature">fill</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">boolean</span><a href="#fill.fill-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
910
+ <li class="tsd-description">
911
+ <div class="tsd-comment tsd-typography"><p>The <code>fill</code> function clears the current data and inserts new data, returning a boolean indicating if the insertion
912
+ was successful.</p>
913
+ </div>
914
+ <div class="tsd-parameters">
915
+ <h4 class="tsd-parameters-title">Parameters</h4>
916
+ <ul class="tsd-parameter-list">
917
+ <li>
918
+ <h5><span class="tsd-kind-parameter">data</span>: <a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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><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></h5>
919
+ <div class="tsd-comment tsd-typography"><p>The <code>data</code> parameter can be either an array of elements of type <code>T</code> or an
920
+ array of <code>BinaryTreeNode&lt;T&gt;</code> objects.</p>
921
+ </div>
922
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
923
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The method is returning a boolean value.</p>
924
+
925
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
926
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#fill">fill</a></p>
927
+ <ul>
928
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L477">src/data-structures/binary-tree/binary-tree.ts:477</a></li></ul></aside></li></ul></section>
929
+ <section class="tsd-panel tsd-member"><a id="get" class="tsd-anchor"></a>
930
+ <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>
931
+ <ul class="tsd-signatures">
932
+ <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">nodeProperty</span>, <span class="tsd-kind-parameter">propertyName</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><a href="BSTNode.html" class="tsd-signature-type tsd-kind-class">BSTNode</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="#get.get-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
933
+ <li class="tsd-description">
934
+ <div class="tsd-comment tsd-typography"><p>The <code>get</code> function returns the first node in a binary search tree that matches the given property value or name.</p>
935
+ </div>
936
+ <div class="tsd-parameters">
937
+ <h4 class="tsd-parameters-title">Parameters</h4>
938
+ <ul class="tsd-parameter-list">
939
+ <li>
940
+ <h5><span class="tsd-kind-parameter">nodeProperty</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
941
+ <div class="tsd-comment tsd-typography"><p>The <code>nodeProperty</code> parameter can be either a <code>BinaryTreeNodeId</code> or a
942
+ generic type <code>T</code>. It represents the value of the property that you want to search for in the binary search tree.</p>
943
+ </div>
944
+ <div class="tsd-comment tsd-typography"></div></li>
945
+ <li>
946
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">propertyName</span>: <a href="../types/BinaryTreeNodePropertyName.html" class="tsd-signature-type tsd-kind-type-alias">BinaryTreeNodePropertyName</a></h5>
947
+ <div class="tsd-comment tsd-typography"><p>The <code>propertyName</code> parameter is an optional parameter that
948
+ specifies the property name to use for searching the binary search tree nodes. If not provided, it defaults to
949
+ <code>&#39;id&#39;</code>.</p>
950
+ </div>
951
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
952
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="BSTNode.html" class="tsd-signature-type tsd-kind-class">BSTNode</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 BSTNode<T> object or null.</p>
953
+
954
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
955
+ <p>Overrides <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#get">get</a></p>
956
+ <ul>
957
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/bst.ts#L127">src/data-structures/binary-tree/bst.ts:127</a></li></ul></aside></li></ul></section>
958
+ <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getCount" class="tsd-anchor"></a>
959
+ <h3 class="tsd-anchor-link"><span>get<wbr/>Count</span><a href="#getCount" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
960
+ <ul class="tsd-signatures tsd-is-inherited">
961
+ <li class="tsd-signature tsd-anchor-link" id="getCount.getCount-1"><span class="tsd-kind-call-signature">get<wbr/>Count</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="#getCount.getCount-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
962
+ <li class="tsd-description">
963
+ <div class="tsd-comment tsd-typography"><p>Starting from TypeScript version 5.0 and onwards, the use of distinct access modifiers for Getters and Setters is not permitted. As an alternative, to ensure compatibility, it is necessary to adopt a Java-style approach for Setters (using the same name as the property) while utilizing separate method names for Getters.</p>
964
+ </div>
965
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4>
966
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
967
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#getCount">getCount</a></p>
968
+ <ul>
969
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L291">src/data-structures/binary-tree/binary-tree.ts:291</a></li></ul></aside></li></ul></section>
970
+ <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getDepth" class="tsd-anchor"></a>
971
+ <h3 class="tsd-anchor-link"><span>get<wbr/>Depth</span><a href="#getDepth" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
972
+ <ul class="tsd-signatures tsd-is-inherited">
973
+ <li class="tsd-signature tsd-anchor-link" id="getDepth.getDepth-1"><span class="tsd-kind-call-signature">get<wbr/>Depth</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">number</span><a href="#getDepth.getDepth-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
974
+ <li class="tsd-description">
975
+ <div class="tsd-comment tsd-typography"><p>The function calculates the depth of a binary tree node by traversing its parent nodes.</p>
976
+ </div>
977
+ <div class="tsd-parameters">
978
+ <h4 class="tsd-parameters-title">Parameters</h4>
979
+ <ul class="tsd-parameter-list">
980
+ <li>
981
+ <h5><span class="tsd-kind-parameter">node</span>: <a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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>
982
+ <div class="tsd-comment tsd-typography"><p>BinaryTreeNode<T> - This is the node for which we want to calculate the depth. It is a generic type,
983
+ meaning it can represent any type of data that we want to store in the node.</p>
984
+ </div>
985
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
986
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>The depth of the given binary tree node.</p>
987
+
988
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
989
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#getDepth">getDepth</a></p>
990
+ <ul>
991
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L535">src/data-structures/binary-tree/binary-tree.ts:535</a></li></ul></aside></li></ul></section>
992
+ <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getHeight" class="tsd-anchor"></a>
993
+ <h3 class="tsd-anchor-link"><span>get<wbr/>Height</span><a href="#getHeight" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
994
+ <ul class="tsd-signatures tsd-is-inherited">
995
+ <li class="tsd-signature tsd-anchor-link" id="getHeight.getHeight-1"><span class="tsd-kind-call-signature">get<wbr/>Height</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">beginRoot</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="#getHeight.getHeight-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
996
+ <li class="tsd-description">
997
+ <div class="tsd-comment tsd-typography"><p>The <code>getHeight</code> function calculates the maximum height of a binary tree using either a recursive or iterative
998
+ approach.</p>
999
+ </div>
1000
+ <div class="tsd-parameters">
1001
+ <h4 class="tsd-parameters-title">Parameters</h4>
1002
+ <ul class="tsd-parameter-list">
1003
+ <li>
1004
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">beginRoot</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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>
1005
+ <div class="tsd-comment tsd-typography"><p>The <code>beginRoot</code> parameter is an optional parameter of type
1006
+ <code>BinaryTreeNode&lt;T&gt; | null</code>. It represents the starting node from which to calculate the height of the binary tree.
1007
+ If no value is provided for <code>beginRoot</code>, the function will use the <code>root</code> property of the class instance as</p>
1008
+ </div>
1009
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
1010
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>the height of the binary tree.</p>
1011
+
1012
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1013
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#getHeight">getHeight</a></p>
1014
+ <ul>
1015
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L552">src/data-structures/binary-tree/binary-tree.ts:552</a></li></ul></aside></li></ul></section>
1016
+ <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getLeftMost" class="tsd-anchor"></a>
1017
+ <h3 class="tsd-anchor-link"><span>get<wbr/>Left<wbr/>Most</span><a href="#getLeftMost" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
1018
+ <ul class="tsd-signatures tsd-is-inherited">
1019
+ <li class="tsd-signature tsd-anchor-link" id="getLeftMost.getLeftMost-1"><span class="tsd-kind-call-signature">get<wbr/>Left<wbr/>Most</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><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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="#getLeftMost.getLeftMost-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1020
+ <li class="tsd-description">
1021
+ <div class="tsd-comment tsd-typography"><p>The <code>getLeftMost</code> function returns the leftmost node in a binary tree, either recursively or iteratively using tail
1022
+ recursion optimization.</p>
1023
+ </div>
1024
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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>getLeftMost</code> function returns the leftmost node in a binary tree.</p>
1025
+
1026
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1027
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#getLeftMost">getLeftMost</a></p>
1028
+ <ul>
1029
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L739">src/data-structures/binary-tree/binary-tree.ts:739</a></li></ul></aside></li>
1030
+ <li class="tsd-signature tsd-anchor-link" id="getLeftMost.getLeftMost-2"><span class="tsd-kind-call-signature">get<wbr/>Left<wbr/>Most</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="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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="#getLeftMost.getLeftMost-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1031
+ <li class="tsd-description">
1032
+ <div class="tsd-comment tsd-typography"><p>The <code>getLeftMost</code> function returns the leftmost node in a binary tree, either recursively or iteratively using tail
1033
+ recursion optimization.</p>
1034
+ </div>
1035
+ <div class="tsd-parameters">
1036
+ <h4 class="tsd-parameters-title">Parameters</h4>
1037
+ <ul class="tsd-parameter-list">
1038
+ <li>
1039
+ <h5><span class="tsd-kind-parameter">node</span>: <a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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>
1040
+ <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is an optional parameter of type <code>BinaryTreeNode&lt;T&gt; | null</code>. It represents the starting node from which to find the leftmost node in a binary tree. If no node is
1041
+ provided, the function will use the root node of the binary tree.</p>
1042
+ </div>
1043
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
1044
+ <h4 class="tsd-returns-title">Returns <a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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>getLeftMost</code> function returns the leftmost node in a binary tree.</p>
1045
+
1046
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1047
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#getLeftMost">getLeftMost</a></p>
1048
+ <ul>
1049
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L741">src/data-structures/binary-tree/binary-tree.ts:741</a></li></ul></aside></li></ul></section>
1050
+ <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getMinHeight" class="tsd-anchor"></a>
1051
+ <h3 class="tsd-anchor-link"><span>get<wbr/>Min<wbr/>Height</span><a href="#getMinHeight" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
1052
+ <ul class="tsd-signatures tsd-is-inherited">
1053
+ <li class="tsd-signature tsd-anchor-link" id="getMinHeight.getMinHeight-1"><span class="tsd-kind-call-signature">get<wbr/>Min<wbr/>Height</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">beginRoot</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="#getMinHeight.getMinHeight-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1054
+ <li class="tsd-description">
1055
+ <div class="tsd-comment tsd-typography"><p>The <code>getMinHeight</code> function calculates the minimum height of a binary tree using either a recursive or iterative
1056
+ approach.</p>
1057
+ </div>
1058
+ <div class="tsd-parameters">
1059
+ <h4 class="tsd-parameters-title">Parameters</h4>
1060
+ <ul class="tsd-parameter-list">
1061
+ <li>
1062
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">beginRoot</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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>
1063
+ <div class="tsd-comment tsd-typography"><p>The <code>beginRoot</code> parameter is an optional parameter of type
1064
+ <code>BinaryTreeNode&lt;T&gt; | null</code>. It represents the starting node from which to calculate the minimum height of the binary
1065
+ tree. If no value is provided for <code>beginRoot</code>, the function will use the root node of the binary tree.</p>
1066
+ </div>
1067
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
1068
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>The function <code>getMinHeight</code> returns the minimum height of the binary tree.</p>
1069
+
1070
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1071
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#getMinHeight">getMinHeight</a></p>
1072
+ <ul>
1073
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L601">src/data-structures/binary-tree/binary-tree.ts:601</a></li></ul></aside></li></ul></section>
1074
+ <section class="tsd-panel tsd-member"><a id="getNodes" class="tsd-anchor"></a>
1075
+ <h3 class="tsd-anchor-link"><span>get<wbr/>Nodes</span><a href="#getNodes" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
1076
+ <ul class="tsd-signatures">
1077
+ <li class="tsd-signature tsd-anchor-link" id="getNodes.getNodes-1"><span class="tsd-kind-call-signature">get<wbr/>Nodes</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeProperty</span>, <span class="tsd-kind-parameter">propertyName</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">onlyOne</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="BSTNode.html" class="tsd-signature-type tsd-kind-class">BSTNode</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><span class="tsd-signature-symbol">[]</span><a href="#getNodes.getNodes-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1078
+ <li class="tsd-description">
1079
+ <div class="tsd-comment tsd-typography"><p>The function <code>getNodes</code> returns an array of binary search tree nodes that match a given property value, with the
1080
+ option to specify the property name and whether to return only one node.</p>
1081
+ </div>
1082
+ <div class="tsd-parameters">
1083
+ <h4 class="tsd-parameters-title">Parameters</h4>
1084
+ <ul class="tsd-parameter-list">
1085
+ <li>
1086
+ <h5><span class="tsd-kind-parameter">nodeProperty</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
1087
+ <div class="tsd-comment tsd-typography"><p>The <code>nodeProperty</code> parameter can be either a <code>BinaryTreeNodeId</code> or a
1088
+ generic type <code>T</code>. It represents the property value that you want to search for in the binary search tree.</p>
1089
+ </div>
1090
+ <div class="tsd-comment tsd-typography"></div></li>
1091
+ <li>
1092
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">propertyName</span>: <a href="../types/BinaryTreeNodePropertyName.html" class="tsd-signature-type tsd-kind-type-alias">BinaryTreeNodePropertyName</a></h5>
1093
+ <div class="tsd-comment tsd-typography"><p>The <code>propertyName</code> parameter is an optional parameter that
1094
+ specifies the property of the nodes to compare with the <code>nodeProperty</code> parameter. If not provided, it defaults to
1095
+ <code>&#39;id&#39;</code>.</p>
1096
+ </div>
1097
+ <div class="tsd-comment tsd-typography"></div></li>
1098
+ <li>
1099
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">onlyOne</span>: <span class="tsd-signature-type">boolean</span></h5>
1100
+ <div class="tsd-comment tsd-typography"><p>A boolean value indicating whether to return only one node that matches the given
1101
+ nodeProperty. If set to true, the function will stop traversing the tree and return the first matching node. If set
1102
+ to false or not provided, the function will return all nodes that match the given nodeProperty.</p>
1103
+ </div>
1104
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
1105
+ <h4 class="tsd-returns-title">Returns <a href="BSTNode.html" class="tsd-signature-type tsd-kind-class">BSTNode</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><span class="tsd-signature-symbol">[]</span></h4><p>an array of BSTNode<T> objects.</p>
1106
+
1107
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1108
+ <p>Overrides <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#getNodes">getNodes</a></p>
1109
+ <ul>
1110
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/bst.ts#L217">src/data-structures/binary-tree/bst.ts:217</a></li></ul></aside></li></ul></section>
1111
+ <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getPathToRoot" class="tsd-anchor"></a>
1112
+ <h3 class="tsd-anchor-link"><span>get<wbr/>Path<wbr/>To<wbr/>Root</span><a href="#getPathToRoot" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
1113
+ <ul class="tsd-signatures tsd-is-inherited">
1114
+ <li class="tsd-signature tsd-anchor-link" id="getPathToRoot.getPathToRoot-1"><span class="tsd-kind-call-signature">get<wbr/>Path<wbr/>To<wbr/>Root</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="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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><span class="tsd-signature-symbol">[]</span><a href="#getPathToRoot.getPathToRoot-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1115
+ <li class="tsd-description">
1116
+ <div class="tsd-comment tsd-typography"><p>The function getPathToRoot returns an array of BinaryTreeNode objects representing the path from a given node to the
1117
+ root of a binary tree.</p>
1118
+ </div>
1119
+ <div class="tsd-parameters">
1120
+ <h4 class="tsd-parameters-title">Parameters</h4>
1121
+ <ul class="tsd-parameter-list">
1122
+ <li>
1123
+ <h5><span class="tsd-kind-parameter">node</span>: <a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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>
1124
+ <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object.</p>
1125
+ </div>
1126
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
1127
+ <h4 class="tsd-returns-title">Returns <a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>getPathToRoot</code> returns an array of <code>BinaryTreeNode&lt;T&gt;</code> objects, representing the path from
1128
+ the given <code>node</code> to the root of the binary tree.</p>
1129
+
1130
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1131
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#getPathToRoot">getPathToRoot</a></p>
1132
+ <ul>
1133
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L729">src/data-structures/binary-tree/binary-tree.ts:729</a></li></ul></aside></li></ul></section>
1134
+ <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getPredecessor" class="tsd-anchor"></a>
1135
+ <h3 class="tsd-anchor-link"><span>get<wbr/>Predecessor</span><a href="#getPredecessor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
1136
+ <ul class="tsd-signatures tsd-is-inherited">
1137
+ <li class="tsd-signature tsd-anchor-link" id="getPredecessor.getPredecessor-1"><span class="tsd-kind-call-signature">get<wbr/>Predecessor</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="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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="#getPredecessor.getPredecessor-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1138
+ <li class="tsd-description">
1139
+ <div class="tsd-comment tsd-typography"><p>The function returns the predecessor of a given node in a binary tree.</p>
1140
+ </div>
1141
+ <div class="tsd-parameters">
1142
+ <h4 class="tsd-parameters-title">Parameters</h4>
1143
+ <ul class="tsd-parameter-list">
1144
+ <li>
1145
+ <h5><span class="tsd-kind-parameter">node</span>: <a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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>
1146
+ <div class="tsd-comment tsd-typography"><p>The parameter <code>node</code> is a BinaryTreeNode object, representing a node in a binary tree.</p>
1147
+ </div>
1148
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
1149
+ <h4 class="tsd-returns-title">Returns <a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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 predecessor of the given node in a binary tree.</p>
1150
+
1151
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1152
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#getPredecessor">getPredecessor</a></p>
1153
+ <ul>
1154
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L1259">src/data-structures/binary-tree/binary-tree.ts:1259</a></li></ul></aside></li></ul></section>
1155
+ <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getRightMost" class="tsd-anchor"></a>
1156
+ <h3 class="tsd-anchor-link"><span>get<wbr/>Right<wbr/>Most</span><a href="#getRightMost" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
1157
+ <ul class="tsd-signatures tsd-is-inherited">
1158
+ <li class="tsd-signature tsd-anchor-link" id="getRightMost.getRightMost-1"><span class="tsd-kind-call-signature">get<wbr/>Right<wbr/>Most</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><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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="#getRightMost.getRightMost-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1159
+ <li class="tsd-description">
1160
+ <div class="tsd-comment tsd-typography"><p>The <code>getRightMost</code> function returns the rightmost node in a binary tree, either recursively or iteratively using
1161
+ tail recursion optimization.</p>
1162
+ </div>
1163
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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>getRightMost</code> function returns the rightmost node in a binary tree.</p>
1164
+
1165
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1166
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#getRightMost">getRightMost</a></p>
1167
+ <ul>
1168
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L774">src/data-structures/binary-tree/binary-tree.ts:774</a></li></ul></aside></li>
1169
+ <li class="tsd-signature tsd-anchor-link" id="getRightMost.getRightMost-2"><span class="tsd-kind-call-signature">get<wbr/>Right<wbr/>Most</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="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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="#getRightMost.getRightMost-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1170
+ <li class="tsd-description">
1171
+ <div class="tsd-comment tsd-typography"><p>The <code>getRightMost</code> function returns the rightmost node in a binary tree, either recursively or iteratively using
1172
+ tail recursion optimization.</p>
1173
+ </div>
1174
+ <div class="tsd-parameters">
1175
+ <h4 class="tsd-parameters-title">Parameters</h4>
1176
+ <ul class="tsd-parameter-list">
1177
+ <li>
1178
+ <h5><span class="tsd-kind-parameter">node</span>: <a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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>
1179
+ <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is an optional parameter of type <code>BinaryTreeNode&lt;T&gt; | null</code>. It represents the starting node from which to find the rightmost node in a binary tree. If no node is
1180
+ provided, the function will use the root node of the binary tree.</p>
1181
+ </div>
1182
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
1183
+ <h4 class="tsd-returns-title">Returns <a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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>getRightMost</code> function returns the rightmost node in a binary tree.</p>
1184
+
1185
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1186
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#getRightMost">getRightMost</a></p>
1187
+ <ul>
1188
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L776">src/data-structures/binary-tree/binary-tree.ts:776</a></li></ul></aside></li></ul></section>
1189
+ <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getRoot" class="tsd-anchor"></a>
1190
+ <h3 class="tsd-anchor-link"><span>get<wbr/>Root</span><a href="#getRoot" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
1191
+ <ul class="tsd-signatures tsd-is-inherited">
1192
+ <li class="tsd-signature tsd-anchor-link" id="getRoot.getRoot-1"><span class="tsd-kind-call-signature">get<wbr/>Root</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><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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="#getRoot.getRoot-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1193
+ <li class="tsd-description">
1194
+ <div class="tsd-comment tsd-typography"><p>Starting from TypeScript version 5.0 and onwards, the use of distinct access modifiers for Getters and Setters is not permitted. As an alternative, to ensure compatibility, it is necessary to adopt a Java-style approach for Getters (using the same name as the property) while utilizing separate method names for Setters.</p>
1195
+ </div>
1196
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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 either a BinaryTreeNode object of type T or null.</p>
1197
+
1198
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1199
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#getRoot">getRoot</a></p>
1200
+ <ul>
1201
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L277">src/data-structures/binary-tree/binary-tree.ts:277</a></li></ul></aside></li></ul></section>
1202
+ <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getSize" class="tsd-anchor"></a>
1203
+ <h3 class="tsd-anchor-link"><span>get<wbr/>Size</span><a href="#getSize" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
1204
+ <ul class="tsd-signatures tsd-is-inherited">
1205
+ <li class="tsd-signature tsd-anchor-link" id="getSize.getSize-1"><span class="tsd-kind-call-signature">get<wbr/>Size</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="#getSize.getSize-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1206
+ <li class="tsd-description">
1207
+ <div class="tsd-comment tsd-typography"><p>Starting from TypeScript version 5.0 and onwards, the use of distinct access modifiers for Getters and Setters is not permitted. As an alternative, to ensure compatibility, it is necessary to adopt a Java-style approach for Setters (using the same name as the property) while utilizing separate method names for Getters.</p>
1208
+ </div>
1209
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4>
1210
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1211
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#getSize">getSize</a></p>
1212
+ <ul>
1213
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L284">src/data-structures/binary-tree/binary-tree.ts:284</a></li></ul></aside></li></ul></section>
1214
+ <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getSubTreeSizeAndCount" class="tsd-anchor"></a>
1215
+ <h3 class="tsd-anchor-link"><span>get<wbr/>Sub<wbr/>Tree<wbr/>Size<wbr/>And<wbr/>Count</span><a href="#getSubTreeSizeAndCount" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
1216
+ <ul class="tsd-signatures tsd-is-inherited">
1217
+ <li class="tsd-signature tsd-anchor-link" id="getSubTreeSizeAndCount.getSubTreeSizeAndCount-1"><span class="tsd-kind-call-signature">get<wbr/>Sub<wbr/>Tree<wbr/>Size<wbr/>And<wbr/>Count</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">subTreeRoot</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><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span><a href="#getSubTreeSizeAndCount.getSubTreeSizeAndCount-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1218
+ <li class="tsd-description">
1219
+ <div class="tsd-comment tsd-typography"><p>The function calculates the size and count of a subtree in a binary tree using either recursive or iterative
1220
+ traversal.</p>
1221
+ </div>
1222
+ <div class="tsd-parameters">
1223
+ <h4 class="tsd-parameters-title">Parameters</h4>
1224
+ <ul class="tsd-parameter-list">
1225
+ <li>
1226
+ <h5><span class="tsd-kind-parameter">subTreeRoot</span>: <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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>
1227
+ <div class="tsd-comment tsd-typography"><p>The <code>subTreeRoot</code> parameter is the root node of a binary
1228
+ tree.</p>
1229
+ </div>
1230
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
1231
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span></h4><p>The function <code>getSubTreeSizeAndCount</code> returns an array <code>[number, number]</code>. The first element of the array
1232
+ represents the size of the subtree, and the second element represents the count of the nodes in the subtree.</p>
1233
+
1234
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1235
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#getSubTreeSizeAndCount">getSubTreeSizeAndCount</a></p>
1236
+ <ul>
1237
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L855">src/data-structures/binary-tree/binary-tree.ts:855</a></li></ul></aside></li></ul></section>
1238
+ <section class="tsd-panel tsd-member tsd-is-inherited"><a id="has" class="tsd-anchor"></a>
1239
+ <h3 class="tsd-anchor-link"><span>has</span><a href="#has" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
1240
+ <ul class="tsd-signatures tsd-is-inherited">
1241
+ <li class="tsd-signature tsd-anchor-link" id="has.has-1"><span class="tsd-kind-call-signature">has</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeProperty</span>, <span class="tsd-kind-parameter">propertyName</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="#has.has-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1242
+ <li class="tsd-description">
1243
+ <div class="tsd-comment tsd-typography"><p>The function checks if a binary tree node has a specific property or if any node in the tree has a specific
1244
+ property.</p>
1245
+ </div>
1246
+ <div class="tsd-parameters">
1247
+ <h4 class="tsd-parameters-title">Parameters</h4>
1248
+ <ul class="tsd-parameter-list">
1249
+ <li>
1250
+ <h5><span class="tsd-kind-parameter">nodeProperty</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
1251
+ <div class="tsd-comment tsd-typography"><p>The <code>nodeProperty</code> parameter can be either a <code>BinaryTreeNodeId</code> or a
1252
+ generic type <code>T</code>. It represents the property of a binary tree node that you want to check.</p>
1253
+ </div>
1254
+ <div class="tsd-comment tsd-typography"></div></li>
1255
+ <li>
1256
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">propertyName</span>: <a href="../types/BinaryTreeNodePropertyName.html" class="tsd-signature-type tsd-kind-type-alias">BinaryTreeNodePropertyName</a></h5>
1257
+ <div class="tsd-comment tsd-typography"><p>The <code>propertyName</code> parameter is an optional parameter that
1258
+ specifies the name of the property to check for in the nodes.</p>
1259
+ </div>
1260
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
1261
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>a boolean value.</p>
1262
+
1263
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1264
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#has">has</a></p>
1265
+ <ul>
1266
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L704">src/data-structures/binary-tree/binary-tree.ts:704</a></li></ul></aside></li></ul></section>
1267
+ <section class="tsd-panel tsd-member"><a id="isAVLBalanced" class="tsd-anchor"></a>
1268
+ <h3 class="tsd-anchor-link"><span>isAVLBalanced</span><a href="#isAVLBalanced" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
1269
+ <ul class="tsd-signatures">
1270
+ <li class="tsd-signature tsd-anchor-link" id="isAVLBalanced.isAVLBalanced-1"><span class="tsd-kind-call-signature">isAVLBalanced</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="#isAVLBalanced.isAVLBalanced-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1271
+ <li class="tsd-description">
1272
+ <div class="tsd-comment tsd-typography"><p>The function <code>isAVLBalanced</code> checks if a binary search tree is balanced according to the AVL tree property.</p>
1273
+ </div>
1274
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The function <code>isAVLBalanced()</code> returns a boolean value. It returns <code>true</code> if the binary search tree (BST)
1275
+ is balanced according to the AVL tree property, and <code>false</code> otherwise.</p>
1276
+
1277
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1278
+ <ul>
1279
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/bst.ts#L437">src/data-structures/binary-tree/bst.ts:437</a></li></ul></aside></li></ul></section>
1280
+ <section class="tsd-panel tsd-member tsd-is-inherited"><a id="isBST" class="tsd-anchor"></a>
1281
+ <h3 class="tsd-anchor-link"><span>isBST</span><a href="#isBST" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
1282
+ <ul class="tsd-signatures tsd-is-inherited">
1283
+ <li class="tsd-signature tsd-anchor-link" id="isBST.isBST-1"><span class="tsd-kind-call-signature">isBST</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-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#isBST.isBST-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1284
+ <li class="tsd-description">
1285
+ <div class="tsd-comment tsd-typography"><p>The <code>isBST</code> function checks if a binary tree is a binary search tree.</p>
1286
+ </div>
1287
+ <div class="tsd-parameters">
1288
+ <h4 class="tsd-parameters-title">Parameters</h4>
1289
+ <ul class="tsd-parameter-list">
1290
+ <li>
1291
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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>
1292
+ <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is an optional parameter of type <code>BinaryTreeNode&lt;T&gt; | null</code>. It represents the root node of the binary search tree (BST) that we want to check for validity. If no node
1293
+ is provided, the function will default to using the root node of the BST instance that</p>
1294
+ </div>
1295
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
1296
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The <code>isBST</code> function returns a boolean value. It returns <code>true</code> if the binary tree is a valid binary search
1297
+ tree, and <code>false</code> otherwise.</p>
1298
+
1299
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1300
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#isBST">isBST</a></p>
1301
+ <ul>
1302
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L818">src/data-structures/binary-tree/binary-tree.ts:818</a></li></ul></aside></li></ul></section>
1303
+ <section class="tsd-panel tsd-member tsd-is-inherited"><a id="isBalanced" class="tsd-anchor"></a>
1304
+ <h3 class="tsd-anchor-link"><span>is<wbr/>Balanced</span><a href="#isBalanced" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
1305
+ <ul class="tsd-signatures tsd-is-inherited">
1306
+ <li class="tsd-signature tsd-anchor-link" id="isBalanced.isBalanced-1"><span class="tsd-kind-call-signature">is<wbr/>Balanced</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">beginRoot</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="#isBalanced.isBalanced-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1307
+ <li class="tsd-description">
1308
+ <div class="tsd-comment tsd-typography"><p>The function checks if a binary tree is balanced by comparing the minimum height and the maximum height of the tree.</p>
1309
+ </div>
1310
+ <div class="tsd-parameters">
1311
+ <h4 class="tsd-parameters-title">Parameters</h4>
1312
+ <ul class="tsd-parameter-list">
1313
+ <li>
1314
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">beginRoot</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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>
1315
+ <div class="tsd-comment tsd-typography"><p>The <code>beginRoot</code> parameter is the root node of a binary tree. It is
1316
+ of type <code>BinaryTreeNode&lt;T&gt; | null</code>, which means it can either be a <code>BinaryTreeNode</code> object or <code>null</code>.</p>
1317
+ </div>
1318
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
1319
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The method is returning a boolean value.</p>
1320
+
1321
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1322
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#isBalanced">isBalanced</a></p>
1323
+ <ul>
1324
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L649">src/data-structures/binary-tree/binary-tree.ts:649</a></li></ul></aside></li></ul></section>
1325
+ <section class="tsd-panel tsd-member tsd-is-inherited"><a id="isEmpty" class="tsd-anchor"></a>
1326
+ <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>
1327
+ <ul class="tsd-signatures tsd-is-inherited">
1328
+ <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>
1329
+ <li class="tsd-description">
1330
+ <div class="tsd-comment tsd-typography"><p>The function checks if the size of an object is equal to zero and returns a boolean value.</p>
1331
+ </div>
1332
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>A boolean value indicating whether the size of the object is 0 or not.</p>
1333
+
1334
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1335
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#isEmpty">isEmpty</a></p>
1336
+ <ul>
1337
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L325">src/data-structures/binary-tree/binary-tree.ts:325</a></li></ul></aside></li></ul></section>
1338
+ <section class="tsd-panel tsd-member"><a id="lastKey" class="tsd-anchor"></a>
1339
+ <h3 class="tsd-anchor-link"><span>last<wbr/>Key</span><a href="#lastKey" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
1340
+ <ul class="tsd-signatures">
1341
+ <li class="tsd-signature tsd-anchor-link" id="lastKey.lastKey-1"><span class="tsd-kind-call-signature">last<wbr/>Key</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="#lastKey.lastKey-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1342
+ <li class="tsd-description">
1343
+ <div class="tsd-comment tsd-typography"><p>The function returns the id of the rightmost node if the comparison between two values is less than, the id of the
1344
+ leftmost node if the comparison is greater than, and the id of the rightmost node otherwise.</p>
1345
+ </div>
1346
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>The function <code>lastKey()</code> returns the ID of the rightmost node in a binary tree. If the comparison between
1347
+ the first two elements in the tree is less than, it returns the ID of the rightmost node. If the comparison is
1348
+ greater than, it returns the ID of the leftmost node. Otherwise, it also returns the ID of the rightmost node. If
1349
+ there are no nodes in</p>
1350
+
1351
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1352
+ <ul>
1353
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/bst.ts#L140">src/data-structures/binary-tree/bst.ts:140</a></li></ul></aside></li></ul></section>
1354
+ <section class="tsd-panel tsd-member"><a id="lesserSum" class="tsd-anchor"></a>
1355
+ <h3 class="tsd-anchor-link"><span>lesser<wbr/>Sum</span><a href="#lesserSum" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
1356
+ <ul class="tsd-signatures">
1357
+ <li class="tsd-signature tsd-anchor-link" id="lesserSum.lesserSum-1"><span class="tsd-kind-call-signature">lesser<wbr/>Sum</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">id</span>, <span class="tsd-kind-parameter">propertyName</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="#lesserSum.lesserSum-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1358
+ <li class="tsd-description">
1359
+ <div class="tsd-comment tsd-typography"><p>The <code>lesserSum</code> function calculates the sum of a specified property in all nodes with an ID less than a given ID in
1360
+ a binary search tree.</p>
1361
+ </div>
1362
+ <div class="tsd-parameters">
1363
+ <h4 class="tsd-parameters-title">Parameters</h4>
1364
+ <ul class="tsd-parameter-list">
1365
+ <li>
1366
+ <h5><span class="tsd-kind-parameter">id</span>: <span class="tsd-signature-type">number</span></h5>
1367
+ <div class="tsd-comment tsd-typography"><p>The <code>id</code> parameter is the identifier of the binary tree node for which you want to
1368
+ calculate the lesser sum.</p>
1369
+ </div>
1370
+ <div class="tsd-comment tsd-typography"></div></li>
1371
+ <li>
1372
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">propertyName</span>: <a href="../types/BinaryTreeNodePropertyName.html" class="tsd-signature-type tsd-kind-type-alias">BinaryTreeNodePropertyName</a></h5>
1373
+ <div class="tsd-comment tsd-typography"><p>The <code>propertyName</code> parameter is an optional parameter that
1374
+ specifies the property of the binary tree node to use for calculating the sum. If not provided, it defaults to &#39;id&#39;.</p>
1375
+ </div>
1376
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
1377
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>The function <code>lesserSum</code> returns a number, which represents the sum of the values of the nodes in the
1378
+ binary search tree that have a property value lesser than the given <code>id</code>.</p>
1379
+
1380
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1381
+ <ul>
1382
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/bst.ts#L268">src/data-structures/binary-tree/bst.ts:268</a></li></ul></aside></li></ul></section>
1383
+ <section class="tsd-panel tsd-member tsd-is-inherited"><a id="levelIterative" class="tsd-anchor"></a>
1384
+ <h3 class="tsd-anchor-link"><span>level<wbr/>Iterative</span><a href="#levelIterative" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
1385
+ <ul class="tsd-signatures tsd-is-inherited">
1386
+ <li class="tsd-signature tsd-anchor-link" id="levelIterative.levelIterative-1"><span class="tsd-kind-call-signature">level<wbr/>Iterative</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">number</span><span class="tsd-signature-symbol">[]</span><a href="#levelIterative.levelIterative-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1387
+ <li class="tsd-description">
1388
+ <div class="tsd-comment tsd-typography"><p>The <code>levelIterative</code> function performs a level-order traversal on a binary tree and returns the values of the nodes
1389
+ in an array, based on a specified property name.</p>
1390
+ </div>
1391
+ <div class="tsd-parameters">
1392
+ <h4 class="tsd-parameters-title">Parameters</h4>
1393
+ <ul class="tsd-parameter-list">
1394
+ <li>
1395
+ <h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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>
1396
+ <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
1397
+ node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
1398
+ the tree is used as the starting node.</p>
1399
+ </div>
1400
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
1401
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>levelIterative</code> returns an object of type <code>ResultsByProperty&lt;T&gt;</code>.</p>
1402
+
1403
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1404
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#levelIterative">levelIterative</a></p>
1405
+ <ul>
1406
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L1136">src/data-structures/binary-tree/binary-tree.ts:1136</a></li></ul></aside></li>
1407
+ <li class="tsd-signature tsd-anchor-link" id="levelIterative.levelIterative-2"><span class="tsd-kind-call-signature">level<wbr/>Iterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</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><span class="tsd-signature-symbol">[]</span><a href="#levelIterative.levelIterative-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1408
+ <li class="tsd-description">
1409
+ <div class="tsd-comment tsd-typography"><p>The <code>levelIterative</code> function performs a level-order traversal on a binary tree and returns the values of the nodes
1410
+ in an array, based on a specified property name.</p>
1411
+ </div>
1412
+ <div class="tsd-parameters">
1413
+ <h4 class="tsd-parameters-title">Parameters</h4>
1414
+ <ul class="tsd-parameter-list">
1415
+ <li>
1416
+ <h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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>
1417
+ <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
1418
+ node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
1419
+ the tree is used as the starting node.</p>
1420
+ </div>
1421
+ <div class="tsd-comment tsd-typography"></div></li>
1422
+ <li>
1423
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;id&quot;</span></h5>
1424
+ <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is an optional parameter that
1425
+ can be either a <code>BinaryTreeNode</code> property name or the string <code>&#39;id&#39;</code>. If a property name is provided, the function
1426
+ will accumulate results based on that property. If no property name is provided, the function will default to
1427
+ accumulating results</p>
1428
+ </div>
1429
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
1430
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>levelIterative</code> returns an object of type <code>ResultsByProperty&lt;T&gt;</code>.</p>
1431
+
1432
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1433
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#levelIterative">levelIterative</a></p>
1434
+ <ul>
1435
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L1138">src/data-structures/binary-tree/binary-tree.ts:1138</a></li></ul></aside></li>
1436
+ <li class="tsd-signature tsd-anchor-link" id="levelIterative.levelIterative-3"><span class="tsd-kind-call-signature">level<wbr/>Iterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</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="#levelIterative.levelIterative-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1437
+ <li class="tsd-description">
1438
+ <div class="tsd-comment tsd-typography"><p>The <code>levelIterative</code> function performs a level-order traversal on a binary tree and returns the values of the nodes
1439
+ in an array, based on a specified property name.</p>
1440
+ </div>
1441
+ <div class="tsd-parameters">
1442
+ <h4 class="tsd-parameters-title">Parameters</h4>
1443
+ <ul class="tsd-parameter-list">
1444
+ <li>
1445
+ <h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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>
1446
+ <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
1447
+ node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
1448
+ the tree is used as the starting node.</p>
1449
+ </div>
1450
+ <div class="tsd-comment tsd-typography"></div></li>
1451
+ <li>
1452
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;val&quot;</span></h5>
1453
+ <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is an optional parameter that
1454
+ can be either a <code>BinaryTreeNode</code> property name or the string <code>&#39;id&#39;</code>. If a property name is provided, the function
1455
+ will accumulate results based on that property. If no property name is provided, the function will default to
1456
+ accumulating results</p>
1457
+ </div>
1458
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
1459
+ <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 function <code>levelIterative</code> returns an object of type <code>ResultsByProperty&lt;T&gt;</code>.</p>
1460
+
1461
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1462
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#levelIterative">levelIterative</a></p>
1463
+ <ul>
1464
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L1140">src/data-structures/binary-tree/binary-tree.ts:1140</a></li></ul></aside></li>
1465
+ <li class="tsd-signature tsd-anchor-link" id="levelIterative.levelIterative-4"><span class="tsd-kind-call-signature">level<wbr/>Iterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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><span class="tsd-signature-symbol">[]</span><a href="#levelIterative.levelIterative-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1466
+ <li class="tsd-description">
1467
+ <div class="tsd-comment tsd-typography"><p>The <code>levelIterative</code> function performs a level-order traversal on a binary tree and returns the values of the nodes
1468
+ in an array, based on a specified property name.</p>
1469
+ </div>
1470
+ <div class="tsd-parameters">
1471
+ <h4 class="tsd-parameters-title">Parameters</h4>
1472
+ <ul class="tsd-parameter-list">
1473
+ <li>
1474
+ <h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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>
1475
+ <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
1476
+ node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
1477
+ the tree is used as the starting node.</p>
1478
+ </div>
1479
+ <div class="tsd-comment tsd-typography"></div></li>
1480
+ <li>
1481
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;node&quot;</span></h5>
1482
+ <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is an optional parameter that
1483
+ can be either a <code>BinaryTreeNode</code> property name or the string <code>&#39;id&#39;</code>. If a property name is provided, the function
1484
+ will accumulate results based on that property. If no property name is provided, the function will default to
1485
+ accumulating results</p>
1486
+ </div>
1487
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
1488
+ <h4 class="tsd-returns-title">Returns <a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>levelIterative</code> returns an object of type <code>ResultsByProperty&lt;T&gt;</code>.</p>
1489
+
1490
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1491
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#levelIterative">levelIterative</a></p>
1492
+ <ul>
1493
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L1142">src/data-structures/binary-tree/binary-tree.ts:1142</a></li></ul></aside></li>
1494
+ <li class="tsd-signature tsd-anchor-link" id="levelIterative.levelIterative-5"><span class="tsd-kind-call-signature">level<wbr/>Iterative</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</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><span class="tsd-signature-symbol">[]</span><a href="#levelIterative.levelIterative-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1495
+ <li class="tsd-description">
1496
+ <div class="tsd-comment tsd-typography"><p>The <code>levelIterative</code> function performs a level-order traversal on a binary tree and returns the values of the nodes
1497
+ in an array, based on a specified property name.</p>
1498
+ </div>
1499
+ <div class="tsd-parameters">
1500
+ <h4 class="tsd-parameters-title">Parameters</h4>
1501
+ <ul class="tsd-parameter-list">
1502
+ <li>
1503
+ <h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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>
1504
+ <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
1505
+ node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
1506
+ the tree is used as the starting node.</p>
1507
+ </div>
1508
+ <div class="tsd-comment tsd-typography"></div></li>
1509
+ <li>
1510
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;count&quot;</span></h5>
1511
+ <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is an optional parameter that
1512
+ can be either a <code>BinaryTreeNode</code> property name or the string <code>&#39;id&#39;</code>. If a property name is provided, the function
1513
+ will accumulate results based on that property. If no property name is provided, the function will default to
1514
+ accumulating results</p>
1515
+ </div>
1516
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
1517
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>levelIterative</code> returns an object of type <code>ResultsByProperty&lt;T&gt;</code>.</p>
1518
+
1519
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1520
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#levelIterative">levelIterative</a></p>
1521
+ <ul>
1522
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L1144">src/data-structures/binary-tree/binary-tree.ts:1144</a></li></ul></aside></li></ul></section>
1523
+ <section class="tsd-panel tsd-member tsd-is-inherited"><a id="listLevels" class="tsd-anchor"></a>
1524
+ <h3 class="tsd-anchor-link"><span>list<wbr/>Levels</span><a href="#listLevels" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
1525
+ <ul class="tsd-signatures tsd-is-inherited">
1526
+ <li class="tsd-signature tsd-anchor-link" id="listLevels.listLevels-1"><span class="tsd-kind-call-signature">list<wbr/>Levels</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">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span><a href="#listLevels.listLevels-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1527
+ <li class="tsd-description">
1528
+ <div class="tsd-comment tsd-typography"><p>The <code>listLevels</code> function collects nodes from a binary tree by a specified property and organizes them into levels.</p>
1529
+ </div>
1530
+ <div class="tsd-parameters">
1531
+ <h4 class="tsd-parameters-title">Parameters</h4>
1532
+ <ul class="tsd-parameter-list">
1533
+ <li>
1534
+ <h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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>
1535
+ <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
1536
+ root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
1537
+ </div>
1538
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
1539
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>listLevels</code> returns a 2D array of <code>ResultByProperty&lt;T&gt;</code> objects.</p>
1540
+
1541
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1542
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#listLevels">listLevels</a></p>
1543
+ <ul>
1544
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L1182">src/data-structures/binary-tree/binary-tree.ts:1182</a></li></ul></aside></li>
1545
+ <li class="tsd-signature tsd-anchor-link" id="listLevels.listLevels-2"><span class="tsd-kind-call-signature">list<wbr/>Levels</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</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><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span><a href="#listLevels.listLevels-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1546
+ <li class="tsd-description">
1547
+ <div class="tsd-comment tsd-typography"><p>The <code>listLevels</code> function collects nodes from a binary tree by a specified property and organizes them into levels.</p>
1548
+ </div>
1549
+ <div class="tsd-parameters">
1550
+ <h4 class="tsd-parameters-title">Parameters</h4>
1551
+ <ul class="tsd-parameter-list">
1552
+ <li>
1553
+ <h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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>
1554
+ <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
1555
+ root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
1556
+ </div>
1557
+ <div class="tsd-comment tsd-typography"></div></li>
1558
+ <li>
1559
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;id&quot;</span></h5>
1560
+ <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is an optional parameter that
1561
+ specifies the property of the <code>BinaryTreeNode</code> object to collect at each level. It can be one of the following
1562
+ values:</p>
1563
+ </div>
1564
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
1565
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>listLevels</code> returns a 2D array of <code>ResultByProperty&lt;T&gt;</code> objects.</p>
1566
+
1567
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1568
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#listLevels">listLevels</a></p>
1569
+ <ul>
1570
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L1184">src/data-structures/binary-tree/binary-tree.ts:1184</a></li></ul></aside></li>
1571
+ <li class="tsd-signature tsd-anchor-link" id="listLevels.listLevels-3"><span class="tsd-kind-call-signature">list<wbr/>Levels</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</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><span class="tsd-signature-symbol">[]</span><a href="#listLevels.listLevels-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1572
+ <li class="tsd-description">
1573
+ <div class="tsd-comment tsd-typography"><p>The <code>listLevels</code> function collects nodes from a binary tree by a specified property and organizes them into levels.</p>
1574
+ </div>
1575
+ <div class="tsd-parameters">
1576
+ <h4 class="tsd-parameters-title">Parameters</h4>
1577
+ <ul class="tsd-parameter-list">
1578
+ <li>
1579
+ <h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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>
1580
+ <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
1581
+ root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
1582
+ </div>
1583
+ <div class="tsd-comment tsd-typography"></div></li>
1584
+ <li>
1585
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;val&quot;</span></h5>
1586
+ <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is an optional parameter that
1587
+ specifies the property of the <code>BinaryTreeNode</code> object to collect at each level. It can be one of the following
1588
+ values:</p>
1589
+ </div>
1590
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
1591
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>listLevels</code> returns a 2D array of <code>ResultByProperty&lt;T&gt;</code> objects.</p>
1592
+
1593
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1594
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#listLevels">listLevels</a></p>
1595
+ <ul>
1596
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L1186">src/data-structures/binary-tree/binary-tree.ts:1186</a></li></ul></aside></li>
1597
+ <li class="tsd-signature tsd-anchor-link" id="listLevels.listLevels-4"><span class="tsd-kind-call-signature">list<wbr/>Levels</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span><a href="#listLevels.listLevels-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1598
+ <li class="tsd-description">
1599
+ <div class="tsd-comment tsd-typography"><p>The <code>listLevels</code> function collects nodes from a binary tree by a specified property and organizes them into levels.</p>
1600
+ </div>
1601
+ <div class="tsd-parameters">
1602
+ <h4 class="tsd-parameters-title">Parameters</h4>
1603
+ <ul class="tsd-parameter-list">
1604
+ <li>
1605
+ <h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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>
1606
+ <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
1607
+ root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
1608
+ </div>
1609
+ <div class="tsd-comment tsd-typography"></div></li>
1610
+ <li>
1611
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;node&quot;</span></h5>
1612
+ <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is an optional parameter that
1613
+ specifies the property of the <code>BinaryTreeNode</code> object to collect at each level. It can be one of the following
1614
+ values:</p>
1615
+ </div>
1616
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
1617
+ <h4 class="tsd-returns-title">Returns <a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>listLevels</code> returns a 2D array of <code>ResultByProperty&lt;T&gt;</code> objects.</p>
1618
+
1619
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1620
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#listLevels">listLevels</a></p>
1621
+ <ul>
1622
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L1188">src/data-structures/binary-tree/binary-tree.ts:1188</a></li></ul></aside></li>
1623
+ <li class="tsd-signature tsd-anchor-link" id="listLevels.listLevels-5"><span class="tsd-kind-call-signature">list<wbr/>Levels</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">node</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</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><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span><a href="#listLevels.listLevels-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1624
+ <li class="tsd-description">
1625
+ <div class="tsd-comment tsd-typography"><p>The <code>listLevels</code> function collects nodes from a binary tree by a specified property and organizes them into levels.</p>
1626
+ </div>
1627
+ <div class="tsd-parameters">
1628
+ <h4 class="tsd-parameters-title">Parameters</h4>
1629
+ <ul class="tsd-parameter-list">
1630
+ <li>
1631
+ <h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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>
1632
+ <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
1633
+ root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
1634
+ </div>
1635
+ <div class="tsd-comment tsd-typography"></div></li>
1636
+ <li>
1637
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;count&quot;</span></h5>
1638
+ <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is an optional parameter that
1639
+ specifies the property of the <code>BinaryTreeNode</code> object to collect at each level. It can be one of the following
1640
+ values:</p>
1641
+ </div>
1642
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
1643
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>listLevels</code> returns a 2D array of <code>ResultByProperty&lt;T&gt;</code> objects.</p>
1644
+
1645
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1646
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#listLevels">listLevels</a></p>
1647
+ <ul>
1648
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L1190">src/data-structures/binary-tree/binary-tree.ts:1190</a></li></ul></aside></li></ul></section>
1649
+ <section class="tsd-panel tsd-member tsd-is-inherited"><a id="morris" class="tsd-anchor"></a>
1650
+ <h3 class="tsd-anchor-link"><span>morris</span><a href="#morris" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
1651
+ <ul class="tsd-signatures tsd-is-inherited">
1652
+ <li class="tsd-signature tsd-anchor-link" id="morris.morris-1"><span class="tsd-kind-call-signature">morris</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><span class="tsd-signature-symbol">[]</span><a href="#morris.morris-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1653
+ <li class="tsd-description">
1654
+ <div class="tsd-comment tsd-typography"><p>The <code>morris</code> function performs an in-order, pre-order, or post-order traversal on a binary tree using the Morris
1655
+ traversal algorithm and returns the results based on the specified property name.
1656
+ The time complexity of Morris traversal is O(n), it&#39;s may slower than others
1657
+ The space complexity Morris traversal is O(1) because no using stack</p>
1658
+ </div>
1659
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>morris</code> returns an object of type <code>ResultsByProperty&lt;T&gt;</code>.</p>
1660
+
1661
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1662
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#morris">morris</a></p>
1663
+ <ul>
1664
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L1273">src/data-structures/binary-tree/binary-tree.ts:1273</a></li></ul></aside></li>
1665
+ <li class="tsd-signature tsd-anchor-link" id="morris.morris-2"><span class="tsd-kind-call-signature">morris</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</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><span class="tsd-signature-symbol">[]</span><a href="#morris.morris-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1666
+ <li class="tsd-description">
1667
+ <div class="tsd-comment tsd-typography"><p>The <code>morris</code> function performs an in-order, pre-order, or post-order traversal on a binary tree using the Morris
1668
+ traversal algorithm and returns the results based on the specified property name.
1669
+ The time complexity of Morris traversal is O(n), it&#39;s may slower than others
1670
+ The space complexity Morris traversal is O(1) because no using stack</p>
1671
+ </div>
1672
+ <div class="tsd-parameters">
1673
+ <h4 class="tsd-parameters-title">Parameters</h4>
1674
+ <ul class="tsd-parameter-list">
1675
+ <li>
1676
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pattern</span>: <a href="../types/DFSOrderPattern.html" class="tsd-signature-type tsd-kind-type-alias">DFSOrderPattern</a></h5>
1677
+ <div class="tsd-comment tsd-typography"><p>The <code>pattern</code> parameter is an optional parameter that determines the
1678
+ traversal pattern of the binary tree. It can have one of three values:</p>
1679
+ </div>
1680
+ <div class="tsd-comment tsd-typography"></div></li>
1681
+ <li>
1682
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;id&quot;</span></h5>
1683
+ <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is used to specify the
1684
+ property of the nodes that you want to retrieve in the results. It can be either the node itself or the name of the
1685
+ property. If not provided, it defaults to <code>&#39;id&#39;</code>.</p>
1686
+ </div>
1687
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
1688
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>morris</code> returns an object of type <code>ResultsByProperty&lt;T&gt;</code>.</p>
1689
+
1690
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1691
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#morris">morris</a></p>
1692
+ <ul>
1693
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L1275">src/data-structures/binary-tree/binary-tree.ts:1275</a></li></ul></aside></li>
1694
+ <li class="tsd-signature tsd-anchor-link" id="morris.morris-3"><span class="tsd-kind-call-signature">morris</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</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="#morris.morris-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1695
+ <li class="tsd-description">
1696
+ <div class="tsd-comment tsd-typography"><p>The <code>morris</code> function performs an in-order, pre-order, or post-order traversal on a binary tree using the Morris
1697
+ traversal algorithm and returns the results based on the specified property name.
1698
+ The time complexity of Morris traversal is O(n), it&#39;s may slower than others
1699
+ The space complexity Morris traversal is O(1) because no using stack</p>
1700
+ </div>
1701
+ <div class="tsd-parameters">
1702
+ <h4 class="tsd-parameters-title">Parameters</h4>
1703
+ <ul class="tsd-parameter-list">
1704
+ <li>
1705
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pattern</span>: <a href="../types/DFSOrderPattern.html" class="tsd-signature-type tsd-kind-type-alias">DFSOrderPattern</a></h5>
1706
+ <div class="tsd-comment tsd-typography"><p>The <code>pattern</code> parameter is an optional parameter that determines the
1707
+ traversal pattern of the binary tree. It can have one of three values:</p>
1708
+ </div>
1709
+ <div class="tsd-comment tsd-typography"></div></li>
1710
+ <li>
1711
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;val&quot;</span></h5>
1712
+ <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is used to specify the
1713
+ property of the nodes that you want to retrieve in the results. It can be either the node itself or the name of the
1714
+ property. If not provided, it defaults to <code>&#39;id&#39;</code>.</p>
1715
+ </div>
1716
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
1717
+ <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 function <code>morris</code> returns an object of type <code>ResultsByProperty&lt;T&gt;</code>.</p>
1718
+
1719
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1720
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#morris">morris</a></p>
1721
+ <ul>
1722
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L1277">src/data-structures/binary-tree/binary-tree.ts:1277</a></li></ul></aside></li>
1723
+ <li class="tsd-signature tsd-anchor-link" id="morris.morris-4"><span class="tsd-kind-call-signature">morris</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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><span class="tsd-signature-symbol">[]</span><a href="#morris.morris-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1724
+ <li class="tsd-description">
1725
+ <div class="tsd-comment tsd-typography"><p>The <code>morris</code> function performs an in-order, pre-order, or post-order traversal on a binary tree using the Morris
1726
+ traversal algorithm and returns the results based on the specified property name.
1727
+ The time complexity of Morris traversal is O(n), it&#39;s may slower than others
1728
+ The space complexity Morris traversal is O(1) because no using stack</p>
1729
+ </div>
1730
+ <div class="tsd-parameters">
1731
+ <h4 class="tsd-parameters-title">Parameters</h4>
1732
+ <ul class="tsd-parameter-list">
1733
+ <li>
1734
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pattern</span>: <a href="../types/DFSOrderPattern.html" class="tsd-signature-type tsd-kind-type-alias">DFSOrderPattern</a></h5>
1735
+ <div class="tsd-comment tsd-typography"><p>The <code>pattern</code> parameter is an optional parameter that determines the
1736
+ traversal pattern of the binary tree. It can have one of three values:</p>
1737
+ </div>
1738
+ <div class="tsd-comment tsd-typography"></div></li>
1739
+ <li>
1740
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;node&quot;</span></h5>
1741
+ <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is used to specify the
1742
+ property of the nodes that you want to retrieve in the results. It can be either the node itself or the name of the
1743
+ property. If not provided, it defaults to <code>&#39;id&#39;</code>.</p>
1744
+ </div>
1745
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
1746
+ <h4 class="tsd-returns-title">Returns <a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>morris</code> returns an object of type <code>ResultsByProperty&lt;T&gt;</code>.</p>
1747
+
1748
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1749
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#morris">morris</a></p>
1750
+ <ul>
1751
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L1279">src/data-structures/binary-tree/binary-tree.ts:1279</a></li></ul></aside></li>
1752
+ <li class="tsd-signature tsd-anchor-link" id="morris.morris-5"><span class="tsd-kind-call-signature">morris</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">pattern</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">nodeOrPropertyName</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><span class="tsd-signature-symbol">[]</span><a href="#morris.morris-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1753
+ <li class="tsd-description">
1754
+ <div class="tsd-comment tsd-typography"><p>The <code>morris</code> function performs an in-order, pre-order, or post-order traversal on a binary tree using the Morris
1755
+ traversal algorithm and returns the results based on the specified property name.
1756
+ The time complexity of Morris traversal is O(n), it&#39;s may slower than others
1757
+ The space complexity Morris traversal is O(1) because no using stack</p>
1758
+ </div>
1759
+ <div class="tsd-parameters">
1760
+ <h4 class="tsd-parameters-title">Parameters</h4>
1761
+ <ul class="tsd-parameter-list">
1762
+ <li>
1763
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pattern</span>: <a href="../types/DFSOrderPattern.html" class="tsd-signature-type tsd-kind-type-alias">DFSOrderPattern</a></h5>
1764
+ <div class="tsd-comment tsd-typography"><p>The <code>pattern</code> parameter is an optional parameter that determines the
1765
+ traversal pattern of the binary tree. It can have one of three values:</p>
1766
+ </div>
1767
+ <div class="tsd-comment tsd-typography"></div></li>
1768
+ <li>
1769
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;count&quot;</span></h5>
1770
+ <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is used to specify the
1771
+ property of the nodes that you want to retrieve in the results. It can be either the node itself or the name of the
1772
+ property. If not provided, it defaults to <code>&#39;id&#39;</code>.</p>
1773
+ </div>
1774
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
1775
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>morris</code> returns an object of type <code>ResultsByProperty&lt;T&gt;</code>.</p>
1776
+
1777
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1778
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#morris">morris</a></p>
1779
+ <ul>
1780
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L1281">src/data-structures/binary-tree/binary-tree.ts:1281</a></li></ul></aside></li></ul></section>
1781
+ <section class="tsd-panel tsd-member"><a id="remove" class="tsd-anchor"></a>
1782
+ <h3 class="tsd-anchor-link"><span>remove</span><a href="#remove" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
1783
+ <ul class="tsd-signatures">
1784
+ <li class="tsd-signature tsd-anchor-link" id="remove.remove-1"><span class="tsd-kind-call-signature">remove</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">id</span>, <span class="tsd-kind-parameter">ignoreCount</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../types/BSTDeletedResult.html" class="tsd-signature-type tsd-kind-type-alias">BSTDeletedResult</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><span class="tsd-signature-symbol">[]</span><a href="#remove.remove-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1785
+ <li class="tsd-description">
1786
+ <div class="tsd-comment tsd-typography"><p>The <code>remove</code> function in this TypeScript code removes a node from a binary search tree and returns information about
1787
+ the deleted node and any nodes that need to be balanced.</p>
1788
+ </div>
1789
+ <div class="tsd-parameters">
1790
+ <h4 class="tsd-parameters-title">Parameters</h4>
1791
+ <ul class="tsd-parameter-list">
1792
+ <li>
1793
+ <h5><span class="tsd-kind-parameter">id</span>: <span class="tsd-signature-type">number</span></h5>
1794
+ <div class="tsd-comment tsd-typography"><p>The <code>id</code> parameter is the identifier of the binary tree node that needs to be removed
1795
+ from the binary search tree.</p>
1796
+ </div>
1797
+ <div class="tsd-comment tsd-typography"></div></li>
1798
+ <li>
1799
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">ignoreCount</span>: <span class="tsd-signature-type">boolean</span></h5>
1800
+ <div class="tsd-comment tsd-typography"><p>A boolean flag indicating whether to ignore the count of the node being removed. If
1801
+ set to true, the count of the node will not be considered and the node will be removed regardless of its count. If
1802
+ set to false or not provided, the count of the node will be taken into account and the</p>
1803
+ </div>
1804
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
1805
+ <h4 class="tsd-returns-title">Returns <a href="../types/BSTDeletedResult.html" class="tsd-signature-type tsd-kind-type-alias">BSTDeletedResult</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><span class="tsd-signature-symbol">[]</span></h4><p>an array of <code>BSTDeletedResult&lt;T&gt;</code> objects.</p>
1806
+
1807
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1808
+ <p>Overrides <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#remove">remove</a></p>
1809
+ <ul>
1810
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/bst.ts#L156">src/data-structures/binary-tree/bst.ts:156</a></li></ul></aside></li></ul></section>
1811
+ <section class="tsd-panel tsd-member tsd-is-inherited"><a id="subTreeAdd" class="tsd-anchor"></a>
1812
+ <h3 class="tsd-anchor-link"><span>sub<wbr/>Tree<wbr/>Add</span><a href="#subTreeAdd" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
1813
+ <ul class="tsd-signatures tsd-is-inherited">
1814
+ <li class="tsd-signature tsd-anchor-link" id="subTreeAdd.subTreeAdd-1"><span class="tsd-kind-call-signature">sub<wbr/>Tree<wbr/>Add</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">subTreeRoot</span>, <span class="tsd-kind-parameter">delta</span>, <span class="tsd-kind-parameter">propertyName</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="#subTreeAdd.subTreeAdd-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1815
+ <li class="tsd-description">
1816
+ <div class="tsd-comment tsd-typography"><p>The function <code>subTreeAdd</code> adds a specified delta value to a property of each node in a binary tree.</p>
1817
+ </div>
1818
+ <div class="tsd-parameters">
1819
+ <h4 class="tsd-parameters-title">Parameters</h4>
1820
+ <ul class="tsd-parameter-list">
1821
+ <li>
1822
+ <h5><span class="tsd-kind-parameter">subTreeRoot</span>: <a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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>
1823
+ <div class="tsd-comment tsd-typography"><p>The <code>subTreeRoot</code> parameter is the root node of the subtree where the values will be modified.</p>
1824
+ </div>
1825
+ <div class="tsd-comment tsd-typography"></div></li>
1826
+ <li>
1827
+ <h5><span class="tsd-kind-parameter">delta</span>: <span class="tsd-signature-type">number</span></h5>
1828
+ <div class="tsd-comment tsd-typography"><p>The <code>delta</code> parameter is a number that represents the amount by which the property value of
1829
+ each node in the subtree should be increased or decreased.</p>
1830
+ </div>
1831
+ <div class="tsd-comment tsd-typography"></div></li>
1832
+ <li>
1833
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">propertyName</span>: <a href="../types/BinaryTreeNodePropertyName.html" class="tsd-signature-type tsd-kind-type-alias">BinaryTreeNodePropertyName</a></h5>
1834
+ <div class="tsd-comment tsd-typography"><p>The <code>propertyName</code> parameter is an optional parameter that
1835
+ specifies the property of the <code>BinaryTreeNode</code> that should be modified. It defaults to <code>&#39;id&#39;</code> if not provided.</p>
1836
+ </div>
1837
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
1838
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>a boolean value, which is <code>true</code>.</p>
1839
+
1840
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1841
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#subTreeAdd">subTreeAdd</a></p>
1842
+ <ul>
1843
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L950">src/data-structures/binary-tree/binary-tree.ts:950</a></li></ul></aside></li></ul></section>
1844
+ <section class="tsd-panel tsd-member tsd-is-inherited"><a id="subTreeSum" class="tsd-anchor"></a>
1845
+ <h3 class="tsd-anchor-link"><span>sub<wbr/>Tree<wbr/>Sum</span><a href="#subTreeSum" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
1846
+ <ul class="tsd-signatures tsd-is-inherited">
1847
+ <li class="tsd-signature tsd-anchor-link" id="subTreeSum.subTreeSum-1"><span class="tsd-kind-call-signature">sub<wbr/>Tree<wbr/>Sum</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">subTreeRoot</span>, <span class="tsd-kind-parameter">propertyName</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="#subTreeSum.subTreeSum-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1848
+ <li class="tsd-description">
1849
+ <div class="tsd-comment tsd-typography"><p>The function <code>subTreeSum</code> calculates the sum of a specified property in a binary tree, either recursively or
1850
+ iteratively.</p>
1851
+ </div>
1852
+ <div class="tsd-parameters">
1853
+ <h4 class="tsd-parameters-title">Parameters</h4>
1854
+ <ul class="tsd-parameter-list">
1855
+ <li>
1856
+ <h5><span class="tsd-kind-parameter">subTreeRoot</span>: <a href="BinaryTreeNode.html" class="tsd-signature-type tsd-kind-class">BinaryTreeNode</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>
1857
+ <div class="tsd-comment tsd-typography"><p>The subTreeRoot parameter is the root node of the subtree for which you want to calculate the
1858
+ sum.</p>
1859
+ </div>
1860
+ <div class="tsd-comment tsd-typography"></div></li>
1861
+ <li>
1862
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">propertyName</span>: <a href="../types/BinaryTreeNodePropertyName.html" class="tsd-signature-type tsd-kind-type-alias">BinaryTreeNodePropertyName</a></h5>
1863
+ <div class="tsd-comment tsd-typography"><p>The <code>propertyName</code> parameter is an optional parameter that
1864
+ specifies the property of the <code>BinaryTreeNode</code> object to use for calculating the sum. If <code>propertyName</code> is not
1865
+ provided, it defaults to <code>&#39;val&#39;</code>.</p>
1866
+ </div>
1867
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
1868
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>a number, which is the sum of the values of the nodes in the subtree rooted at <code>subTreeRoot</code>.</p>
1869
+
1870
+ <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1871
+ <p>Inherited from <a href="BinaryTree.html">BinaryTree</a>.<a href="BinaryTree.html#subTreeSum">subTreeSum</a></p>
1872
+ <ul>
1873
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/422c24c/src/data-structures/binary-tree/binary-tree.ts#L894">src/data-structures/binary-tree/binary-tree.ts:894</a></li></ul></aside></li></ul></section></section></div>
1874
+ <div class="col-sidebar">
1875
+ <div class="page-menu">
1876
+ <div class="tsd-navigation settings">
1877
+ <details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
1878
+ <h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)" id="icon-chevronDown"></path></svg>Settings</h3></summary>
1879
+ <div class="tsd-accordion-details">
1880
+ <div class="tsd-filter-visibility">
1881
+ <h4 class="uppercase">Member Visibility</h4><form>
1882
+ <ul id="tsd-filter-options">
1883
+ <li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
1884
+ <li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li>
1885
+ <li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
1886
+ <li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
1887
+ <div class="tsd-theme-toggle">
1888
+ <h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
1889
+ <details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary">
1890
+ <h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="#icon-chevronDown"></use></svg>On This Page</h3></summary>
1891
+ <div class="tsd-accordion-details">
1892
+ <ul>
1893
+ <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>
1894
+ <li><a href="#_comparator" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_comparator</span></a></li>
1895
+ <li><a href="#_count" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_count</span></a></li>
1896
+ <li><a href="#_loopType" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_loop<wbr/>Type</span></a></li>
1897
+ <li><a href="#_root" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_root</span></a></li>
1898
+ <li><a href="#_size" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_size</span></a></li>
1899
+ <li><a href="#_visitedCount" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_visited<wbr/>Count</span></a></li>
1900
+ <li><a href="#_visitedId" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_visited<wbr/>Id</span></a></li>
1901
+ <li><a href="#_visitedLeftSum" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_visited<wbr/>Left<wbr/>Sum</span></a></li>
1902
+ <li><a href="#_visitedNode" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_visited<wbr/>Node</span></a></li>
1903
+ <li><a href="#_visitedVal" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_visited<wbr/>Val</span></a></li>
1904
+ <li><a href="#count" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>count</span></a></li>
1905
+ <li><a href="#root" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>root</span></a></li>
1906
+ <li><a href="#size" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>size</span></a></li>
1907
+ <li><a href="#BFS" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>BFS</span></a></li>
1908
+ <li><a href="#DFS" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>DFS</span></a></li>
1909
+ <li><a href="#DFSIterative" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>DFSIterative</span></a></li>
1910
+ <li><a href="#_accumulatedByPropertyName" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_accumulated<wbr/>By<wbr/>Property<wbr/>Name</span></a></li>
1911
+ <li><a href="#_compare" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_compare</span></a></li>
1912
+ <li><a href="#_getResultByPropertyName" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_get<wbr/>Result<wbr/>By<wbr/>Property<wbr/>Name</span></a></li>
1913
+ <li><a href="#_pushByPropertyNameStopOrNot" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_push<wbr/>By<wbr/>Property<wbr/>Name<wbr/>Stop<wbr/>Or<wbr/>Not</span></a></li>
1914
+ <li><a href="#_resetResults" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_reset<wbr/>Results</span></a></li>
1915
+ <li><a href="#add" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>add</span></a></li>
1916
+ <li><a href="#addMany" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>add<wbr/>Many</span></a></li>
1917
+ <li><a href="#addTo" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>add<wbr/>To</span></a></li>
1918
+ <li><a href="#allGreaterNodesAdd" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>all<wbr/>Greater<wbr/>Nodes<wbr/>Add</span></a></li>
1919
+ <li><a href="#balance" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>balance</span></a></li>
1920
+ <li><a href="#clear" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>clear</span></a></li>
1921
+ <li><a href="#createNode" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>create<wbr/>Node</span></a></li>
1922
+ <li><a href="#fill" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>fill</span></a></li>
1923
+ <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>
1924
+ <li><a href="#getCount" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Count</span></a></li>
1925
+ <li><a href="#getDepth" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Depth</span></a></li>
1926
+ <li><a href="#getHeight" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Height</span></a></li>
1927
+ <li><a href="#getLeftMost" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Left<wbr/>Most</span></a></li>
1928
+ <li><a href="#getMinHeight" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Min<wbr/>Height</span></a></li>
1929
+ <li><a href="#getNodes" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Nodes</span></a></li>
1930
+ <li><a href="#getPathToRoot" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Path<wbr/>To<wbr/>Root</span></a></li>
1931
+ <li><a href="#getPredecessor" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Predecessor</span></a></li>
1932
+ <li><a href="#getRightMost" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Right<wbr/>Most</span></a></li>
1933
+ <li><a href="#getRoot" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Root</span></a></li>
1934
+ <li><a href="#getSize" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Size</span></a></li>
1935
+ <li><a href="#getSubTreeSizeAndCount" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Sub<wbr/>Tree<wbr/>Size<wbr/>And<wbr/>Count</span></a></li>
1936
+ <li><a href="#has" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>has</span></a></li>
1937
+ <li><a href="#isAVLBalanced" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>isAVLBalanced</span></a></li>
1938
+ <li><a href="#isBST" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>isBST</span></a></li>
1939
+ <li><a href="#isBalanced" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>is<wbr/>Balanced</span></a></li>
1940
+ <li><a href="#isEmpty" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>is<wbr/>Empty</span></a></li>
1941
+ <li><a href="#lastKey" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>last<wbr/>Key</span></a></li>
1942
+ <li><a href="#lesserSum" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>lesser<wbr/>Sum</span></a></li>
1943
+ <li><a href="#levelIterative" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>level<wbr/>Iterative</span></a></li>
1944
+ <li><a href="#listLevels" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>list<wbr/>Levels</span></a></li>
1945
+ <li><a href="#morris" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>morris</span></a></li>
1946
+ <li><a href="#remove" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>remove</span></a></li>
1947
+ <li><a href="#subTreeAdd" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>sub<wbr/>Tree<wbr/>Add</span></a></li>
1948
+ <li><a href="#subTreeSum" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>sub<wbr/>Tree<wbr/>Sum</span></a></li></ul></div></details></div>
1949
+ <div class="site-menu">
1950
+ <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>
1951
+ <ul class="tsd-small-nested-navigation">
1952
+ <li><a href="../enums/CP.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-8"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.45 16V7.24H14.49V8.224H10.518V10.936H14.07V11.908H10.518V15.016H14.49V16H9.45Z" fill="var(--color-text)"></path></g></svg><span>CP</span></a></li>
1953
+ <li><a href="../enums/FamilyPosition.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-8"></use></svg><span>Family<wbr/>Position</span></a></li>
1954
+ <li><a href="../enums/LoopType.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-8"></use></svg><span>Loop<wbr/>Type</span></a></li>
1955
+ <li><a href="AVLTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-128"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g></svg><span>AVLTree</span></a></li>
1956
+ <li><a href="AVLTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>AVLTree<wbr/>Node</span></a></li>
1957
+ <li><a href="AaTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Aa<wbr/>Tree</span></a></li>
1958
+ <li><a href="AbstractEdge.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Abstract<wbr/>Edge</span></a></li>
1959
+ <li><a href="AbstractGraph.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Abstract<wbr/>Graph</span></a></li>
1960
+ <li><a href="AbstractVertex.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Abstract<wbr/>Vertex</span></a></li>
1961
+ <li><a href="ArrayDeque.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Array<wbr/>Deque</span></a></li>
1962
+ <li><a href="BST.html" class="current"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>BST</span></a></li>
1963
+ <li><a href="BSTNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>BSTNode</span></a></li>
1964
+ <li><a href="BTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>BTree</span></a></li>
1965
+ <li><a href="BinaryIndexedTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Binary<wbr/>Indexed<wbr/>Tree</span></a></li>
1966
+ <li><a href="BinaryTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Binary<wbr/>Tree</span></a></li>
1967
+ <li><a href="BinaryTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Binary<wbr/>Tree<wbr/>Node</span></a></li>
1968
+ <li><a href="Character.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Character</span></a></li>
1969
+ <li><a href="CoordinateMap.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Coordinate<wbr/>Map</span></a></li>
1970
+ <li><a href="CoordinateSet.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Coordinate<wbr/>Set</span></a></li>
1971
+ <li><a href="Deque.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Deque</span></a></li>
1972
+ <li><a href="DirectedEdge.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Directed<wbr/>Edge</span></a></li>
1973
+ <li><a href="DirectedGraph.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Directed<wbr/>Graph</span></a></li>
1974
+ <li><a href="DirectedVertex.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Directed<wbr/>Vertex</span></a></li>
1975
+ <li><a href="DoublyLinkedList.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Doubly<wbr/>Linked<wbr/>List</span></a></li>
1976
+ <li><a href="DoublyLinkedListNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Doubly<wbr/>Linked<wbr/>List<wbr/>Node</span></a></li>
1977
+ <li><a href="Heap.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Heap</span></a></li>
1978
+ <li><a href="HeapItem.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Heap<wbr/>Item</span></a></li>
1979
+ <li><a href="Matrix2D.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Matrix2D</span></a></li>
1980
+ <li><a href="MatrixNTI2D.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>MatrixNTI2D</span></a></li>
1981
+ <li><a href="MaxHeap.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Max<wbr/>Heap</span></a></li>
1982
+ <li><a href="MaxPriorityQueue.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Max<wbr/>Priority<wbr/>Queue</span></a></li>
1983
+ <li><a href="MinHeap.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Min<wbr/>Heap</span></a></li>
1984
+ <li><a href="MinPriorityQueue.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Min<wbr/>Priority<wbr/>Queue</span></a></li>
1985
+ <li><a href="Navigator.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Navigator</span></a></li>
1986
+ <li><a href="ObjectDeque.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Object<wbr/>Deque</span></a></li>
1987
+ <li><a href="PriorityQueue.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Priority<wbr/>Queue</span></a></li>
1988
+ <li><a href="Queue.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Queue</span></a></li>
1989
+ <li><a href="RBTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>RBTree</span></a></li>
1990
+ <li><a href="SegmentTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Segment<wbr/>Tree</span></a></li>
1991
+ <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>
1992
+ <li><a href="SinglyLinkedList.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Singly<wbr/>Linked<wbr/>List</span></a></li>
1993
+ <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>
1994
+ <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>
1995
+ <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>
1996
+ <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>
1997
+ <li><a href="TreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Tree<wbr/>Node</span></a></li>
1998
+ <li><a href="Trie.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Trie</span></a></li>
1999
+ <li><a href="TrieNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Trie<wbr/>Node</span></a></li>
2000
+ <li><a href="TwoThreeTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Two<wbr/>Three<wbr/>Tree</span></a></li>
2001
+ <li><a href="UndirectedEdge.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Undirected<wbr/>Edge</span></a></li>
2002
+ <li><a href="UndirectedGraph.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Undirected<wbr/>Graph</span></a></li>
2003
+ <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>
2004
+ <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>
2005
+ <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>
2006
+ <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>
2007
+ <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>
2008
+ <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>
2009
+ <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>
2010
+ <li><a href="../interfaces/NavigatorParams.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>Navigator<wbr/>Params</span></a></li>
2011
+ <li><a href="../interfaces/PriorityQueueOptions.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>Priority<wbr/>Queue<wbr/>Options</span></a></li>
2012
+ <li><a href="../types/BSTComparator.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-4194304"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)"></path></g></svg><span>BSTComparator</span></a></li>
2013
+ <li><a href="../types/BSTDeletedResult.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>BSTDeleted<wbr/>Result</span></a></li>
2014
+ <li><a href="../types/BinaryTreeDeleted.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Binary<wbr/>Tree<wbr/>Deleted</span></a></li>
2015
+ <li><a href="../types/BinaryTreeNodeId.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Binary<wbr/>Tree<wbr/>Node<wbr/>Id</span></a></li>
2016
+ <li><a href="../types/BinaryTreeNodePropertyName.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Binary<wbr/>Tree<wbr/>Node<wbr/>Property<wbr/>Name</span></a></li>
2017
+ <li><a href="../types/DFSOrderPattern.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>DFSOrder<wbr/>Pattern</span></a></li>
2018
+ <li><a href="../types/DijkstraResult.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Dijkstra<wbr/>Result</span></a></li>
2019
+ <li><a href="../types/Direction.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Direction</span></a></li>
2020
+ <li><a href="../types/DoublyLinkedListGetBy.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Doubly<wbr/>Linked<wbr/>List<wbr/>Get<wbr/>By</span></a></li>
2021
+ <li><a href="../types/NodeOrPropertyName.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Node<wbr/>Or<wbr/>Property<wbr/>Name</span></a></li>
2022
+ <li><a href="../types/PriorityQueueComparator.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Priority<wbr/>Queue<wbr/>Comparator</span></a></li>
2023
+ <li><a href="../types/PriorityQueueDFSOrderPattern.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Priority<wbr/>QueueDFSOrder<wbr/>Pattern</span></a></li>
2024
+ <li><a href="../types/ResultByProperty.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Result<wbr/>By<wbr/>Property</span></a></li>
2025
+ <li><a href="../types/ResultsByProperty.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Results<wbr/>By<wbr/>Property</span></a></li>
2026
+ <li><a href="../types/SegmentTreeNodeVal.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Segment<wbr/>Tree<wbr/>Node<wbr/>Val</span></a></li>
2027
+ <li><a href="../types/SpecifyOptional.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Specify<wbr/>Optional</span></a></li>
2028
+ <li><a href="../types/Thunk.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Thunk</span></a></li>
2029
+ <li><a href="../types/ToThunkFn.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>To<wbr/>Thunk<wbr/>Fn</span></a></li>
2030
+ <li><a href="../types/TopologicalStatus.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Topological<wbr/>Status</span></a></li>
2031
+ <li><a href="../types/TreeMultiSetDeletedResult.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Tree<wbr/>Multi<wbr/>Set<wbr/>Deleted<wbr/>Result</span></a></li>
2032
+ <li><a href="../types/TrlAsyncFn.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Trl<wbr/>Async<wbr/>Fn</span></a></li>
2033
+ <li><a href="../types/TrlFn.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Trl<wbr/>Fn</span></a></li>
2034
+ <li><a href="../types/Turning.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Turning</span></a></li>
2035
+ <li><a href="../types/VertexId.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Vertex<wbr/>Id</span></a></li></ul></nav></div></div></div>
2036
+ <div class="tsd-generator">
2037
+ <p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
2038
+ <div class="overlay"></div></body></html>