data-structure-typed 1.12.10 → 1.12.21

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 (158) hide show
  1. package/README.md +7 -0
  2. package/dist/data-structures/binary-tree/avl-tree.d.ts +14 -5
  3. package/dist/data-structures/binary-tree/avl-tree.js +15 -6
  4. package/dist/data-structures/binary-tree/binary-indexed-tree.d.ts +11 -2
  5. package/dist/data-structures/binary-tree/binary-indexed-tree.js +11 -2
  6. package/dist/data-structures/binary-tree/binary-tree.d.ts +26 -17
  7. package/dist/data-structures/binary-tree/binary-tree.js +72 -62
  8. package/dist/data-structures/binary-tree/bst.d.ts +92 -5
  9. package/dist/data-structures/binary-tree/bst.js +89 -5
  10. package/dist/data-structures/binary-tree/segment-tree.d.ts +41 -2
  11. package/dist/data-structures/binary-tree/segment-tree.js +41 -2
  12. package/dist/data-structures/binary-tree/tree-multiset.d.ts +34 -3
  13. package/dist/data-structures/binary-tree/tree-multiset.js +35 -4
  14. package/dist/data-structures/graph/abstract-graph.d.ts +5 -0
  15. package/dist/data-structures/graph/abstract-graph.js +12 -4
  16. package/dist/data-structures/graph/directed-graph.d.ts +18 -4
  17. package/dist/data-structures/graph/directed-graph.js +24 -37
  18. package/dist/data-structures/graph/undirected-graph.d.ts +13 -0
  19. package/dist/data-structures/graph/undirected-graph.js +18 -2
  20. package/dist/data-structures/hash/coordinate-map.d.ts +5 -2
  21. package/dist/data-structures/hash/coordinate-map.js +5 -2
  22. package/dist/data-structures/hash/coordinate-set.d.ts +5 -2
  23. package/dist/data-structures/hash/coordinate-set.js +5 -2
  24. package/dist/data-structures/heap/heap.d.ts +9 -6
  25. package/dist/data-structures/heap/heap.js +8 -8
  26. package/dist/data-structures/heap/max-heap.d.ts +5 -2
  27. package/dist/data-structures/heap/max-heap.js +5 -2
  28. package/dist/data-structures/heap/min-heap.d.ts +5 -2
  29. package/dist/data-structures/heap/min-heap.js +5 -2
  30. package/dist/data-structures/index.d.ts +1 -0
  31. package/dist/data-structures/index.js +1 -0
  32. package/dist/data-structures/linked-list/doubly-linked-list.d.ts +2 -2
  33. package/dist/data-structures/linked-list/doubly-linked-list.js +4 -4
  34. package/dist/data-structures/linked-list/singly-linked-list.d.ts +5 -2
  35. package/dist/data-structures/linked-list/singly-linked-list.js +5 -2
  36. package/dist/data-structures/matrix/matrix.d.ts +5 -2
  37. package/dist/data-structures/matrix/matrix.js +5 -2
  38. package/dist/data-structures/matrix/matrix2d.d.ts +5 -2
  39. package/dist/data-structures/matrix/matrix2d.js +5 -2
  40. package/dist/data-structures/matrix/navigator.d.ts +5 -2
  41. package/dist/data-structures/matrix/vector2d.d.ts +5 -2
  42. package/dist/data-structures/matrix/vector2d.js +5 -2
  43. package/dist/data-structures/priority-queue/max-priority-queue.d.ts +5 -2
  44. package/dist/data-structures/priority-queue/max-priority-queue.js +5 -2
  45. package/dist/data-structures/priority-queue/min-priority-queue.d.ts +5 -2
  46. package/dist/data-structures/priority-queue/min-priority-queue.js +5 -2
  47. package/dist/data-structures/priority-queue/priority-queue.d.ts +7 -4
  48. package/dist/data-structures/priority-queue/priority-queue.js +2 -2
  49. package/dist/data-structures/queue/deque.d.ts +12 -9
  50. package/dist/data-structures/queue/deque.js +12 -9
  51. package/dist/data-structures/queue/queue.d.ts +4 -4
  52. package/dist/data-structures/queue/queue.js +4 -4
  53. package/dist/data-structures/stack/stack.d.ts +1 -1
  54. package/dist/data-structures/stack/stack.js +1 -1
  55. package/dist/data-structures/trie/trie.d.ts +6 -3
  56. package/dist/data-structures/trie/trie.js +7 -4
  57. package/dist/utils/index.d.ts +1 -0
  58. package/dist/utils/index.js +1 -0
  59. package/dist/utils/types/utils.d.ts +8 -10
  60. package/dist/utils/types/utils.js +0 -1
  61. package/dist/utils/utils.d.ts +18 -8
  62. package/dist/utils/utils.js +93 -47
  63. package/package.json +3 -3
  64. package/src/assets/logo.png +0 -0
  65. package/src/data-structures/binary-tree/avl-tree.ts +15 -6
  66. package/src/data-structures/binary-tree/binary-indexed-tree.ts +11 -2
  67. package/src/data-structures/binary-tree/binary-tree.ts +70 -58
  68. package/src/data-structures/binary-tree/bst.ts +94 -7
  69. package/src/data-structures/binary-tree/segment-tree.ts +41 -2
  70. package/src/data-structures/binary-tree/tree-multiset.ts +35 -4
  71. package/src/data-structures/graph/abstract-graph.ts +12 -4
  72. package/src/data-structures/graph/directed-graph.ts +26 -39
  73. package/src/data-structures/graph/undirected-graph.ts +18 -2
  74. package/src/data-structures/hash/coordinate-map.ts +5 -2
  75. package/src/data-structures/hash/coordinate-set.ts +5 -2
  76. package/src/data-structures/heap/heap.ts +13 -10
  77. package/src/data-structures/heap/max-heap.ts +5 -2
  78. package/src/data-structures/heap/min-heap.ts +5 -2
  79. package/src/data-structures/index.ts +2 -0
  80. package/src/data-structures/linked-list/doubly-linked-list.ts +9 -6
  81. package/src/data-structures/linked-list/singly-linked-list.ts +5 -2
  82. package/src/data-structures/matrix/matrix.ts +5 -2
  83. package/src/data-structures/matrix/matrix2d.ts +5 -2
  84. package/src/data-structures/matrix/navigator.ts +5 -2
  85. package/src/data-structures/matrix/vector2d.ts +5 -2
  86. package/src/data-structures/priority-queue/max-priority-queue.ts +5 -2
  87. package/src/data-structures/priority-queue/min-priority-queue.ts +5 -2
  88. package/src/data-structures/priority-queue/priority-queue.ts +7 -4
  89. package/src/data-structures/queue/deque.ts +12 -9
  90. package/src/data-structures/queue/queue.ts +4 -4
  91. package/src/data-structures/stack/stack.ts +1 -1
  92. package/src/data-structures/trie/trie.ts +7 -4
  93. package/src/utils/index.ts +2 -1
  94. package/src/utils/types/utils.ts +10 -12
  95. package/src/utils/utils.ts +57 -11
  96. package/tests/unit/data-structures/binary-tree/bst.test.ts +1 -1
  97. package/tests/unit/data-structures/graph/directed-graph.test.ts +1 -0
  98. package/dist/utils/trampoline.d.ts +0 -14
  99. package/dist/utils/trampoline.js +0 -130
  100. package/docs/.nojekyll +0 -1
  101. package/docs/assets/highlight.css +0 -85
  102. package/docs/assets/main.js +0 -58
  103. package/docs/assets/search.js +0 -1
  104. package/docs/assets/style.css +0 -1367
  105. package/docs/classes/AVLTree.html +0 -2046
  106. package/docs/classes/AVLTreeNode.html +0 -423
  107. package/docs/classes/AaTree.html +0 -117
  108. package/docs/classes/AbstractEdge.html +0 -198
  109. package/docs/classes/AbstractGraph.html +0 -891
  110. package/docs/classes/AbstractVertex.html +0 -164
  111. package/docs/classes/ArrayDeque.html +0 -384
  112. package/docs/classes/BST.html +0 -1893
  113. package/docs/classes/BSTNode.html +0 -425
  114. package/docs/classes/BTree.html +0 -117
  115. package/docs/classes/BinaryIndexedTree.html +0 -244
  116. package/docs/classes/BinaryTree.html +0 -1754
  117. package/docs/classes/BinaryTreeNode.html +0 -396
  118. package/docs/classes/Character.html +0 -165
  119. package/docs/classes/CoordinateMap.html +0 -394
  120. package/docs/classes/CoordinateSet.html +0 -355
  121. package/docs/classes/Deque.html +0 -617
  122. package/docs/classes/DirectedEdge.html +0 -247
  123. package/docs/classes/DirectedGraph.html +0 -1207
  124. package/docs/classes/DirectedVertex.html +0 -154
  125. package/docs/classes/DoublyLinkedList.html +0 -619
  126. package/docs/classes/DoublyLinkedListNode.html +0 -160
  127. package/docs/classes/Heap.html +0 -315
  128. package/docs/classes/Matrix2D.html +0 -447
  129. package/docs/classes/MatrixNTI2D.html +0 -181
  130. package/docs/classes/MaxHeap.html +0 -325
  131. package/docs/classes/MaxPriorityQueue.html +0 -668
  132. package/docs/classes/MinHeap.html +0 -326
  133. package/docs/classes/MinPriorityQueue.html +0 -668
  134. package/docs/classes/Navigator.html +0 -285
  135. package/docs/classes/ObjectDeque.html +0 -289
  136. package/docs/classes/PriorityQueue.html +0 -643
  137. package/docs/classes/Queue.html +0 -337
  138. package/docs/classes/RBTree.html +0 -117
  139. package/docs/classes/SegmentTree.html +0 -234
  140. package/docs/classes/SegmentTreeNode.html +0 -302
  141. package/docs/classes/SinglyLinkedList.html +0 -1035
  142. package/docs/classes/SinglyLinkedListNode.html +0 -304
  143. package/docs/classes/SplayTree.html +0 -117
  144. package/docs/classes/Stack.html +0 -313
  145. package/docs/classes/TreeMultiSet.html +0 -1897
  146. package/docs/classes/Trie.html +0 -317
  147. package/docs/classes/TrieNode.html +0 -221
  148. package/docs/classes/TwoThreeTree.html +0 -117
  149. package/docs/classes/UndirectedEdge.html +0 -220
  150. package/docs/classes/UndirectedGraph.html +0 -1006
  151. package/docs/classes/UndirectedVertex.html +0 -154
  152. package/docs/classes/Vector2D.html +0 -746
  153. package/docs/enums/CP.html +0 -126
  154. package/docs/enums/FamilyPosition.html +0 -126
  155. package/docs/enums/LoopType.html +0 -119
  156. package/docs/index.html +0 -288
  157. package/docs/modules.html +0 -146
  158. package/src/utils/trampoline.ts +0 -51
@@ -1,1897 +0,0 @@
1
- <!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>TreeMultiSet | 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="TreeMultiSet.html">TreeMultiSet</a></li></ul>
17
- <h1>Class TreeMultiSet&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="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>
27
- <ul class="tsd-hierarchy">
28
- <li><span class="target">TreeMultiSet</span></li></ul></li></ul></section><aside class="tsd-sources">
29
- <ul>
30
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/tree-multiset.ts#L8">src/data-structures/binary-tree/tree-multiset.ts:8</a></li></ul></aside>
31
- <section class="tsd-panel-group tsd-index-group">
32
- <section class="tsd-panel tsd-index-panel">
33
- <details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
34
- <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>
35
- <div class="tsd-accordion-details">
36
- <section class="tsd-index-section">
37
- <h3 class="tsd-index-heading">Constructors</h3>
38
- <div class="tsd-index-list"><a href="TreeMultiSet.html#constructor" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-512"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g></svg><span>constructor</span></a>
39
- </div></section>
40
- <section class="tsd-index-section">
41
- <h3 class="tsd-index-heading">Properties</h3>
42
- <div class="tsd-index-list"><a href="TreeMultiSet.html#_comparator" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-1024"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)"></path></g></svg><span>_comparator</span></a>
43
- <a href="TreeMultiSet.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>
44
- <a href="TreeMultiSet.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>
45
- <a href="TreeMultiSet.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>
46
- <a href="TreeMultiSet.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>
47
- <a href="TreeMultiSet.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>
48
- <a href="TreeMultiSet.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>
49
- <a href="TreeMultiSet.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>
50
- <a href="TreeMultiSet.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>
51
- <a href="TreeMultiSet.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>
52
- </div></section>
53
- <section class="tsd-index-section">
54
- <h3 class="tsd-index-heading">Accessors</h3>
55
- <div class="tsd-index-list"><a href="TreeMultiSet.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>
56
- <a href="TreeMultiSet.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>
57
- <a href="TreeMultiSet.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>
58
- </div></section>
59
- <section class="tsd-index-section">
60
- <h3 class="tsd-index-heading">Methods</h3>
61
- <div class="tsd-index-list"><a href="TreeMultiSet.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>
62
- <a href="TreeMultiSet.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>
63
- <a href="TreeMultiSet.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>
64
- <a href="TreeMultiSet.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>
65
- <a href="TreeMultiSet.html#_compare" 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>_compare</span></a>
66
- <a href="TreeMultiSet.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>
67
- <a href="TreeMultiSet.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>
68
- <a href="TreeMultiSet.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>
69
- <a href="TreeMultiSet.html#allGreaterNodesAdd" class="tsd-index-link tsd-is-inherited"><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>
70
- <a href="TreeMultiSet.html#balance" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>balance</span></a>
71
- <a href="TreeMultiSet.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>
72
- <a href="TreeMultiSet.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>
73
- <a href="TreeMultiSet.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>
74
- <a href="TreeMultiSet.html#get" 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</span></a>
75
- <a href="TreeMultiSet.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>
76
- <a href="TreeMultiSet.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>
77
- <a href="TreeMultiSet.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>
78
- <a href="TreeMultiSet.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>
79
- <a href="TreeMultiSet.html#getNodes" 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/>Nodes</span></a>
80
- <a href="TreeMultiSet.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>
81
- <a href="TreeMultiSet.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>
82
- <a href="TreeMultiSet.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>
83
- <a href="TreeMultiSet.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>
84
- <a href="TreeMultiSet.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>
85
- <a href="TreeMultiSet.html#insertMany" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>insert<wbr/>Many</span></a>
86
- <a href="TreeMultiSet.html#isAVLBalanced" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>isAVLBalanced</span></a>
87
- <a href="TreeMultiSet.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>
88
- <a href="TreeMultiSet.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>
89
- <a href="TreeMultiSet.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>
90
- <a href="TreeMultiSet.html#lastKey" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>last<wbr/>Key</span></a>
91
- <a href="TreeMultiSet.html#lesserSum" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>lesser<wbr/>Sum</span></a>
92
- <a href="TreeMultiSet.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>
93
- <a href="TreeMultiSet.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>
94
- <a href="TreeMultiSet.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>
95
- <a href="TreeMultiSet.html#put" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>put</span></a>
96
- <a href="TreeMultiSet.html#putTo" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>put<wbr/>To</span></a>
97
- <a href="TreeMultiSet.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>
98
- <a href="TreeMultiSet.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>
99
- <a href="TreeMultiSet.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>
100
- </div></section></div></details></section></section>
101
- <section class="tsd-panel-group tsd-member-group">
102
- <h2>Constructors</h2>
103
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="constructor" class="tsd-anchor"></a>
104
- <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>
105
- <ul class="tsd-signatures tsd-is-inherited">
106
- <li class="tsd-signature tsd-anchor-link" id="constructor.new_TreeMultiSet"><span class="tsd-kind-constructor-signature">new <wbr/>Tree<wbr/>Multi<wbr/>Set</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="TreeMultiSet.html" class="tsd-signature-type tsd-kind-class">TreeMultiSet</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_TreeMultiSet" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
107
- <li class="tsd-description">
108
- <section class="tsd-panel">
109
- <h4>Type Parameters</h4>
110
- <ul class="tsd-type-parameter-list">
111
- <li>
112
- <h4><span class="tsd-kind-type-parameter">T</span></h4></li></ul></section>
113
- <div class="tsd-parameters">
114
- <h4 class="tsd-parameters-title">Parameters</h4>
115
- <ul class="tsd-parameter-list">
116
- <li>
117
- <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><span class="tsd-signature-type ">BSTComparator</span><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>
118
- <ul class="tsd-parameters">
119
- <li class="tsd-parameter">
120
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-property">comparator</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type ">BSTComparator</span></h5></li>
121
- <li class="tsd-parameter">
122
- <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>
123
- <h4 class="tsd-returns-title">Returns <a href="TreeMultiSet.html" class="tsd-signature-type tsd-kind-class">TreeMultiSet</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">
124
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#constructor">constructor</a></p>
125
- <ul>
126
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/bst.ts#L17">src/data-structures/binary-tree/bst.ts:17</a></li></ul></aside></li></ul></section></section>
127
- <section class="tsd-panel-group tsd-member-group">
128
- <h2>Properties</h2>
129
- <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_comparator" class="tsd-anchor"></a>
130
- <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>
131
- <div class="tsd-signature"><span class="tsd-kind-property">_comparator</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type ">BSTComparator</span><span class="tsd-signature-symbol"> = ...</span></div><aside class="tsd-sources">
132
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_comparator">_comparator</a></p>
133
- <ul>
134
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/bst.ts#L400">src/data-structures/binary-tree/bst.ts:400</a></li></ul></aside></section>
135
- <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_count" class="tsd-anchor"></a>
136
- <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>
137
- <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">
138
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_count">_count</a></p>
139
- <ul>
140
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L197">src/data-structures/binary-tree/binary-tree.ts:197</a></li></ul></aside></section>
141
- <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_loopType" class="tsd-anchor"></a>
142
- <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>
143
- <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">
144
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_loopType">_loopType</a></p>
145
- <ul>
146
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L141">src/data-structures/binary-tree/binary-tree.ts:141</a></li></ul></aside></section>
147
- <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_root" class="tsd-anchor"></a>
148
- <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>
149
- <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">
150
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_root">_root</a></p>
151
- <ul>
152
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L173">src/data-structures/binary-tree/binary-tree.ts:173</a></li></ul></aside></section>
153
- <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_size" class="tsd-anchor"></a>
154
- <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>
155
- <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">
156
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_size">_size</a></p>
157
- <ul>
158
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L187">src/data-structures/binary-tree/binary-tree.ts:187</a></li></ul></aside></section>
159
- <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_visitedCount" class="tsd-anchor"></a>
160
- <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>
161
- <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">
162
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_visitedCount">_visitedCount</a></p>
163
- <ul>
164
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L145">src/data-structures/binary-tree/binary-tree.ts:145</a></li></ul></aside></section>
165
- <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_visitedId" class="tsd-anchor"></a>
166
- <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>
167
- <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">
168
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_visitedId">_visitedId</a></p>
169
- <ul>
170
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L142">src/data-structures/binary-tree/binary-tree.ts:142</a></li></ul></aside></section>
171
- <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_visitedLeftSum" class="tsd-anchor"></a>
172
- <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>
173
- <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">
174
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_visitedLeftSum">_visitedLeftSum</a></p>
175
- <ul>
176
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L146">src/data-structures/binary-tree/binary-tree.ts:146</a></li></ul></aside></section>
177
- <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_visitedNode" class="tsd-anchor"></a>
178
- <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>
179
- <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">
180
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_visitedNode">_visitedNode</a></p>
181
- <ul>
182
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L144">src/data-structures/binary-tree/binary-tree.ts:144</a></li></ul></aside></section>
183
- <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_visitedVal" class="tsd-anchor"></a>
184
- <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>
185
- <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">
186
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_visitedVal">_visitedVal</a></p>
187
- <ul>
188
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L143">src/data-structures/binary-tree/binary-tree.ts:143</a></li></ul></aside></section></section>
189
- <section class="tsd-panel-group tsd-member-group">
190
- <h2>Accessors</h2>
191
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="count" class="tsd-anchor"></a>
192
- <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>
193
- <ul class="tsd-signatures tsd-is-inherited">
194
- <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>
195
- <li class="tsd-description">
196
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
197
- <p>Inherited from BST.count</p>
198
- <ul>
199
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L199">src/data-structures/binary-tree/binary-tree.ts:199</a></li></ul></aside></li>
200
- <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>
201
- <li class="tsd-description">
202
- <div class="tsd-parameters">
203
- <h4 class="tsd-parameters-title">Parameters</h4>
204
- <ul class="tsd-parameter-list">
205
- <li>
206
- <h5><span class="tsd-kind-parameter">v</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div>
207
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
208
- <p>Inherited from BST.count</p>
209
- <ul>
210
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L203">src/data-structures/binary-tree/binary-tree.ts:203</a></li></ul></aside></li></ul></section>
211
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="root" class="tsd-anchor"></a>
212
- <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>
213
- <ul class="tsd-signatures tsd-is-inherited">
214
- <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>
215
- <li class="tsd-description">
216
- <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">
217
- <p>Inherited from BST.root</p>
218
- <ul>
219
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L175">src/data-structures/binary-tree/binary-tree.ts:175</a></li></ul></aside></li>
220
- <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>
221
- <li class="tsd-description">
222
- <div class="tsd-parameters">
223
- <h4 class="tsd-parameters-title">Parameters</h4>
224
- <ul class="tsd-parameter-list">
225
- <li>
226
- <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>
227
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
228
- <p>Inherited from BST.root</p>
229
- <ul>
230
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L179">src/data-structures/binary-tree/binary-tree.ts:179</a></li></ul></aside></li></ul></section>
231
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="size" class="tsd-anchor"></a>
232
- <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>
233
- <ul class="tsd-signatures tsd-is-inherited">
234
- <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>
235
- <li class="tsd-description">
236
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
237
- <p>Inherited from BST.size</p>
238
- <ul>
239
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L189">src/data-structures/binary-tree/binary-tree.ts:189</a></li></ul></aside></li>
240
- <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>
241
- <li class="tsd-description">
242
- <div class="tsd-parameters">
243
- <h4 class="tsd-parameters-title">Parameters</h4>
244
- <ul class="tsd-parameter-list">
245
- <li>
246
- <h5><span class="tsd-kind-parameter">v</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div>
247
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
248
- <p>Inherited from BST.size</p>
249
- <ul>
250
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L193">src/data-structures/binary-tree/binary-tree.ts:193</a></li></ul></aside></li></ul></section></section>
251
- <section class="tsd-panel-group tsd-member-group">
252
- <h2>Methods</h2>
253
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="BFS" class="tsd-anchor"></a>
254
- <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>
255
- <ul class="tsd-signatures tsd-is-inherited">
256
- <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>
257
- <li class="tsd-description">
258
- <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
259
- or property name.</p>
260
- </div>
261
- <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>
262
-
263
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
264
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#BFS">BFS</a></p>
265
- <ul>
266
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L902">src/data-structures/binary-tree/binary-tree.ts:902</a></li></ul></aside></li>
267
- <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>
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
- <div class="tsd-parameters">
273
- <h4 class="tsd-parameters-title">Parameters</h4>
274
- <ul class="tsd-parameter-list">
275
- <li>
276
- <h5><span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;id&quot;</span></h5>
277
- <div class="tsd-comment tsd-typography"><p>The parameter <code>nodeOrPropertyName</code> is an optional parameter that
278
- represents either a node or a property name. If a node is provided, the breadth-first search algorithm will be
279
- performed starting from that node. If a property name is provided, the breadth-first search algorithm will be
280
- performed starting from the root node</p>
281
- </div>
282
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
283
- <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>
284
-
285
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
286
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#BFS">BFS</a></p>
287
- <ul>
288
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L904">src/data-structures/binary-tree/binary-tree.ts:904</a></li></ul></aside></li>
289
- <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>
290
- <li class="tsd-description">
291
- <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
292
- or property name.</p>
293
- </div>
294
- <div class="tsd-parameters">
295
- <h4 class="tsd-parameters-title">Parameters</h4>
296
- <ul class="tsd-parameter-list">
297
- <li>
298
- <h5><span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;val&quot;</span></h5>
299
- <div class="tsd-comment tsd-typography"><p>The parameter <code>nodeOrPropertyName</code> is an optional parameter that
300
- represents either a node or a property name. If a node is provided, the breadth-first search algorithm will be
301
- performed starting from that node. If a property name is provided, the breadth-first search algorithm will be
302
- performed starting from the root node</p>
303
- </div>
304
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
305
- <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>
306
-
307
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
308
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#BFS">BFS</a></p>
309
- <ul>
310
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L906">src/data-structures/binary-tree/binary-tree.ts:906</a></li></ul></aside></li>
311
- <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>
312
- <li class="tsd-description">
313
- <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
314
- or property name.</p>
315
- </div>
316
- <div class="tsd-parameters">
317
- <h4 class="tsd-parameters-title">Parameters</h4>
318
- <ul class="tsd-parameter-list">
319
- <li>
320
- <h5><span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;node&quot;</span></h5>
321
- <div class="tsd-comment tsd-typography"><p>The parameter <code>nodeOrPropertyName</code> is an optional parameter that
322
- represents either a node or a property name. If a node is provided, the breadth-first search algorithm will be
323
- performed starting from that node. If a property name is provided, the breadth-first search algorithm will be
324
- performed starting from the root node</p>
325
- </div>
326
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
327
- <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>
328
-
329
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
330
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#BFS">BFS</a></p>
331
- <ul>
332
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L908">src/data-structures/binary-tree/binary-tree.ts:908</a></li></ul></aside></li>
333
- <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>
334
- <li class="tsd-description">
335
- <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
336
- or property name.</p>
337
- </div>
338
- <div class="tsd-parameters">
339
- <h4 class="tsd-parameters-title">Parameters</h4>
340
- <ul class="tsd-parameter-list">
341
- <li>
342
- <h5><span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;count&quot;</span></h5>
343
- <div class="tsd-comment tsd-typography"><p>The parameter <code>nodeOrPropertyName</code> is an optional parameter that
344
- represents either a node or a property name. If a node is provided, the breadth-first search algorithm will be
345
- performed starting from that node. If a property name is provided, the breadth-first search algorithm will be
346
- performed starting from the root node</p>
347
- </div>
348
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
349
- <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>
350
-
351
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
352
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#BFS">BFS</a></p>
353
- <ul>
354
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L910">src/data-structures/binary-tree/binary-tree.ts:910</a></li></ul></aside></li></ul></section>
355
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="DFS" class="tsd-anchor"></a>
356
- <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>
357
- <ul class="tsd-signatures tsd-is-inherited">
358
- <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>
359
- <li class="tsd-description">
360
- <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
361
- specified pattern and node or property name.</p>
362
- </div>
363
- <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>
364
-
365
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
366
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFS">DFS</a></p>
367
- <ul>
368
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L938">src/data-structures/binary-tree/binary-tree.ts:938</a></li></ul></aside></li>
369
- <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>
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
- <div class="tsd-parameters">
375
- <h4 class="tsd-parameters-title">Parameters</h4>
376
- <ul class="tsd-parameter-list">
377
- <li>
378
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pattern</span>: <span class="tsd-signature-type ">DFSOrderPattern</span></h5>
379
- <div class="tsd-comment tsd-typography"><p>The &quot;pattern&quot; parameter is used to specify the order in which the nodes
380
- of a binary tree are traversed during the Depth-First Search (DFS) algorithm. It can take one of three values: &#39;in&#39;,
381
- &#39;pre&#39;, or &#39;post&#39;.</p>
382
- </div>
383
- <div class="tsd-comment tsd-typography"></div></li>
384
- <li>
385
- <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>
386
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is a string that represents
387
- either the name of a property in the <code>BinaryTreeNode</code> object or the value of the <code>id</code> property in the
388
- <code>BinaryTreeNode</code> object. This parameter is used to accumulate the results based on the specified property name. If
389
- no value</p>
390
- </div>
391
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
392
- <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>
393
-
394
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
395
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFS">DFS</a></p>
396
- <ul>
397
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L940">src/data-structures/binary-tree/binary-tree.ts:940</a></li></ul></aside></li>
398
- <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>
399
- <li class="tsd-description">
400
- <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
401
- specified pattern and node or property name.</p>
402
- </div>
403
- <div class="tsd-parameters">
404
- <h4 class="tsd-parameters-title">Parameters</h4>
405
- <ul class="tsd-parameter-list">
406
- <li>
407
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pattern</span>: <span class="tsd-signature-type ">DFSOrderPattern</span></h5>
408
- <div class="tsd-comment tsd-typography"><p>The &quot;pattern&quot; parameter is used to specify the order in which the nodes
409
- of a binary tree are traversed during the Depth-First Search (DFS) algorithm. It can take one of three values: &#39;in&#39;,
410
- &#39;pre&#39;, or &#39;post&#39;.</p>
411
- </div>
412
- <div class="tsd-comment tsd-typography"></div></li>
413
- <li>
414
- <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>
415
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is a string that represents
416
- either the name of a property in the <code>BinaryTreeNode</code> object or the value of the <code>id</code> property in the
417
- <code>BinaryTreeNode</code> object. This parameter is used to accumulate the results based on the specified property name. If
418
- no value</p>
419
- </div>
420
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
421
- <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>
422
-
423
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
424
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFS">DFS</a></p>
425
- <ul>
426
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L942">src/data-structures/binary-tree/binary-tree.ts:942</a></li></ul></aside></li>
427
- <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>
428
- <li class="tsd-description">
429
- <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
430
- specified pattern and node or property name.</p>
431
- </div>
432
- <div class="tsd-parameters">
433
- <h4 class="tsd-parameters-title">Parameters</h4>
434
- <ul class="tsd-parameter-list">
435
- <li>
436
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pattern</span>: <span class="tsd-signature-type ">DFSOrderPattern</span></h5>
437
- <div class="tsd-comment tsd-typography"><p>The &quot;pattern&quot; parameter is used to specify the order in which the nodes
438
- of a binary tree are traversed during the Depth-First Search (DFS) algorithm. It can take one of three values: &#39;in&#39;,
439
- &#39;pre&#39;, or &#39;post&#39;.</p>
440
- </div>
441
- <div class="tsd-comment tsd-typography"></div></li>
442
- <li>
443
- <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>
444
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is a string that represents
445
- either the name of a property in the <code>BinaryTreeNode</code> object or the value of the <code>id</code> property in the
446
- <code>BinaryTreeNode</code> object. This parameter is used to accumulate the results based on the specified property name. If
447
- no value</p>
448
- </div>
449
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
450
- <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>
451
-
452
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
453
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFS">DFS</a></p>
454
- <ul>
455
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L944">src/data-structures/binary-tree/binary-tree.ts:944</a></li></ul></aside></li>
456
- <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>
457
- <li class="tsd-description">
458
- <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
459
- specified pattern and node or property name.</p>
460
- </div>
461
- <div class="tsd-parameters">
462
- <h4 class="tsd-parameters-title">Parameters</h4>
463
- <ul class="tsd-parameter-list">
464
- <li>
465
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pattern</span>: <span class="tsd-signature-type ">DFSOrderPattern</span></h5>
466
- <div class="tsd-comment tsd-typography"><p>The &quot;pattern&quot; parameter is used to specify the order in which the nodes
467
- of a binary tree are traversed during the Depth-First Search (DFS) algorithm. It can take one of three values: &#39;in&#39;,
468
- &#39;pre&#39;, or &#39;post&#39;.</p>
469
- </div>
470
- <div class="tsd-comment tsd-typography"></div></li>
471
- <li>
472
- <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>
473
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is a string that represents
474
- either the name of a property in the <code>BinaryTreeNode</code> object or the value of the <code>id</code> property in the
475
- <code>BinaryTreeNode</code> object. This parameter is used to accumulate the results based on the specified property name. If
476
- no value</p>
477
- </div>
478
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
479
- <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>
480
-
481
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
482
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFS">DFS</a></p>
483
- <ul>
484
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L946">src/data-structures/binary-tree/binary-tree.ts:946</a></li></ul></aside></li></ul></section>
485
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="DFSIterative" class="tsd-anchor"></a>
486
- <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>
487
- <ul class="tsd-signatures tsd-is-inherited">
488
- <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>
489
- <li class="tsd-description">
490
- <div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
491
- Space complexity of Iterative DFS equals to recursive DFS which is O(n) because of the stack</p>
492
- </div>
493
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4>
494
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
495
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFSIterative">DFSIterative</a></p>
496
- <ul>
497
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L988">src/data-structures/binary-tree/binary-tree.ts:988</a></li></ul></aside></li>
498
- <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>
499
- <li class="tsd-description">
500
- <div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
501
- Space complexity of Iterative DFS equals to recursive DFS which is O(n) because of the stack</p>
502
- </div>
503
- <div class="tsd-parameters">
504
- <h4 class="tsd-parameters-title">Parameters</h4>
505
- <ul class="tsd-parameter-list">
506
- <li>
507
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pattern</span>: <span class="tsd-signature-type ">DFSOrderPattern</span></h5>
508
- <div class="tsd-comment tsd-typography"></div></li>
509
- <li>
510
- <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>
511
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
512
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4>
513
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
514
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFSIterative">DFSIterative</a></p>
515
- <ul>
516
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L990">src/data-structures/binary-tree/binary-tree.ts:990</a></li></ul></aside></li>
517
- <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>
518
- <li class="tsd-description">
519
- <div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
520
- Space complexity of Iterative DFS equals to recursive DFS which is O(n) because of the stack</p>
521
- </div>
522
- <div class="tsd-parameters">
523
- <h4 class="tsd-parameters-title">Parameters</h4>
524
- <ul class="tsd-parameter-list">
525
- <li>
526
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pattern</span>: <span class="tsd-signature-type ">DFSOrderPattern</span></h5>
527
- <div class="tsd-comment tsd-typography"></div></li>
528
- <li>
529
- <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>
530
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
531
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">[]</span></h4>
532
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
533
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFSIterative">DFSIterative</a></p>
534
- <ul>
535
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L992">src/data-structures/binary-tree/binary-tree.ts:992</a></li></ul></aside></li>
536
- <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>
537
- <li class="tsd-description">
538
- <div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
539
- Space complexity of Iterative DFS equals to recursive DFS which is O(n) because of the stack</p>
540
- </div>
541
- <div class="tsd-parameters">
542
- <h4 class="tsd-parameters-title">Parameters</h4>
543
- <ul class="tsd-parameter-list">
544
- <li>
545
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pattern</span>: <span class="tsd-signature-type ">DFSOrderPattern</span></h5>
546
- <div class="tsd-comment tsd-typography"></div></li>
547
- <li>
548
- <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>
549
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
550
- <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>
551
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
552
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFSIterative">DFSIterative</a></p>
553
- <ul>
554
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L994">src/data-structures/binary-tree/binary-tree.ts:994</a></li></ul></aside></li>
555
- <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>
556
- <li class="tsd-description">
557
- <div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
558
- Space complexity of Iterative DFS equals to recursive DFS which is O(n) because of the stack</p>
559
- </div>
560
- <div class="tsd-parameters">
561
- <h4 class="tsd-parameters-title">Parameters</h4>
562
- <ul class="tsd-parameter-list">
563
- <li>
564
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pattern</span>: <span class="tsd-signature-type ">DFSOrderPattern</span></h5>
565
- <div class="tsd-comment tsd-typography"></div></li>
566
- <li>
567
- <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>
568
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
569
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4>
570
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
571
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFSIterative">DFSIterative</a></p>
572
- <ul>
573
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L996">src/data-structures/binary-tree/binary-tree.ts:996</a></li></ul></aside></li></ul></section>
574
- <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_accumulatedByPropertyName" class="tsd-anchor"></a>
575
- <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>
576
- <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
577
- <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>
578
- <li class="tsd-description">
579
- <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
580
- provided property name or a default property name.</p>
581
- </div>
582
- <div class="tsd-parameters">
583
- <h4 class="tsd-parameters-title">Parameters</h4>
584
- <ul class="tsd-parameter-list">
585
- <li>
586
- <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>
587
- <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>
588
- </div>
589
- <div class="tsd-comment tsd-typography"></div></li>
590
- <li>
591
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type ">NodeOrPropertyName</span></h5>
592
- <div class="tsd-comment tsd-typography"><p>The parameter <code>nodeOrPropertyName</code> is an optional parameter that
593
- can be either a string representing a property name or a reference to a node object. If it is a string, it specifies
594
- the property name of the node that should be accumulated. If it is a node object, it specifies the node itself</p>
595
- </div>
596
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
597
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
598
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
599
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_accumulatedByPropertyName">_accumulatedByPropertyName</a></p>
600
- <ul>
601
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L1356">src/data-structures/binary-tree/binary-tree.ts:1356</a></li></ul></aside></li></ul></section>
602
- <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_compare" class="tsd-anchor"></a>
603
- <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>
604
- <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
605
- <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>
606
- <li class="tsd-description">
607
- <div class="tsd-parameters">
608
- <h4 class="tsd-parameters-title">Parameters</h4>
609
- <ul class="tsd-parameter-list">
610
- <li>
611
- <h5><span class="tsd-kind-parameter">a</span>: <span class="tsd-signature-type">number</span></h5></li>
612
- <li>
613
- <h5><span class="tsd-kind-parameter">b</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div>
614
- <h4 class="tsd-returns-title">Returns <a href="../enums/CP.html" class="tsd-signature-type tsd-kind-enum">CP</a></h4><aside class="tsd-sources">
615
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_compare">_compare</a></p>
616
- <ul>
617
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/bst.ts#L402">src/data-structures/binary-tree/bst.ts:402</a></li></ul></aside></li></ul></section>
618
- <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_getResultByPropertyName" class="tsd-anchor"></a>
619
- <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>
620
- <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
621
- <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><span class="tsd-signature-type ">ResultsByProperty</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><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>
622
- <li class="tsd-description">
623
- <div class="tsd-comment tsd-typography"><p>The function <code>_getResultByPropertyName</code> returns different results based on the provided property name or defaulting
624
- to &#39;id&#39;.</p>
625
- </div>
626
- <div class="tsd-parameters">
627
- <h4 class="tsd-parameters-title">Parameters</h4>
628
- <ul class="tsd-parameter-list">
629
- <li>
630
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type ">NodeOrPropertyName</span></h5>
631
- <div class="tsd-comment tsd-typography"><p>The parameter <code>nodeOrPropertyName</code> is an optional parameter that
632
- can accept a value of type <code>NodeOrPropertyName</code>.</p>
633
- </div>
634
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
635
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">ResultsByProperty</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></h4><p>The method returns an object of type <code>ResultsByProperty&lt;T&gt;</code>.</p>
636
-
637
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
638
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_getResultByPropertyName">_getResultByPropertyName</a></p>
639
- <ul>
640
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L1385">src/data-structures/binary-tree/binary-tree.ts:1385</a></li></ul></aside></li></ul></section>
641
- <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_pushByPropertyNameStopOrNot" class="tsd-anchor"></a>
642
- <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>
643
- <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
644
- <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>
645
- <li class="tsd-description">
646
- <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
647
- a result array.</p>
648
- </div>
649
- <div class="tsd-parameters">
650
- <h4 class="tsd-parameters-title">Parameters</h4>
651
- <ul class="tsd-parameter-list">
652
- <li>
653
- <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>
654
- <div class="tsd-comment tsd-typography"><p>The current binary tree node that is being checked.</p>
655
- </div>
656
- <div class="tsd-comment tsd-typography"></div></li>
657
- <li>
658
- <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>
659
- <div class="tsd-comment tsd-typography"><p>An array that stores the matching nodes found during the
660
- traversal.</p>
661
- </div>
662
- <div class="tsd-comment tsd-typography"></div></li>
663
- <li>
664
- <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>
665
- <div class="tsd-comment tsd-typography"><p>The <code>nodeProperty</code> parameter is the value that we are searching for in
666
- the binary tree nodes. It can be either the <code>id</code>, <code>count</code>, or <code>val</code> property of the node.</p>
667
- </div>
668
- <div class="tsd-comment tsd-typography"></div></li>
669
- <li>
670
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">propertyName</span>: <span class="tsd-signature-type ">BinaryTreeNodePropertyName</span></h5>
671
- <div class="tsd-comment tsd-typography"><p>The <code>propertyName</code> parameter is an optional parameter that
672
- specifies the property of the <code>BinaryTreeNode</code> object that you want to compare with the <code>nodeProperty</code> value. It can
673
- be one of the following values: &#39;id&#39;, &#39;count&#39;, or &#39;val&#39;. If no <code>propertyName</code> is provided,</p>
674
- </div>
675
- <div class="tsd-comment tsd-typography"></div></li>
676
- <li>
677
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">onlyOne</span>: <span class="tsd-signature-type">boolean</span></h5>
678
- <div class="tsd-comment tsd-typography"><p>The <code>onlyOne</code> parameter is an optional boolean parameter that determines whether to
679
- stop after finding the first matching node or continue searching for all matching nodes. If <code>onlyOne</code> is set to
680
- <code>true</code>, the function will stop after finding the first matching node and return <code>true</code>. If `onlyOne</p>
681
- </div>
682
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
683
- <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>
684
-
685
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
686
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_pushByPropertyNameStopOrNot">_pushByPropertyNameStopOrNot</a></p>
687
- <ul>
688
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L1319">src/data-structures/binary-tree/binary-tree.ts:1319</a></li></ul></aside></li></ul></section>
689
- <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_resetResults" class="tsd-anchor"></a>
690
- <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>
691
- <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
692
- <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>
693
- <li class="tsd-description">
694
- <div class="tsd-comment tsd-typography"><p>The function resets the values of several arrays used for tracking visited nodes and their properties.</p>
695
- </div>
696
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
697
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
698
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_resetResults">_resetResults</a></p>
699
- <ul>
700
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L1295">src/data-structures/binary-tree/binary-tree.ts:1295</a></li></ul></aside></li></ul></section>
701
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="allGreaterNodesAdd" class="tsd-anchor"></a>
702
- <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>
703
- <ul class="tsd-signatures tsd-is-inherited">
704
- <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>
705
- <li class="tsd-description">
706
- <div class="tsd-parameters">
707
- <h4 class="tsd-parameters-title">Parameters</h4>
708
- <ul class="tsd-parameter-list">
709
- <li>
710
- <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></li>
711
- <li>
712
- <h5><span class="tsd-kind-parameter">delta</span>: <span class="tsd-signature-type">number</span></h5></li>
713
- <li>
714
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">propertyName</span>: <span class="tsd-signature-type ">BinaryTreeNodePropertyName</span></h5></li></ul></div>
715
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
716
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#allGreaterNodesAdd">allGreaterNodesAdd</a></p>
717
- <ul>
718
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/bst.ts#L276">src/data-structures/binary-tree/bst.ts:276</a></li></ul></aside></li></ul></section>
719
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="balance" class="tsd-anchor"></a>
720
- <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>
721
- <ul class="tsd-signatures tsd-is-inherited">
722
- <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>
723
- <li class="tsd-description">
724
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
725
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#balance">balance</a></p>
726
- <ul>
727
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/bst.ts#L322">src/data-structures/binary-tree/bst.ts:322</a></li></ul></aside></li></ul></section>
728
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="clear" class="tsd-anchor"></a>
729
- <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>
730
- <ul class="tsd-signatures tsd-is-inherited">
731
- <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>
732
- <li class="tsd-description">
733
- <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>
734
- </div>
735
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
736
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
737
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#clear">clear</a></p>
738
- <ul>
739
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L226">src/data-structures/binary-tree/binary-tree.ts:226</a></li></ul></aside></li></ul></section>
740
- <section class="tsd-panel tsd-member"><a id="createNode" class="tsd-anchor"></a>
741
- <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>
742
- <ul class="tsd-signatures">
743
- <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><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>
744
- <li class="tsd-description">
745
- <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
746
- null.</p>
747
- </div>
748
- <div class="tsd-parameters">
749
- <h4 class="tsd-parameters-title">Parameters</h4>
750
- <ul class="tsd-parameter-list">
751
- <li>
752
- <h5><span class="tsd-kind-parameter">id</span>: <span class="tsd-signature-type">number</span></h5>
753
- <div class="tsd-comment tsd-typography"><p>The <code>id</code> parameter is the identifier for the binary tree node. It is of type
754
- <code>BinaryTreeNodeId</code>, which could be a string or a number, depending on how you want to identify your nodes.</p>
755
- </div>
756
- <div class="tsd-comment tsd-typography"></div></li>
757
- <li>
758
- <h5><span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span></h5>
759
- <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
760
- any type <code>T</code> or <code>null</code>.</p>
761
- </div>
762
- <div class="tsd-comment tsd-typography"></div></li>
763
- <li>
764
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">count</span>: <span class="tsd-signature-type">number</span></h5>
765
- <div class="tsd-comment tsd-typography"><p>The count parameter is an optional parameter that represents the number of occurrences of
766
- the value in the binary tree node. It is of type number.</p>
767
- </div>
768
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
769
- <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></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.
770
- Otherwise, it returns null.</p>
771
-
772
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
773
- <p>Overrides <a href="BST.html">BST</a>.<a href="BST.html#createNode">createNode</a></p>
774
- <ul>
775
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/tree-multiset.ts#L9">src/data-structures/binary-tree/tree-multiset.ts:9</a></li></ul></aside></li></ul></section>
776
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="fill" class="tsd-anchor"></a>
777
- <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>
778
- <ul class="tsd-signatures tsd-is-inherited">
779
- <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>
780
- <li class="tsd-description">
781
- <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
782
- was successful.</p>
783
- </div>
784
- <div class="tsd-parameters">
785
- <h4 class="tsd-parameters-title">Parameters</h4>
786
- <ul class="tsd-parameter-list">
787
- <li>
788
- <h5><span class="tsd-kind-parameter">data</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="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></h5>
789
- <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
790
- array of <code>BinaryTreeNode&lt;T&gt;</code> objects.</p>
791
- </div>
792
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
793
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The method is returning a boolean value.</p>
794
-
795
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
796
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#fill">fill</a></p>
797
- <ul>
798
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L389">src/data-structures/binary-tree/binary-tree.ts:389</a></li></ul></aside></li></ul></section>
799
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="get" class="tsd-anchor"></a>
800
- <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>
801
- <ul class="tsd-signatures tsd-is-inherited">
802
- <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>
803
- <li class="tsd-description">
804
- <div class="tsd-comment tsd-typography"><p>The function returns the first binary tree node that matches the given property name and value, or null if no match
805
- is found.</p>
806
- </div>
807
- <div class="tsd-parameters">
808
- <h4 class="tsd-parameters-title">Parameters</h4>
809
- <ul class="tsd-parameter-list">
810
- <li>
811
- <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>
812
- <div class="tsd-comment tsd-typography"><p>The <code>nodeProperty</code> parameter can be either a <code>BinaryTreeNodeId</code> or a
813
- generic type <code>T</code>. It represents the property of the binary tree node that you want to search for.</p>
814
- </div>
815
- <div class="tsd-comment tsd-typography"></div></li>
816
- <li>
817
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">propertyName</span>: <span class="tsd-signature-type ">BinaryTreeNodePropertyName</span></h5>
818
- <div class="tsd-comment tsd-typography"><p>The <code>propertyName</code> parameter is an optional parameter that
819
- specifies the property of the binary tree node to search for. If not provided, it defaults to <code>&#39;id&#39;</code>.</p>
820
- </div>
821
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
822
- <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>a BinaryTreeNode object or null.</p>
823
-
824
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
825
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#get">get</a></p>
826
- <ul>
827
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/bst.ts#L111">src/data-structures/binary-tree/bst.ts:111</a></li></ul></aside></li></ul></section>
828
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getDepth" class="tsd-anchor"></a>
829
- <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>
830
- <ul class="tsd-signatures tsd-is-inherited">
831
- <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>
832
- <li class="tsd-description">
833
- <div class="tsd-comment tsd-typography"><p>The function calculates the depth of a binary tree node by traversing its parent nodes.</p>
834
- </div>
835
- <div class="tsd-parameters">
836
- <h4 class="tsd-parameters-title">Parameters</h4>
837
- <ul class="tsd-parameter-list">
838
- <li>
839
- <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>
840
- <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,
841
- meaning it can represent any type of data that we want to store in the node.</p>
842
- </div>
843
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
844
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>The depth of the given binary tree node.</p>
845
-
846
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
847
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getDepth">getDepth</a></p>
848
- <ul>
849
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L447">src/data-structures/binary-tree/binary-tree.ts:447</a></li></ul></aside></li></ul></section>
850
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getHeight" class="tsd-anchor"></a>
851
- <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>
852
- <ul class="tsd-signatures tsd-is-inherited">
853
- <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>
854
- <li class="tsd-description">
855
- <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
856
- approach.</p>
857
- </div>
858
- <div class="tsd-parameters">
859
- <h4 class="tsd-parameters-title">Parameters</h4>
860
- <ul class="tsd-parameter-list">
861
- <li>
862
- <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>
863
- <div class="tsd-comment tsd-typography"><p>The <code>beginRoot</code> parameter is an optional parameter of type
864
- <code>BinaryTreeNode&lt;T&gt; | null</code>. It represents the starting node from which to calculate the height of the binary tree.
865
- If no value is provided for <code>beginRoot</code>, the function will use the <code>root</code> property of the class instance as</p>
866
- </div>
867
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
868
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>the height of the binary tree.</p>
869
-
870
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
871
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getHeight">getHeight</a></p>
872
- <ul>
873
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L464">src/data-structures/binary-tree/binary-tree.ts:464</a></li></ul></aside></li></ul></section>
874
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getLeftMost" class="tsd-anchor"></a>
875
- <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>
876
- <ul class="tsd-signatures tsd-is-inherited">
877
- <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>
878
- <li class="tsd-description">
879
- <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
880
- recursion optimization.</p>
881
- </div>
882
- <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>
883
-
884
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
885
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getLeftMost">getLeftMost</a></p>
886
- <ul>
887
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L651">src/data-structures/binary-tree/binary-tree.ts:651</a></li></ul></aside></li>
888
- <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>
889
- <li class="tsd-description">
890
- <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
891
- recursion optimization.</p>
892
- </div>
893
- <div class="tsd-parameters">
894
- <h4 class="tsd-parameters-title">Parameters</h4>
895
- <ul class="tsd-parameter-list">
896
- <li>
897
- <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>
898
- <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
899
- provided, the function will use the root node of the binary tree.</p>
900
- </div>
901
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
902
- <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>
903
-
904
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
905
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getLeftMost">getLeftMost</a></p>
906
- <ul>
907
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L653">src/data-structures/binary-tree/binary-tree.ts:653</a></li></ul></aside></li></ul></section>
908
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getMinHeight" class="tsd-anchor"></a>
909
- <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>
910
- <ul class="tsd-signatures tsd-is-inherited">
911
- <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>
912
- <li class="tsd-description">
913
- <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
914
- approach.</p>
915
- </div>
916
- <div class="tsd-parameters">
917
- <h4 class="tsd-parameters-title">Parameters</h4>
918
- <ul class="tsd-parameter-list">
919
- <li>
920
- <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>
921
- <div class="tsd-comment tsd-typography"><p>The <code>beginRoot</code> parameter is an optional parameter of type
922
- <code>BinaryTreeNode&lt;T&gt; | null</code>. It represents the starting node from which to calculate the minimum height of the binary
923
- tree. If no value is provided for <code>beginRoot</code>, the function will use the root node of the binary tree.</p>
924
- </div>
925
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
926
- <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>
927
-
928
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
929
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getMinHeight">getMinHeight</a></p>
930
- <ul>
931
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L513">src/data-structures/binary-tree/binary-tree.ts:513</a></li></ul></aside></li></ul></section>
932
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getNodes" class="tsd-anchor"></a>
933
- <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>
934
- <ul class="tsd-signatures tsd-is-inherited">
935
- <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>
936
- <li class="tsd-description">
937
- <div class="tsd-comment tsd-typography"><p>The function <code>getNodes</code> returns an array of binary tree nodes that match a given property value, with options for
938
- searching recursively or iteratively.</p>
939
- </div>
940
- <div class="tsd-parameters">
941
- <h4 class="tsd-parameters-title">Parameters</h4>
942
- <ul class="tsd-parameter-list">
943
- <li>
944
- <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>
945
- <div class="tsd-comment tsd-typography"><p>The <code>nodeProperty</code> parameter can be either a <code>BinaryTreeNodeId</code> or a
946
- generic type <code>T</code>. It represents the property of the binary tree node that you want to search for.</p>
947
- </div>
948
- <div class="tsd-comment tsd-typography"></div></li>
949
- <li>
950
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">propertyName</span>: <span class="tsd-signature-type ">BinaryTreeNodePropertyName</span></h5>
951
- <div class="tsd-comment tsd-typography"><p>The <code>propertyName</code> parameter is an optional parameter that
952
- specifies the property name to use when searching for nodes. If not provided, it defaults to &#39;id&#39;.</p>
953
- </div>
954
- <div class="tsd-comment tsd-typography"></div></li>
955
- <li>
956
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">onlyOne</span>: <span class="tsd-signature-type">boolean</span></h5>
957
- <div class="tsd-comment tsd-typography"><p>The <code>onlyOne</code> parameter is an optional boolean parameter that determines whether to
958
- return only one node that matches the <code>nodeProperty</code> or <code>propertyName</code> criteria. If <code>onlyOne</code> is set to <code>true</code>, the
959
- function will stop traversing the tree and return the first matching node. If <code>@returns The function</code>getNodes<code>returns an array of</code>BinaryTreeNode<T> | null | undefined` objects.</p>
960
- </div>
961
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
962
- <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>
963
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
964
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getNodes">getNodes</a></p>
965
- <ul>
966
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/bst.ts#L170">src/data-structures/binary-tree/bst.ts:170</a></li></ul></aside></li></ul></section>
967
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getPathToRoot" class="tsd-anchor"></a>
968
- <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>
969
- <ul class="tsd-signatures tsd-is-inherited">
970
- <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>
971
- <li class="tsd-description">
972
- <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
973
- root of a binary tree.</p>
974
- </div>
975
- <div class="tsd-parameters">
976
- <h4 class="tsd-parameters-title">Parameters</h4>
977
- <ul class="tsd-parameter-list">
978
- <li>
979
- <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>
980
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object.</p>
981
- </div>
982
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
983
- <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
984
- the given <code>node</code> to the root of the binary tree.</p>
985
-
986
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
987
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getPathToRoot">getPathToRoot</a></p>
988
- <ul>
989
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L641">src/data-structures/binary-tree/binary-tree.ts:641</a></li></ul></aside></li></ul></section>
990
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getPredecessor" class="tsd-anchor"></a>
991
- <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>
992
- <ul class="tsd-signatures tsd-is-inherited">
993
- <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>
994
- <li class="tsd-description">
995
- <div class="tsd-comment tsd-typography"><p>The function returns the predecessor of a given node in a binary tree.</p>
996
- </div>
997
- <div class="tsd-parameters">
998
- <h4 class="tsd-parameters-title">Parameters</h4>
999
- <ul class="tsd-parameter-list">
1000
- <li>
1001
- <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>
1002
- <div class="tsd-comment tsd-typography"><p>The parameter <code>node</code> is a BinaryTreeNode object, representing a node in a binary tree.</p>
1003
- </div>
1004
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1005
- <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>
1006
-
1007
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1008
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getPredecessor">getPredecessor</a></p>
1009
- <ul>
1010
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L1170">src/data-structures/binary-tree/binary-tree.ts:1170</a></li></ul></aside></li></ul></section>
1011
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getRightMost" class="tsd-anchor"></a>
1012
- <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>
1013
- <ul class="tsd-signatures tsd-is-inherited">
1014
- <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>
1015
- <li class="tsd-description">
1016
- <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
1017
- tail recursion optimization.</p>
1018
- </div>
1019
- <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>
1020
-
1021
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1022
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getRightMost">getRightMost</a></p>
1023
- <ul>
1024
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L686">src/data-structures/binary-tree/binary-tree.ts:686</a></li></ul></aside></li>
1025
- <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>
1026
- <li class="tsd-description">
1027
- <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
1028
- tail recursion optimization.</p>
1029
- </div>
1030
- <div class="tsd-parameters">
1031
- <h4 class="tsd-parameters-title">Parameters</h4>
1032
- <ul class="tsd-parameter-list">
1033
- <li>
1034
- <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>
1035
- <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
1036
- provided, the function will use the root node of the binary tree.</p>
1037
- </div>
1038
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1039
- <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>
1040
-
1041
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1042
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getRightMost">getRightMost</a></p>
1043
- <ul>
1044
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L688">src/data-structures/binary-tree/binary-tree.ts:688</a></li></ul></aside></li></ul></section>
1045
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getSubTreeSizeAndCount" class="tsd-anchor"></a>
1046
- <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>
1047
- <ul class="tsd-signatures tsd-is-inherited">
1048
- <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>
1049
- <li class="tsd-description">
1050
- <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
1051
- traversal.</p>
1052
- </div>
1053
- <div class="tsd-parameters">
1054
- <h4 class="tsd-parameters-title">Parameters</h4>
1055
- <ul class="tsd-parameter-list">
1056
- <li>
1057
- <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>
1058
- <div class="tsd-comment tsd-typography"><p>The <code>subTreeRoot</code> parameter is the root node of a binary
1059
- tree.</p>
1060
- </div>
1061
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1062
- <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
1063
- represents the size of the subtree, and the second element represents the count of the nodes in the subtree.</p>
1064
-
1065
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1066
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getSubTreeSizeAndCount">getSubTreeSizeAndCount</a></p>
1067
- <ul>
1068
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L766">src/data-structures/binary-tree/binary-tree.ts:766</a></li></ul></aside></li></ul></section>
1069
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="has" class="tsd-anchor"></a>
1070
- <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>
1071
- <ul class="tsd-signatures tsd-is-inherited">
1072
- <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>
1073
- <li class="tsd-description">
1074
- <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
1075
- property.</p>
1076
- </div>
1077
- <div class="tsd-parameters">
1078
- <h4 class="tsd-parameters-title">Parameters</h4>
1079
- <ul class="tsd-parameter-list">
1080
- <li>
1081
- <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>
1082
- <div class="tsd-comment tsd-typography"><p>The <code>nodeProperty</code> parameter can be either a <code>BinaryTreeNodeId</code> or a
1083
- generic type <code>T</code>. It represents the property of a binary tree node that you want to check.</p>
1084
- </div>
1085
- <div class="tsd-comment tsd-typography"></div></li>
1086
- <li>
1087
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">propertyName</span>: <span class="tsd-signature-type ">BinaryTreeNodePropertyName</span></h5>
1088
- <div class="tsd-comment tsd-typography"><p>The <code>propertyName</code> parameter is an optional parameter that
1089
- specifies the name of the property to check for in the nodes.</p>
1090
- </div>
1091
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1092
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>a boolean value.</p>
1093
-
1094
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1095
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#has">has</a></p>
1096
- <ul>
1097
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L616">src/data-structures/binary-tree/binary-tree.ts:616</a></li></ul></aside></li></ul></section>
1098
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="insertMany" class="tsd-anchor"></a>
1099
- <h3 class="tsd-anchor-link"><span>insert<wbr/>Many</span><a href="#insertMany" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
1100
- <ul class="tsd-signatures tsd-is-inherited">
1101
- <li class="tsd-signature tsd-anchor-link" id="insertMany.insertMany-1"><span class="tsd-kind-call-signature">insert<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="#insertMany.insertMany-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1102
- <li class="tsd-description">
1103
- <div class="tsd-comment tsd-typography"><p>The <code>insertMany</code> function inserts multiple items into a binary tree and returns an array of the inserted nodes or
1104
- null/undefined values.</p>
1105
- </div>
1106
- <div class="tsd-parameters">
1107
- <h4 class="tsd-parameters-title">Parameters</h4>
1108
- <ul class="tsd-parameter-list">
1109
- <li>
1110
- <h5><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type tsd-kind-type-parameter">T</span><span class="tsd-signature-symbol">[]</span><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></h5>
1111
- <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
1112
- array of <code>BinaryTreeNode&lt;T&gt;</code> objects.</p>
1113
- </div>
1114
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1115
- <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>insertMany</code> returns an array of <code>BinaryTreeNode&lt;T&gt;</code>, <code>null</code>, or <code>undefined</code> values.</p>
1116
-
1117
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1118
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#insertMany">insertMany</a></p>
1119
- <ul>
1120
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L342">src/data-structures/binary-tree/binary-tree.ts:342</a></li></ul></aside></li></ul></section>
1121
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="isAVLBalanced" class="tsd-anchor"></a>
1122
- <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>
1123
- <ul class="tsd-signatures tsd-is-inherited">
1124
- <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>
1125
- <li class="tsd-description">
1126
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
1127
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#isAVLBalanced">isAVLBalanced</a></p>
1128
- <ul>
1129
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/bst.ts#L358">src/data-structures/binary-tree/bst.ts:358</a></li></ul></aside></li></ul></section>
1130
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="isBST" class="tsd-anchor"></a>
1131
- <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>
1132
- <ul class="tsd-signatures tsd-is-inherited">
1133
- <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>
1134
- <li class="tsd-description">
1135
- <div class="tsd-comment tsd-typography"><p>The <code>isBST</code> function checks if a binary tree is a binary search tree.</p>
1136
- </div>
1137
- <div class="tsd-parameters">
1138
- <h4 class="tsd-parameters-title">Parameters</h4>
1139
- <ul class="tsd-parameter-list">
1140
- <li>
1141
- <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>
1142
- <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
1143
- is provided, the function will default to using the root node of the BST instance that</p>
1144
- </div>
1145
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1146
- <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
1147
- tree, and <code>false</code> otherwise.</p>
1148
-
1149
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1150
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#isBST">isBST</a></p>
1151
- <ul>
1152
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/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>
1153
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="isBalanced" class="tsd-anchor"></a>
1154
- <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>
1155
- <ul class="tsd-signatures tsd-is-inherited">
1156
- <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>
1157
- <li class="tsd-description">
1158
- <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>
1159
- </div>
1160
- <div class="tsd-parameters">
1161
- <h4 class="tsd-parameters-title">Parameters</h4>
1162
- <ul class="tsd-parameter-list">
1163
- <li>
1164
- <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>
1165
- <div class="tsd-comment tsd-typography"><p>The <code>beginRoot</code> parameter is the root node of a binary tree. It is
1166
- 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>
1167
- </div>
1168
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1169
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The method is returning a boolean value.</p>
1170
-
1171
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1172
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#isBalanced">isBalanced</a></p>
1173
- <ul>
1174
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L561">src/data-structures/binary-tree/binary-tree.ts:561</a></li></ul></aside></li></ul></section>
1175
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="isEmpty" class="tsd-anchor"></a>
1176
- <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>
1177
- <ul class="tsd-signatures tsd-is-inherited">
1178
- <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>
1179
- <li class="tsd-description">
1180
- <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>
1181
- </div>
1182
- <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>
1183
-
1184
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1185
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#isEmpty">isEmpty</a></p>
1186
- <ul>
1187
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L237">src/data-structures/binary-tree/binary-tree.ts:237</a></li></ul></aside></li></ul></section>
1188
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="lastKey" class="tsd-anchor"></a>
1189
- <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>
1190
- <ul class="tsd-signatures tsd-is-inherited">
1191
- <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>
1192
- <li class="tsd-description">
1193
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
1194
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#lastKey">lastKey</a></p>
1195
- <ul>
1196
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/bst.ts#L116">src/data-structures/binary-tree/bst.ts:116</a></li></ul></aside></li></ul></section>
1197
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="lesserSum" class="tsd-anchor"></a>
1198
- <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>
1199
- <ul class="tsd-signatures tsd-is-inherited">
1200
- <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>
1201
- <li class="tsd-description">
1202
- <div class="tsd-parameters">
1203
- <h4 class="tsd-parameters-title">Parameters</h4>
1204
- <ul class="tsd-parameter-list">
1205
- <li>
1206
- <h5><span class="tsd-kind-parameter">id</span>: <span class="tsd-signature-type">number</span></h5></li>
1207
- <li>
1208
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">propertyName</span>: <span class="tsd-signature-type ">BinaryTreeNodePropertyName</span></h5></li></ul></div>
1209
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
1210
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#lesserSum">lesserSum</a></p>
1211
- <ul>
1212
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/bst.ts#L211">src/data-structures/binary-tree/bst.ts:211</a></li></ul></aside></li></ul></section>
1213
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="levelIterative" class="tsd-anchor"></a>
1214
- <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>
1215
- <ul class="tsd-signatures tsd-is-inherited">
1216
- <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>
1217
- <li class="tsd-description">
1218
- <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
1219
- in an array, based on a specified property name.</p>
1220
- </div>
1221
- <div class="tsd-parameters">
1222
- <h4 class="tsd-parameters-title">Parameters</h4>
1223
- <ul class="tsd-parameter-list">
1224
- <li>
1225
- <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>
1226
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
1227
- node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
1228
- the tree is used as the starting node.</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-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>
1232
-
1233
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1234
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#levelIterative">levelIterative</a></p>
1235
- <ul>
1236
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L1047">src/data-structures/binary-tree/binary-tree.ts:1047</a></li></ul></aside></li>
1237
- <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>
1238
- <li class="tsd-description">
1239
- <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
1240
- in an array, based on a specified property name.</p>
1241
- </div>
1242
- <div class="tsd-parameters">
1243
- <h4 class="tsd-parameters-title">Parameters</h4>
1244
- <ul class="tsd-parameter-list">
1245
- <li>
1246
- <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>
1247
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
1248
- node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
1249
- the tree is used as the starting node.</p>
1250
- </div>
1251
- <div class="tsd-comment tsd-typography"></div></li>
1252
- <li>
1253
- <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>
1254
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is an optional parameter that
1255
- 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
1256
- will accumulate results based on that property. If no property name is provided, the function will default to
1257
- accumulating results</p>
1258
- </div>
1259
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1260
- <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>
1261
-
1262
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1263
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#levelIterative">levelIterative</a></p>
1264
- <ul>
1265
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L1049">src/data-structures/binary-tree/binary-tree.ts:1049</a></li></ul></aside></li>
1266
- <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>
1267
- <li class="tsd-description">
1268
- <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
1269
- in an array, based on a specified property name.</p>
1270
- </div>
1271
- <div class="tsd-parameters">
1272
- <h4 class="tsd-parameters-title">Parameters</h4>
1273
- <ul class="tsd-parameter-list">
1274
- <li>
1275
- <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>
1276
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
1277
- node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
1278
- the tree is used as the starting node.</p>
1279
- </div>
1280
- <div class="tsd-comment tsd-typography"></div></li>
1281
- <li>
1282
- <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>
1283
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is an optional parameter that
1284
- 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
1285
- will accumulate results based on that property. If no property name is provided, the function will default to
1286
- accumulating results</p>
1287
- </div>
1288
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1289
- <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>
1290
-
1291
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1292
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#levelIterative">levelIterative</a></p>
1293
- <ul>
1294
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L1051">src/data-structures/binary-tree/binary-tree.ts:1051</a></li></ul></aside></li>
1295
- <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>
1296
- <li class="tsd-description">
1297
- <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
1298
- in an array, based on a specified property name.</p>
1299
- </div>
1300
- <div class="tsd-parameters">
1301
- <h4 class="tsd-parameters-title">Parameters</h4>
1302
- <ul class="tsd-parameter-list">
1303
- <li>
1304
- <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>
1305
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
1306
- node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
1307
- the tree is used as the starting node.</p>
1308
- </div>
1309
- <div class="tsd-comment tsd-typography"></div></li>
1310
- <li>
1311
- <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>
1312
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is an optional parameter that
1313
- 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
1314
- will accumulate results based on that property. If no property name is provided, the function will default to
1315
- accumulating results</p>
1316
- </div>
1317
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1318
- <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>
1319
-
1320
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1321
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#levelIterative">levelIterative</a></p>
1322
- <ul>
1323
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L1053">src/data-structures/binary-tree/binary-tree.ts:1053</a></li></ul></aside></li>
1324
- <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>
1325
- <li class="tsd-description">
1326
- <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
1327
- in an array, based on a specified property name.</p>
1328
- </div>
1329
- <div class="tsd-parameters">
1330
- <h4 class="tsd-parameters-title">Parameters</h4>
1331
- <ul class="tsd-parameter-list">
1332
- <li>
1333
- <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>
1334
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
1335
- node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
1336
- the tree is used as the starting node.</p>
1337
- </div>
1338
- <div class="tsd-comment tsd-typography"></div></li>
1339
- <li>
1340
- <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>
1341
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is an optional parameter that
1342
- 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
1343
- will accumulate results based on that property. If no property name is provided, the function will default to
1344
- accumulating results</p>
1345
- </div>
1346
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1347
- <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>
1348
-
1349
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1350
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#levelIterative">levelIterative</a></p>
1351
- <ul>
1352
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L1055">src/data-structures/binary-tree/binary-tree.ts:1055</a></li></ul></aside></li></ul></section>
1353
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="listLevels" class="tsd-anchor"></a>
1354
- <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>
1355
- <ul class="tsd-signatures tsd-is-inherited">
1356
- <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>
1357
- <li class="tsd-description">
1358
- <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>
1359
- </div>
1360
- <div class="tsd-parameters">
1361
- <h4 class="tsd-parameters-title">Parameters</h4>
1362
- <ul class="tsd-parameter-list">
1363
- <li>
1364
- <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>
1365
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
1366
- root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
1367
- </div>
1368
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1369
- <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>
1370
-
1371
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1372
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#listLevels">listLevels</a></p>
1373
- <ul>
1374
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L1093">src/data-structures/binary-tree/binary-tree.ts:1093</a></li></ul></aside></li>
1375
- <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>
1376
- <li class="tsd-description">
1377
- <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>
1378
- </div>
1379
- <div class="tsd-parameters">
1380
- <h4 class="tsd-parameters-title">Parameters</h4>
1381
- <ul class="tsd-parameter-list">
1382
- <li>
1383
- <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>
1384
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
1385
- root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
1386
- </div>
1387
- <div class="tsd-comment tsd-typography"></div></li>
1388
- <li>
1389
- <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>
1390
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is an optional parameter that
1391
- specifies the property of the <code>BinaryTreeNode</code> object to collect at each level. It can be one of the following
1392
- values:</p>
1393
- </div>
1394
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1395
- <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>
1396
-
1397
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1398
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#listLevels">listLevels</a></p>
1399
- <ul>
1400
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L1095">src/data-structures/binary-tree/binary-tree.ts:1095</a></li></ul></aside></li>
1401
- <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>
1402
- <li class="tsd-description">
1403
- <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>
1404
- </div>
1405
- <div class="tsd-parameters">
1406
- <h4 class="tsd-parameters-title">Parameters</h4>
1407
- <ul class="tsd-parameter-list">
1408
- <li>
1409
- <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>
1410
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
1411
- root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
1412
- </div>
1413
- <div class="tsd-comment tsd-typography"></div></li>
1414
- <li>
1415
- <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>
1416
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is an optional parameter that
1417
- specifies the property of the <code>BinaryTreeNode</code> object to collect at each level. It can be one of the following
1418
- values:</p>
1419
- </div>
1420
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1421
- <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>
1422
-
1423
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1424
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#listLevels">listLevels</a></p>
1425
- <ul>
1426
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L1097">src/data-structures/binary-tree/binary-tree.ts:1097</a></li></ul></aside></li>
1427
- <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>
1428
- <li class="tsd-description">
1429
- <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>
1430
- </div>
1431
- <div class="tsd-parameters">
1432
- <h4 class="tsd-parameters-title">Parameters</h4>
1433
- <ul class="tsd-parameter-list">
1434
- <li>
1435
- <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>
1436
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
1437
- root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
1438
- </div>
1439
- <div class="tsd-comment tsd-typography"></div></li>
1440
- <li>
1441
- <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>
1442
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is an optional parameter that
1443
- specifies the property of the <code>BinaryTreeNode</code> object to collect at each level. It can be one of the following
1444
- values:</p>
1445
- </div>
1446
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1447
- <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>
1448
-
1449
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1450
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#listLevels">listLevels</a></p>
1451
- <ul>
1452
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L1099">src/data-structures/binary-tree/binary-tree.ts:1099</a></li></ul></aside></li>
1453
- <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>
1454
- <li class="tsd-description">
1455
- <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>
1456
- </div>
1457
- <div class="tsd-parameters">
1458
- <h4 class="tsd-parameters-title">Parameters</h4>
1459
- <ul class="tsd-parameter-list">
1460
- <li>
1461
- <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>
1462
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
1463
- root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
1464
- </div>
1465
- <div class="tsd-comment tsd-typography"></div></li>
1466
- <li>
1467
- <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>
1468
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is an optional parameter that
1469
- specifies the property of the <code>BinaryTreeNode</code> object to collect at each level. It can be one of the following
1470
- values:</p>
1471
- </div>
1472
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1473
- <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>
1474
-
1475
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1476
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#listLevels">listLevels</a></p>
1477
- <ul>
1478
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L1101">src/data-structures/binary-tree/binary-tree.ts:1101</a></li></ul></aside></li></ul></section>
1479
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="morris" class="tsd-anchor"></a>
1480
- <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>
1481
- <ul class="tsd-signatures tsd-is-inherited">
1482
- <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>
1483
- <li class="tsd-description">
1484
- <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
1485
- traversal algorithm and returns the results based on the specified property name.
1486
- The time complexity of Morris traversal is O(n), it&#39;s may slower than others
1487
- The space complexity Morris traversal is O(1) because no using stack</p>
1488
- </div>
1489
- <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>
1490
-
1491
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1492
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#morris">morris</a></p>
1493
- <ul>
1494
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L1184">src/data-structures/binary-tree/binary-tree.ts:1184</a></li></ul></aside></li>
1495
- <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>
1496
- <li class="tsd-description">
1497
- <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
1498
- traversal algorithm and returns the results based on the specified property name.
1499
- The time complexity of Morris traversal is O(n), it&#39;s may slower than others
1500
- The space complexity Morris traversal is O(1) because no using stack</p>
1501
- </div>
1502
- <div class="tsd-parameters">
1503
- <h4 class="tsd-parameters-title">Parameters</h4>
1504
- <ul class="tsd-parameter-list">
1505
- <li>
1506
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pattern</span>: <span class="tsd-signature-type ">DFSOrderPattern</span></h5>
1507
- <div class="tsd-comment tsd-typography"><p>The <code>pattern</code> parameter is an optional parameter that determines the
1508
- traversal pattern of the binary tree. It can have one of three values:</p>
1509
- </div>
1510
- <div class="tsd-comment tsd-typography"></div></li>
1511
- <li>
1512
- <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>
1513
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is used to specify the
1514
- property of the nodes that you want to retrieve in the results. It can be either the node itself or the name of the
1515
- property. If not provided, it defaults to <code>&#39;id&#39;</code>.</p>
1516
- </div>
1517
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1518
- <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>
1519
-
1520
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1521
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#morris">morris</a></p>
1522
- <ul>
1523
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L1186">src/data-structures/binary-tree/binary-tree.ts:1186</a></li></ul></aside></li>
1524
- <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>
1525
- <li class="tsd-description">
1526
- <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
1527
- traversal algorithm and returns the results based on the specified property name.
1528
- The time complexity of Morris traversal is O(n), it&#39;s may slower than others
1529
- The space complexity Morris traversal is O(1) because no using stack</p>
1530
- </div>
1531
- <div class="tsd-parameters">
1532
- <h4 class="tsd-parameters-title">Parameters</h4>
1533
- <ul class="tsd-parameter-list">
1534
- <li>
1535
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pattern</span>: <span class="tsd-signature-type ">DFSOrderPattern</span></h5>
1536
- <div class="tsd-comment tsd-typography"><p>The <code>pattern</code> parameter is an optional parameter that determines the
1537
- traversal pattern of the binary tree. It can have one of three values:</p>
1538
- </div>
1539
- <div class="tsd-comment tsd-typography"></div></li>
1540
- <li>
1541
- <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>
1542
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is used to specify the
1543
- property of the nodes that you want to retrieve in the results. It can be either the node itself or the name of the
1544
- property. If not provided, it defaults to <code>&#39;id&#39;</code>.</p>
1545
- </div>
1546
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1547
- <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>
1548
-
1549
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1550
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#morris">morris</a></p>
1551
- <ul>
1552
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L1188">src/data-structures/binary-tree/binary-tree.ts:1188</a></li></ul></aside></li>
1553
- <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>
1554
- <li class="tsd-description">
1555
- <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
1556
- traversal algorithm and returns the results based on the specified property name.
1557
- The time complexity of Morris traversal is O(n), it&#39;s may slower than others
1558
- The space complexity Morris traversal is O(1) because no using stack</p>
1559
- </div>
1560
- <div class="tsd-parameters">
1561
- <h4 class="tsd-parameters-title">Parameters</h4>
1562
- <ul class="tsd-parameter-list">
1563
- <li>
1564
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pattern</span>: <span class="tsd-signature-type ">DFSOrderPattern</span></h5>
1565
- <div class="tsd-comment tsd-typography"><p>The <code>pattern</code> parameter is an optional parameter that determines the
1566
- traversal pattern of the binary tree. It can have one of three values:</p>
1567
- </div>
1568
- <div class="tsd-comment tsd-typography"></div></li>
1569
- <li>
1570
- <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>
1571
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is used to specify the
1572
- property of the nodes that you want to retrieve in the results. It can be either the node itself or the name of the
1573
- property. If not provided, it defaults to <code>&#39;id&#39;</code>.</p>
1574
- </div>
1575
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1576
- <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>
1577
-
1578
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1579
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#morris">morris</a></p>
1580
- <ul>
1581
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L1190">src/data-structures/binary-tree/binary-tree.ts:1190</a></li></ul></aside></li>
1582
- <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>
1583
- <li class="tsd-description">
1584
- <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
1585
- traversal algorithm and returns the results based on the specified property name.
1586
- The time complexity of Morris traversal is O(n), it&#39;s may slower than others
1587
- The space complexity Morris traversal is O(1) because no using stack</p>
1588
- </div>
1589
- <div class="tsd-parameters">
1590
- <h4 class="tsd-parameters-title">Parameters</h4>
1591
- <ul class="tsd-parameter-list">
1592
- <li>
1593
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pattern</span>: <span class="tsd-signature-type ">DFSOrderPattern</span></h5>
1594
- <div class="tsd-comment tsd-typography"><p>The <code>pattern</code> parameter is an optional parameter that determines the
1595
- traversal pattern of the binary tree. It can have one of three values:</p>
1596
- </div>
1597
- <div class="tsd-comment tsd-typography"></div></li>
1598
- <li>
1599
- <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>
1600
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is used to specify the
1601
- property of the nodes that you want to retrieve in the results. It can be either the node itself or the name of the
1602
- property. If not provided, it defaults to <code>&#39;id&#39;</code>.</p>
1603
- </div>
1604
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1605
- <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>
1606
-
1607
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1608
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#morris">morris</a></p>
1609
- <ul>
1610
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L1192">src/data-structures/binary-tree/binary-tree.ts:1192</a></li></ul></aside></li></ul></section>
1611
- <section class="tsd-panel tsd-member"><a id="put" class="tsd-anchor"></a>
1612
- <h3 class="tsd-anchor-link"><span>put</span><a href="#put" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
1613
- <ul class="tsd-signatures">
1614
- <li class="tsd-signature tsd-anchor-link" id="put.put-1"><span class="tsd-kind-call-signature">put</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="#put.put-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1615
- <li class="tsd-description">
1616
- <div class="tsd-comment tsd-typography"><p>The <code>put</code> function inserts a new node into a binary search tree, updating the count and value of an existing node if
1617
- the ID matches, and returns the inserted node.</p>
1618
- </div>
1619
- <div class="tsd-parameters">
1620
- <h4 class="tsd-parameters-title">Parameters</h4>
1621
- <ul class="tsd-parameter-list">
1622
- <li>
1623
- <h5><span class="tsd-kind-parameter">id</span>: <span class="tsd-signature-type">number</span></h5>
1624
- <div class="tsd-comment tsd-typography"><p>The <code>id</code> parameter represents the identifier of the binary tree node. It is used to
1625
- determine the position of the node in the binary search tree.</p>
1626
- </div>
1627
- <div class="tsd-comment tsd-typography"></div></li>
1628
- <li>
1629
- <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>
1630
- <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
1631
- be of type <code>T</code> (the generic type) or <code>null</code>.</p>
1632
- </div>
1633
- <div class="tsd-comment tsd-typography"></div></li>
1634
- <li>
1635
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">count</span>: <span class="tsd-signature-type">number</span></h5>
1636
- <div class="tsd-comment tsd-typography"><p>The <code>count</code> parameter represents the number of times the value should be inserted into
1637
- the binary search tree. By default, it is set to 1, meaning that if no count is specified, the value will be
1638
- inserted once.</p>
1639
- </div>
1640
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1641
- <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>put</code> returns a <code>BSTNode&lt;T&gt;</code> object or <code>null</code>.</p>
1642
-
1643
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1644
- <p>Overrides <a href="BST.html">BST</a>.<a href="BST.html#put">put</a></p>
1645
- <ul>
1646
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/tree-multiset.ts#L13">src/data-structures/binary-tree/tree-multiset.ts:13</a></li></ul></aside></li></ul></section>
1647
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="putTo" class="tsd-anchor"></a>
1648
- <h3 class="tsd-anchor-link"><span>put<wbr/>To</span><a href="#putTo" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
1649
- <ul class="tsd-signatures tsd-is-inherited">
1650
- <li class="tsd-signature tsd-anchor-link" id="putTo.putTo-1"><span class="tsd-kind-call-signature">put<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="#putTo.putTo-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1651
- <li class="tsd-description">
1652
- <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>
1653
- </div>
1654
- <div class="tsd-parameters">
1655
- <h4 class="tsd-parameters-title">Parameters</h4>
1656
- <ul class="tsd-parameter-list">
1657
- <li>
1658
- <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>
1659
- <div class="tsd-comment tsd-typography"><p>The <code>newNode</code> parameter is an instance of the <code>BinaryTreeNode</code> class or
1660
- <code>null</code>. It represents the node that needs to be inserted into the binary tree.</p>
1661
- </div>
1662
- <div class="tsd-comment tsd-typography"></div></li>
1663
- <li>
1664
- <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>
1665
- <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
1666
- will be inserted as a child.</p>
1667
- </div>
1668
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1669
- <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>
1670
-
1671
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1672
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#putTo">putTo</a></p>
1673
- <ul>
1674
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L249">src/data-structures/binary-tree/binary-tree.ts:249</a></li></ul></aside></li></ul></section>
1675
- <section class="tsd-panel tsd-member"><a id="remove" class="tsd-anchor"></a>
1676
- <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>
1677
- <ul class="tsd-signatures">
1678
- <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">isUpdateAllLeftSum</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type ">TreeMultiSetDeletedResult</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><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>
1679
- <li class="tsd-description">
1680
- <div class="tsd-comment tsd-typography"><p>The function removes a node from a binary tree and returns information about the deleted node.</p>
1681
- </div>
1682
- <div class="tsd-parameters">
1683
- <h4 class="tsd-parameters-title">Parameters</h4>
1684
- <ul class="tsd-parameter-list">
1685
- <li>
1686
- <h5><span class="tsd-kind-parameter">id</span>: <span class="tsd-signature-type">number</span></h5>
1687
- <div class="tsd-comment tsd-typography"><p>The <code>id</code> parameter is the identifier of the binary tree node that you want to remove.
1688
- It is of type <code>BinaryTreeNodeId</code>.</p>
1689
- </div>
1690
- <div class="tsd-comment tsd-typography"></div></li>
1691
- <li>
1692
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">isUpdateAllLeftSum</span>: <span class="tsd-signature-type">boolean</span></h5>
1693
- <div class="tsd-comment tsd-typography"><p>The <code>ignoreCount</code> parameter is an optional boolean parameter that determines
1694
- whether to ignore the count of the node being removed. If <code>ignoreCount</code> is set to <code>true</code>, the count of the node will
1695
- not be decremented and the overall count of the binary tree will not be updated. If `</p>
1696
- </div>
1697
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1698
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type ">TreeMultiSetDeletedResult</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></h4><p>An array of objects is being returned. Each object in the array has two properties: &quot;deleted&quot; and
1699
- &quot;needBalanced&quot;. The &quot;deleted&quot; property contains the deleted node or undefined if no node was deleted. The
1700
- &quot;needBalanced&quot; property is always null.</p>
1701
-
1702
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1703
- <p>Overrides <a href="BST.html">BST</a>.<a href="BST.html#remove">remove</a></p>
1704
- <ul>
1705
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/tree-multiset.ts#L17">src/data-structures/binary-tree/tree-multiset.ts:17</a></li></ul></aside></li></ul></section>
1706
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="subTreeAdd" class="tsd-anchor"></a>
1707
- <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>
1708
- <ul class="tsd-signatures tsd-is-inherited">
1709
- <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>
1710
- <li class="tsd-description">
1711
- <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>
1712
- </div>
1713
- <div class="tsd-parameters">
1714
- <h4 class="tsd-parameters-title">Parameters</h4>
1715
- <ul class="tsd-parameter-list">
1716
- <li>
1717
- <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>
1718
- <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>
1719
- </div>
1720
- <div class="tsd-comment tsd-typography"></div></li>
1721
- <li>
1722
- <h5><span class="tsd-kind-parameter">delta</span>: <span class="tsd-signature-type">number</span></h5>
1723
- <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
1724
- each node in the subtree should be increased or decreased.</p>
1725
- </div>
1726
- <div class="tsd-comment tsd-typography"></div></li>
1727
- <li>
1728
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">propertyName</span>: <span class="tsd-signature-type ">BinaryTreeNodePropertyName</span></h5>
1729
- <div class="tsd-comment tsd-typography"><p>The <code>propertyName</code> parameter is an optional parameter that
1730
- specifies the property of the <code>BinaryTreeNode</code> that should be modified. It defaults to <code>&#39;id&#39;</code> if not provided.</p>
1731
- </div>
1732
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1733
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>a boolean value, which is <code>true</code>.</p>
1734
-
1735
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1736
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#subTreeAdd">subTreeAdd</a></p>
1737
- <ul>
1738
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L861">src/data-structures/binary-tree/binary-tree.ts:861</a></li></ul></aside></li></ul></section>
1739
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="subTreeSum" class="tsd-anchor"></a>
1740
- <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>
1741
- <ul class="tsd-signatures tsd-is-inherited">
1742
- <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>
1743
- <li class="tsd-description">
1744
- <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
1745
- iteratively.</p>
1746
- </div>
1747
- <div class="tsd-parameters">
1748
- <h4 class="tsd-parameters-title">Parameters</h4>
1749
- <ul class="tsd-parameter-list">
1750
- <li>
1751
- <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>
1752
- <div class="tsd-comment tsd-typography"><p>The subTreeRoot parameter is the root node of the subtree for which you want to calculate the
1753
- sum.</p>
1754
- </div>
1755
- <div class="tsd-comment tsd-typography"></div></li>
1756
- <li>
1757
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">propertyName</span>: <span class="tsd-signature-type ">BinaryTreeNodePropertyName</span></h5>
1758
- <div class="tsd-comment tsd-typography"><p>The <code>propertyName</code> parameter is an optional parameter that
1759
- specifies the property of the <code>BinaryTreeNode</code> object to use for calculating the sum. If <code>propertyName</code> is not
1760
- provided, it defaults to <code>&#39;val&#39;</code>.</p>
1761
- </div>
1762
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1763
- <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>
1764
-
1765
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1766
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#subTreeSum">subTreeSum</a></p>
1767
- <ul>
1768
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/c6e933a/src/data-structures/binary-tree/binary-tree.ts#L805">src/data-structures/binary-tree/binary-tree.ts:805</a></li></ul></aside></li></ul></section></section></div>
1769
- <div class="col-sidebar">
1770
- <div class="page-menu">
1771
- <div class="tsd-navigation settings">
1772
- <details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
1773
- <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>
1774
- <div class="tsd-accordion-details">
1775
- <div class="tsd-filter-visibility">
1776
- <h4 class="uppercase">Member Visibility</h4><form>
1777
- <ul id="tsd-filter-options">
1778
- <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>
1779
- <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>
1780
- <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>
1781
- <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>
1782
- <div class="tsd-theme-toggle">
1783
- <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>
1784
- <details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary">
1785
- <h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="#icon-chevronDown"></use></svg>On This Page</h3></summary>
1786
- <div class="tsd-accordion-details">
1787
- <ul>
1788
- <li><a href="#constructor" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-512"></use></svg><span>constructor</span></a></li>
1789
- <li><a href="#_comparator" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-1024"></use></svg><span>_comparator</span></a></li>
1790
- <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>
1791
- <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>
1792
- <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>
1793
- <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>
1794
- <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>
1795
- <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>
1796
- <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>
1797
- <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>
1798
- <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>
1799
- <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>
1800
- <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>
1801
- <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>
1802
- <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>
1803
- <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>
1804
- <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>
1805
- <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>
1806
- <li><a href="#_compare" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_compare</span></a></li>
1807
- <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>
1808
- <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>
1809
- <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>
1810
- <li><a href="#allGreaterNodesAdd" class="tsd-is-inherited"><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>
1811
- <li><a href="#balance" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>balance</span></a></li>
1812
- <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>
1813
- <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>
1814
- <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>
1815
- <li><a href="#get" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get</span></a></li>
1816
- <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>
1817
- <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>
1818
- <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>
1819
- <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>
1820
- <li><a href="#getNodes" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>get<wbr/>Nodes</span></a></li>
1821
- <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>
1822
- <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>
1823
- <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>
1824
- <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>
1825
- <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>
1826
- <li><a href="#insertMany" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>insert<wbr/>Many</span></a></li>
1827
- <li><a href="#isAVLBalanced" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>isAVLBalanced</span></a></li>
1828
- <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>
1829
- <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>
1830
- <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>
1831
- <li><a href="#lastKey" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>last<wbr/>Key</span></a></li>
1832
- <li><a href="#lesserSum" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>lesser<wbr/>Sum</span></a></li>
1833
- <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>
1834
- <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>
1835
- <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>
1836
- <li><a href="#put" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>put</span></a></li>
1837
- <li><a href="#putTo" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>put<wbr/>To</span></a></li>
1838
- <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>
1839
- <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>
1840
- <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>
1841
- <div class="site-menu">
1842
- <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>
1843
- <ul class="tsd-small-nested-navigation">
1844
- <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>
1845
- <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>
1846
- <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>
1847
- <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>
1848
- <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>
1849
- <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>
1850
- <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>
1851
- <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>
1852
- <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>
1853
- <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>
1854
- <li><a href="BST.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>BST</span></a></li>
1855
- <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>
1856
- <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>
1857
- <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>
1858
- <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>
1859
- <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>
1860
- <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>
1861
- <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>
1862
- <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>
1863
- <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>
1864
- <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>
1865
- <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>
1866
- <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>
1867
- <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>
1868
- <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>
1869
- <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>
1870
- <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>
1871
- <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>
1872
- <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>
1873
- <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>
1874
- <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>
1875
- <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>
1876
- <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>
1877
- <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>
1878
- <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>
1879
- <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>
1880
- <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>
1881
- <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>
1882
- <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>
1883
- <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>
1884
- <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>
1885
- <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>
1886
- <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>
1887
- <li><a href="TreeMultiSet.html" class="current"><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>
1888
- <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>
1889
- <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>
1890
- <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>
1891
- <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>
1892
- <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>
1893
- <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>
1894
- <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></ul></nav></div></div></div>
1895
- <div class="tsd-generator">
1896
- <p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
1897
- <div class="overlay"></div></body></html>