data-structure-typed 1.18.7 → 1.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (269) hide show
  1. package/README.md +208 -419
  2. package/dist/data-structures/binary-tree/abstract-binary-tree.d.ts +198 -167
  3. package/dist/data-structures/binary-tree/abstract-binary-tree.js +413 -398
  4. package/dist/data-structures/binary-tree/avl-tree.d.ts +24 -16
  5. package/dist/data-structures/binary-tree/avl-tree.js +23 -17
  6. package/dist/data-structures/binary-tree/binary-tree.d.ts +12 -26
  7. package/dist/data-structures/binary-tree/binary-tree.js +12 -27
  8. package/dist/data-structures/binary-tree/bst.d.ts +66 -90
  9. package/dist/data-structures/binary-tree/bst.js +85 -163
  10. package/dist/data-structures/binary-tree/rb-tree.d.ts +6 -17
  11. package/dist/data-structures/binary-tree/rb-tree.js +5 -17
  12. package/dist/data-structures/binary-tree/tree-multiset.d.ts +187 -18
  13. package/dist/data-structures/binary-tree/tree-multiset.js +716 -39
  14. package/dist/data-structures/graph/abstract-graph.d.ts +112 -52
  15. package/dist/data-structures/graph/abstract-graph.js +138 -72
  16. package/dist/data-structures/graph/directed-graph.d.ts +104 -101
  17. package/dist/data-structures/graph/directed-graph.js +134 -129
  18. package/dist/data-structures/graph/undirected-graph.d.ts +66 -65
  19. package/dist/data-structures/graph/undirected-graph.js +107 -106
  20. package/dist/data-structures/interfaces/abstract-binary-tree.d.ts +12 -18
  21. package/dist/data-structures/interfaces/abstract-graph.d.ts +2 -4
  22. package/dist/data-structures/interfaces/avl-tree.d.ts +2 -2
  23. package/dist/data-structures/interfaces/binary-tree.d.ts +1 -1
  24. package/dist/data-structures/interfaces/bst.d.ts +4 -5
  25. package/dist/data-structures/interfaces/rb-tree.d.ts +2 -3
  26. package/dist/data-structures/interfaces/tree-multiset.d.ts +7 -1
  27. package/dist/data-structures/tree/tree.d.ts +1 -4
  28. package/dist/data-structures/tree/tree.js +1 -12
  29. package/dist/data-structures/types/abstract-binary-tree.d.ts +10 -6
  30. package/dist/data-structures/types/abstract-binary-tree.js +9 -5
  31. package/dist/data-structures/types/avl-tree.d.ts +1 -1
  32. package/dist/data-structures/types/binary-tree.d.ts +1 -1
  33. package/dist/data-structures/types/bst.d.ts +1 -1
  34. package/dist/data-structures/types/bst.js +1 -1
  35. package/dist/data-structures/types/directed-graph.js +1 -1
  36. package/dist/data-structures/types/helpers.d.ts +1 -8
  37. package/dist/data-structures/types/rb-tree.d.ts +2 -0
  38. package/dist/data-structures/types/rb-tree.js +1 -1
  39. package/dist/data-structures/types/tree-multiset.d.ts +5 -5
  40. package/dist/utils/index.d.ts +1 -0
  41. package/dist/utils/index.js +1 -0
  42. package/dist/utils/types/index.d.ts +1 -0
  43. package/dist/utils/types/index.js +1 -0
  44. package/dist/utils/types/validate-type.d.ts +19 -0
  45. package/dist/utils/types/validate-type.js +2 -0
  46. package/dist/utils/utils.d.ts +2 -2
  47. package/dist/utils/utils.js +0 -62
  48. package/dist/utils/validate-type.d.ts +45 -0
  49. package/dist/utils/validate-type.js +58 -0
  50. package/package.json +5 -2
  51. package/backup/recursive-type/src/assets/complexities-diff.jpg +0 -0
  52. package/backup/recursive-type/src/assets/data-structure-complexities.jpg +0 -0
  53. package/backup/recursive-type/src/assets/logo.png +0 -0
  54. package/backup/recursive-type/src/assets/overview-diagram-of-data-structures.png +0 -0
  55. package/backup/recursive-type/src/data-structures/binary-tree/aa-tree.ts +0 -3
  56. package/backup/recursive-type/src/data-structures/binary-tree/avl-tree.ts +0 -288
  57. package/backup/recursive-type/src/data-structures/binary-tree/b-tree.ts +0 -3
  58. package/backup/recursive-type/src/data-structures/binary-tree/binary-indexed-tree.ts +0 -78
  59. package/backup/recursive-type/src/data-structures/binary-tree/binary-tree.ts +0 -1502
  60. package/backup/recursive-type/src/data-structures/binary-tree/bst.ts +0 -503
  61. package/backup/recursive-type/src/data-structures/binary-tree/diagrams/avl-tree-inserting.gif +0 -0
  62. package/backup/recursive-type/src/data-structures/binary-tree/diagrams/bst-rotation.gif +0 -0
  63. package/backup/recursive-type/src/data-structures/binary-tree/diagrams/segment-tree.png +0 -0
  64. package/backup/recursive-type/src/data-structures/binary-tree/index.ts +0 -11
  65. package/backup/recursive-type/src/data-structures/binary-tree/rb-tree.ts +0 -110
  66. package/backup/recursive-type/src/data-structures/binary-tree/segment-tree.ts +0 -243
  67. package/backup/recursive-type/src/data-structures/binary-tree/splay-tree.ts +0 -3
  68. package/backup/recursive-type/src/data-structures/binary-tree/tree-multiset.ts +0 -55
  69. package/backup/recursive-type/src/data-structures/binary-tree/two-three-tree.ts +0 -3
  70. package/backup/recursive-type/src/data-structures/diagrams/README.md +0 -5
  71. package/backup/recursive-type/src/data-structures/graph/abstract-graph.ts +0 -985
  72. package/backup/recursive-type/src/data-structures/graph/diagrams/adjacency-list-pros-cons.jpg +0 -0
  73. package/backup/recursive-type/src/data-structures/graph/diagrams/adjacency-list.jpg +0 -0
  74. package/backup/recursive-type/src/data-structures/graph/diagrams/adjacency-matrix-pros-cons.jpg +0 -0
  75. package/backup/recursive-type/src/data-structures/graph/diagrams/adjacency-matrix.jpg +0 -0
  76. package/backup/recursive-type/src/data-structures/graph/diagrams/dfs-can-do.jpg +0 -0
  77. package/backup/recursive-type/src/data-structures/graph/diagrams/edge-list-pros-cons.jpg +0 -0
  78. package/backup/recursive-type/src/data-structures/graph/diagrams/edge-list.jpg +0 -0
  79. package/backup/recursive-type/src/data-structures/graph/diagrams/max-flow.jpg +0 -0
  80. package/backup/recursive-type/src/data-structures/graph/diagrams/mst.jpg +0 -0
  81. package/backup/recursive-type/src/data-structures/graph/diagrams/tarjan-articulation-point-bridge.png +0 -0
  82. package/backup/recursive-type/src/data-structures/graph/diagrams/tarjan-complicate-simple.png +0 -0
  83. package/backup/recursive-type/src/data-structures/graph/diagrams/tarjan-strongly-connected-component.png +0 -0
  84. package/backup/recursive-type/src/data-structures/graph/diagrams/tarjan.mp4 +0 -0
  85. package/backup/recursive-type/src/data-structures/graph/diagrams/tarjan.webp +0 -0
  86. package/backup/recursive-type/src/data-structures/graph/directed-graph.ts +0 -478
  87. package/backup/recursive-type/src/data-structures/graph/index.ts +0 -3
  88. package/backup/recursive-type/src/data-structures/graph/undirected-graph.ts +0 -293
  89. package/backup/recursive-type/src/data-structures/hash/coordinate-map.ts +0 -67
  90. package/backup/recursive-type/src/data-structures/hash/coordinate-set.ts +0 -56
  91. package/backup/recursive-type/src/data-structures/hash/hash-table.ts +0 -3
  92. package/backup/recursive-type/src/data-structures/hash/index.ts +0 -6
  93. package/backup/recursive-type/src/data-structures/hash/pair.ts +0 -3
  94. package/backup/recursive-type/src/data-structures/hash/tree-map.ts +0 -3
  95. package/backup/recursive-type/src/data-structures/hash/tree-set.ts +0 -3
  96. package/backup/recursive-type/src/data-structures/heap/heap.ts +0 -176
  97. package/backup/recursive-type/src/data-structures/heap/index.ts +0 -3
  98. package/backup/recursive-type/src/data-structures/heap/max-heap.ts +0 -31
  99. package/backup/recursive-type/src/data-structures/heap/min-heap.ts +0 -34
  100. package/backup/recursive-type/src/data-structures/index.ts +0 -15
  101. package/backup/recursive-type/src/data-structures/interfaces/abstract-graph.ts +0 -42
  102. package/backup/recursive-type/src/data-structures/interfaces/avl-tree.ts +0 -1
  103. package/backup/recursive-type/src/data-structures/interfaces/binary-tree.ts +0 -56
  104. package/backup/recursive-type/src/data-structures/interfaces/bst.ts +0 -1
  105. package/backup/recursive-type/src/data-structures/interfaces/directed-graph.ts +0 -15
  106. package/backup/recursive-type/src/data-structures/interfaces/doubly-linked-list.ts +0 -1
  107. package/backup/recursive-type/src/data-structures/interfaces/heap.ts +0 -1
  108. package/backup/recursive-type/src/data-structures/interfaces/index.ts +0 -13
  109. package/backup/recursive-type/src/data-structures/interfaces/navigator.ts +0 -1
  110. package/backup/recursive-type/src/data-structures/interfaces/priority-queue.ts +0 -1
  111. package/backup/recursive-type/src/data-structures/interfaces/segment-tree.ts +0 -1
  112. package/backup/recursive-type/src/data-structures/interfaces/singly-linked-list.ts +0 -1
  113. package/backup/recursive-type/src/data-structures/interfaces/tree-multiset.ts +0 -1
  114. package/backup/recursive-type/src/data-structures/interfaces/undirected-graph.ts +0 -3
  115. package/backup/recursive-type/src/data-structures/linked-list/doubly-linked-list.ts +0 -573
  116. package/backup/recursive-type/src/data-structures/linked-list/index.ts +0 -3
  117. package/backup/recursive-type/src/data-structures/linked-list/singly-linked-list.ts +0 -490
  118. package/backup/recursive-type/src/data-structures/linked-list/skip-linked-list.ts +0 -3
  119. package/backup/recursive-type/src/data-structures/matrix/index.ts +0 -4
  120. package/backup/recursive-type/src/data-structures/matrix/matrix.ts +0 -27
  121. package/backup/recursive-type/src/data-structures/matrix/matrix2d.ts +0 -208
  122. package/backup/recursive-type/src/data-structures/matrix/navigator.ts +0 -122
  123. package/backup/recursive-type/src/data-structures/matrix/vector2d.ts +0 -316
  124. package/backup/recursive-type/src/data-structures/priority-queue/index.ts +0 -3
  125. package/backup/recursive-type/src/data-structures/priority-queue/max-priority-queue.ts +0 -49
  126. package/backup/recursive-type/src/data-structures/priority-queue/min-priority-queue.ts +0 -50
  127. package/backup/recursive-type/src/data-structures/priority-queue/priority-queue.ts +0 -354
  128. package/backup/recursive-type/src/data-structures/queue/deque.ts +0 -251
  129. package/backup/recursive-type/src/data-structures/queue/index.ts +0 -2
  130. package/backup/recursive-type/src/data-structures/queue/queue.ts +0 -120
  131. package/backup/recursive-type/src/data-structures/stack/index.ts +0 -1
  132. package/backup/recursive-type/src/data-structures/stack/stack.ts +0 -98
  133. package/backup/recursive-type/src/data-structures/tree/index.ts +0 -1
  134. package/backup/recursive-type/src/data-structures/tree/tree.ts +0 -80
  135. package/backup/recursive-type/src/data-structures/trie/index.ts +0 -1
  136. package/backup/recursive-type/src/data-structures/trie/trie.ts +0 -227
  137. package/backup/recursive-type/src/data-structures/types/abstract-graph.ts +0 -5
  138. package/backup/recursive-type/src/data-structures/types/avl-tree.ts +0 -8
  139. package/backup/recursive-type/src/data-structures/types/binary-tree.ts +0 -10
  140. package/backup/recursive-type/src/data-structures/types/bst.ts +0 -6
  141. package/backup/recursive-type/src/data-structures/types/directed-graph.ts +0 -8
  142. package/backup/recursive-type/src/data-structures/types/doubly-linked-list.ts +0 -1
  143. package/backup/recursive-type/src/data-structures/types/heap.ts +0 -5
  144. package/backup/recursive-type/src/data-structures/types/index.ts +0 -12
  145. package/backup/recursive-type/src/data-structures/types/navigator.ts +0 -13
  146. package/backup/recursive-type/src/data-structures/types/priority-queue.ts +0 -9
  147. package/backup/recursive-type/src/data-structures/types/segment-tree.ts +0 -1
  148. package/backup/recursive-type/src/data-structures/types/singly-linked-list.ts +0 -1
  149. package/backup/recursive-type/src/data-structures/types/tree-multiset.ts +0 -1
  150. package/backup/recursive-type/src/index.ts +0 -1
  151. package/backup/recursive-type/src/utils/index.ts +0 -2
  152. package/backup/recursive-type/src/utils/types/index.ts +0 -1
  153. package/backup/recursive-type/src/utils/types/utils.ts +0 -6
  154. package/backup/recursive-type/src/utils/utils.ts +0 -78
  155. package/docs/.nojekyll +0 -1
  156. package/docs/assets/highlight.css +0 -92
  157. package/docs/assets/main.js +0 -58
  158. package/docs/assets/search.js +0 -1
  159. package/docs/assets/style.css +0 -1367
  160. package/docs/classes/AVLTree.html +0 -2451
  161. package/docs/classes/AVLTreeNode.html +0 -499
  162. package/docs/classes/AaTree.html +0 -172
  163. package/docs/classes/AbstractBinaryTree.html +0 -2118
  164. package/docs/classes/AbstractBinaryTreeNode.html +0 -524
  165. package/docs/classes/AbstractEdge.html +0 -295
  166. package/docs/classes/AbstractGraph.html +0 -1043
  167. package/docs/classes/AbstractVertex.html +0 -258
  168. package/docs/classes/ArrayDeque.html +0 -439
  169. package/docs/classes/BST.html +0 -2297
  170. package/docs/classes/BSTNode.html +0 -503
  171. package/docs/classes/BTree.html +0 -172
  172. package/docs/classes/BinaryIndexedTree.html +0 -341
  173. package/docs/classes/BinaryTree.html +0 -2133
  174. package/docs/classes/BinaryTreeNode.html +0 -501
  175. package/docs/classes/Character.html +0 -220
  176. package/docs/classes/CoordinateMap.html +0 -483
  177. package/docs/classes/CoordinateSet.html +0 -444
  178. package/docs/classes/Deque.html +0 -975
  179. package/docs/classes/DirectedEdge.html +0 -366
  180. package/docs/classes/DirectedGraph.html +0 -1443
  181. package/docs/classes/DirectedVertex.html +0 -254
  182. package/docs/classes/DoublyLinkedList.html +0 -968
  183. package/docs/classes/DoublyLinkedListNode.html +0 -297
  184. package/docs/classes/HashTable.html +0 -172
  185. package/docs/classes/Heap.html +0 -423
  186. package/docs/classes/HeapItem.html +0 -255
  187. package/docs/classes/Matrix2D.html +0 -502
  188. package/docs/classes/MatrixNTI2D.html +0 -240
  189. package/docs/classes/MaxHeap.html +0 -436
  190. package/docs/classes/MaxPriorityQueue.html +0 -836
  191. package/docs/classes/MinHeap.html +0 -437
  192. package/docs/classes/MinPriorityQueue.html +0 -838
  193. package/docs/classes/Navigator.html +0 -313
  194. package/docs/classes/ObjectDeque.html +0 -455
  195. package/docs/classes/Pair.html +0 -172
  196. package/docs/classes/PriorityQueue.html +0 -760
  197. package/docs/classes/Queue.html +0 -392
  198. package/docs/classes/RBTree.html +0 -2388
  199. package/docs/classes/RBTreeNode.html +0 -516
  200. package/docs/classes/SegmentTree.html +0 -434
  201. package/docs/classes/SegmentTreeNode.html +0 -357
  202. package/docs/classes/SinglyLinkedList.html +0 -788
  203. package/docs/classes/SinglyLinkedListNode.html +0 -270
  204. package/docs/classes/SkipLinkedList.html +0 -172
  205. package/docs/classes/SplayTree.html +0 -172
  206. package/docs/classes/Stack.html +0 -368
  207. package/docs/classes/TreeMap.html +0 -172
  208. package/docs/classes/TreeMultiSet.html +0 -2297
  209. package/docs/classes/TreeMultiSetNode.html +0 -499
  210. package/docs/classes/TreeNode.html +0 -343
  211. package/docs/classes/TreeSet.html +0 -172
  212. package/docs/classes/Trie.html +0 -372
  213. package/docs/classes/TrieNode.html +0 -280
  214. package/docs/classes/TwoThreeTree.html +0 -172
  215. package/docs/classes/UndirectedEdge.html +0 -337
  216. package/docs/classes/UndirectedGraph.html +0 -1210
  217. package/docs/classes/UndirectedVertex.html +0 -254
  218. package/docs/classes/Vector2D.html +0 -805
  219. package/docs/enums/CP.html +0 -181
  220. package/docs/enums/FamilyPosition.html +0 -181
  221. package/docs/enums/LoopType.html +0 -182
  222. package/docs/enums/RBColor.html +0 -174
  223. package/docs/enums/TopologicalProperty.html +0 -181
  224. package/docs/index.html +0 -645
  225. package/docs/interfaces/IAVLTree.html +0 -1378
  226. package/docs/interfaces/IAVLTreeNode.html +0 -405
  227. package/docs/interfaces/IAbstractBinaryTree.html +0 -1124
  228. package/docs/interfaces/IAbstractBinaryTreeNode.html +0 -384
  229. package/docs/interfaces/IAbstractGraph.html +0 -433
  230. package/docs/interfaces/IBST.html +0 -1271
  231. package/docs/interfaces/IBSTNode.html +0 -408
  232. package/docs/interfaces/IDirectedGraph.html +0 -572
  233. package/docs/interfaces/IUNDirectedGraph.html +0 -465
  234. package/docs/modules.html +0 -262
  235. package/docs/types/AVLTreeOptions.html +0 -150
  236. package/docs/types/AbstractBinaryTreeNodeProperties.html +0 -152
  237. package/docs/types/AbstractBinaryTreeNodeProperty.html +0 -152
  238. package/docs/types/AbstractBinaryTreeOptions.html +0 -156
  239. package/docs/types/AbstractRecursiveBinaryTreeNode.html +0 -152
  240. package/docs/types/BSTComparator.html +0 -162
  241. package/docs/types/BSTOptions.html +0 -152
  242. package/docs/types/BinaryTreeDeletedResult.html +0 -159
  243. package/docs/types/BinaryTreeNodeId.html +0 -147
  244. package/docs/types/BinaryTreeNodePropertyName.html +0 -147
  245. package/docs/types/BinaryTreeOptions.html +0 -150
  246. package/docs/types/DFSOrderPattern.html +0 -147
  247. package/docs/types/DijkstraResult.html +0 -167
  248. package/docs/types/Direction.html +0 -147
  249. package/docs/types/EdgeId.html +0 -147
  250. package/docs/types/HeapOptions.html +0 -168
  251. package/docs/types/IdObject.html +0 -157
  252. package/docs/types/KeyValObject.html +0 -152
  253. package/docs/types/NavigatorParams.html +0 -181
  254. package/docs/types/NodeOrPropertyName.html +0 -147
  255. package/docs/types/PriorityQueueComparator.html +0 -167
  256. package/docs/types/PriorityQueueDFSOrderPattern.html +0 -147
  257. package/docs/types/PriorityQueueOptions.html +0 -161
  258. package/docs/types/RBTreeOptions.html +0 -150
  259. package/docs/types/RecursiveAVLTreeNode.html +0 -152
  260. package/docs/types/RecursiveBSTNode.html +0 -152
  261. package/docs/types/RecursiveBinaryTreeNode.html +0 -152
  262. package/docs/types/RecursiveTreeMultiSetNode.html +0 -152
  263. package/docs/types/SegmentTreeNodeVal.html +0 -147
  264. package/docs/types/TopologicalStatus.html +0 -147
  265. package/docs/types/TreeMultiSetOptions.html +0 -152
  266. package/docs/types/Turning.html +0 -147
  267. package/docs/types/VertexId.html +0 -147
  268. package/notes/bst.test.ts +0 -181
  269. package/notes/note.md +0 -34
@@ -1,2451 +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>AVLTree | 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="AVLTree.html">AVLTree</a></li></ul>
17
- <h1>Class AVLTree&lt;N&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">N</span><span class="tsd-signature-symbol"> extends </span><a href="AVLTreeNode.html" class="tsd-signature-type tsd-kind-class">AVLTreeNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">&quot;val&quot;</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">&gt;</span> = <a href="AVLTreeNode.html" class="tsd-signature-type tsd-kind-class">AVLTreeNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</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">N</span><span class="tsd-signature-symbol">&gt;</span>
27
- <ul class="tsd-hierarchy">
28
- <li><span class="target">AVLTree</span></li></ul></li></ul></section>
29
- <section class="tsd-panel">
30
- <h4>Implements</h4>
31
- <ul class="tsd-hierarchy">
32
- <li><a href="../interfaces/IAVLTree.html" class="tsd-signature-type tsd-kind-interface">IAVLTree</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">&gt;</span></li></ul></section><aside class="tsd-sources">
33
- <ul>
34
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/avl-tree.ts#L18">src/data-structures/binary-tree/avl-tree.ts:18</a></li></ul></aside>
35
- <section class="tsd-panel-group tsd-index-group">
36
- <section class="tsd-panel tsd-index-panel">
37
- <details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
38
- <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>
39
- <div class="tsd-accordion-details">
40
- <section class="tsd-index-section">
41
- <h3 class="tsd-index-heading">Constructors</h3>
42
- <div class="tsd-index-list"><a href="AVLTree.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-512"><rect fill="var(--color-icon-background)" stroke="#4D7FFF" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)"></path></g></svg><span>constructor</span></a>
43
- </div></section>
44
- <section class="tsd-index-section">
45
- <h3 class="tsd-index-heading">Properties</h3>
46
- <div class="tsd-index-list"><a href="AVLTree.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>
47
- </div></section>
48
- <section class="tsd-index-section">
49
- <h3 class="tsd-index-heading">Accessors</h3>
50
- <div class="tsd-index-list"><a href="AVLTree.html#autoIncrementId" 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>auto<wbr/>Increment<wbr/>Id</span></a>
51
- <a href="AVLTree.html#count" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>count</span></a>
52
- <a href="AVLTree.html#isDuplicatedVal" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>is<wbr/>Duplicated<wbr/>Val</span></a>
53
- <a href="AVLTree.html#loopType" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>loop<wbr/>Type</span></a>
54
- <a href="AVLTree.html#maxId" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>max<wbr/>Id</span></a>
55
- <a href="AVLTree.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>
56
- <a href="AVLTree.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>
57
- <a href="AVLTree.html#visitedCount" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>visited<wbr/>Count</span></a>
58
- <a href="AVLTree.html#visitedId" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>visited<wbr/>Id</span></a>
59
- <a href="AVLTree.html#visitedLeftSum" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>visited<wbr/>Left<wbr/>Sum</span></a>
60
- <a href="AVLTree.html#visitedNode" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>visited<wbr/>Node</span></a>
61
- <a href="AVLTree.html#visitedVal" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>visited<wbr/>Val</span></a>
62
- </div></section>
63
- <section class="tsd-index-section">
64
- <h3 class="tsd-index-heading">Methods</h3>
65
- <div class="tsd-index-list"><a href="AVLTree.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>
66
- <a href="AVLTree.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>
67
- <a href="AVLTree.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>
68
- <a href="AVLTree.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>
69
- <a href="AVLTree.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>
70
- <a href="AVLTree.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>
71
- <a href="AVLTree.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>
72
- <a href="AVLTree.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>
73
- <a href="AVLTree.html#_setAutoIncrementId" 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>_set<wbr/>Auto<wbr/>Increment<wbr/>Id</span></a>
74
- <a href="AVLTree.html#_setCount" 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>_set<wbr/>Count</span></a>
75
- <a href="AVLTree.html#_setIsDuplicatedVal" 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>_set<wbr/>Is<wbr/>Duplicated<wbr/>Val</span></a>
76
- <a href="AVLTree.html#_setLoopType" 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>_set<wbr/>Loop<wbr/>Type</span></a>
77
- <a href="AVLTree.html#_setMaxId" 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>_set<wbr/>Max<wbr/>Id</span></a>
78
- <a href="AVLTree.html#_setRoot" 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>_set<wbr/>Root</span></a>
79
- <a href="AVLTree.html#_setSize" 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>_set<wbr/>Size</span></a>
80
- <a href="AVLTree.html#_setVisitedId" 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>_set<wbr/>Visited<wbr/>Id</span></a>
81
- <a href="AVLTree.html#_setVisitedLeftSum" 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>_set<wbr/>Visited<wbr/>Left<wbr/>Sum</span></a>
82
- <a href="AVLTree.html#_setVisitedNode" 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>_set<wbr/>Visited<wbr/>Node</span></a>
83
- <a href="AVLTree.html#_setVisitedVal" 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>_set<wbr/>Visited<wbr/>Val</span></a>
84
- <a href="AVLTree.html#add" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>add</span></a>
85
- <a href="AVLTree.html#addMany" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>add<wbr/>Many</span></a>
86
- <a href="AVLTree.html#addTo" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>add<wbr/>To</span></a>
87
- <a href="AVLTree.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>
88
- <a href="AVLTree.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>
89
- <a href="AVLTree.html#balanceFactor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>balance<wbr/>Factor</span></a>
90
- <a href="AVLTree.html#balanceLL" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>balanceLL</span></a>
91
- <a href="AVLTree.html#balanceLR" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>balanceLR</span></a>
92
- <a href="AVLTree.html#balancePath" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>balance<wbr/>Path</span></a>
93
- <a href="AVLTree.html#balanceRL" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>balanceRL</span></a>
94
- <a href="AVLTree.html#balanceRR" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>balanceRR</span></a>
95
- <a href="AVLTree.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>
96
- <a href="AVLTree.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>
97
- <a href="AVLTree.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>
98
- <a href="AVLTree.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>
99
- <a href="AVLTree.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>
100
- <a href="AVLTree.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>
101
- <a href="AVLTree.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>
102
- <a href="AVLTree.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>
103
- <a href="AVLTree.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>
104
- <a href="AVLTree.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>
105
- <a href="AVLTree.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>
106
- <a href="AVLTree.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>
107
- <a href="AVLTree.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>
108
- <a href="AVLTree.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>
109
- <a href="AVLTree.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>
110
- <a href="AVLTree.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>
111
- <a href="AVLTree.html#isBSTByRooted" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>isBSTBy<wbr/>Rooted</span></a>
112
- <a href="AVLTree.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>
113
- <a href="AVLTree.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>
114
- <a href="AVLTree.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>
115
- <a href="AVLTree.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>
116
- <a href="AVLTree.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>
117
- <a href="AVLTree.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>
118
- <a href="AVLTree.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>
119
- <a href="AVLTree.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>
120
- <a href="AVLTree.html#setVisitedCount" 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>set<wbr/>Visited<wbr/>Count</span></a>
121
- <a href="AVLTree.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>
122
- <a href="AVLTree.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>
123
- <a href="AVLTree.html#updateHeight" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>update<wbr/>Height</span></a>
124
- </div></section></div></details></section></section>
125
- <section class="tsd-panel-group tsd-member-group">
126
- <h2>Constructors</h2>
127
- <section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a>
128
- <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>
129
- <ul class="tsd-signatures">
130
- <li class="tsd-signature tsd-anchor-link" id="constructor.new_AVLTree"><span class="tsd-kind-constructor-signature">new AVLTree</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">N</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="AVLTree.html" class="tsd-signature-type tsd-kind-class">AVLTree</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">&gt;</span><a href="#constructor.new_AVLTree" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
131
- <li class="tsd-description">
132
- <section class="tsd-panel">
133
- <h4>Type Parameters</h4>
134
- <ul class="tsd-type-parameter-list">
135
- <li>
136
- <h4><span class="tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol"> extends </span><a href="AVLTreeNode.html" class="tsd-signature-type tsd-kind-class">AVLTreeNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">&quot;val&quot;</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">&gt;</span> = <a href="AVLTreeNode.html" class="tsd-signature-type tsd-kind-class">AVLTreeNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">, </span><a href="../types/RecursiveAVLTreeNode.html" class="tsd-signature-type tsd-kind-type-alias">RecursiveAVLTreeNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">&gt;</span></h4></li></ul></section>
137
- <div class="tsd-parameters">
138
- <h4 class="tsd-parameters-title">Parameters</h4>
139
- <ul class="tsd-parameter-list">
140
- <li>
141
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">options</span>: <a href="../types/AVLTreeOptions.html" class="tsd-signature-type tsd-kind-type-alias">AVLTreeOptions</a></h5></li></ul></div>
142
- <h4 class="tsd-returns-title">Returns <a href="AVLTree.html" class="tsd-signature-type tsd-kind-class">AVLTree</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources">
143
- <p>Overrides <a href="BST.html">BST</a>.<a href="BST.html#constructor">constructor</a></p>
144
- <ul>
145
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/avl-tree.ts#L19">src/data-structures/binary-tree/avl-tree.ts:19</a></li></ul></aside></li></ul></section></section>
146
- <section class="tsd-panel-group tsd-member-group">
147
- <h2>Properties</h2>
148
- <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_comparator" class="tsd-anchor"></a>
149
- <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>
150
- <div class="tsd-signature"><span class="tsd-kind-property">_comparator</span><span class="tsd-signature-symbol">:</span> <a href="../types/BSTComparator.html" class="tsd-signature-type tsd-kind-type-alias">BSTComparator</a><span class="tsd-signature-symbol"> = ...</span></div><aside class="tsd-sources">
151
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_comparator">_comparator</a></p>
152
- <ul>
153
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/bst.ts#L496">src/data-structures/binary-tree/bst.ts:496</a></li></ul></aside></section></section>
154
- <section class="tsd-panel-group tsd-member-group">
155
- <h2>Accessors</h2>
156
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="autoIncrementId" class="tsd-anchor"></a>
157
- <h3 class="tsd-anchor-link"><span>auto<wbr/>Increment<wbr/>Id</span><a href="#autoIncrementId" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
158
- <ul class="tsd-signatures tsd-is-inherited">
159
- <li class="tsd-signature" id="autoIncrementId.autoIncrementId-1"><span class="tsd-signature-symbol">get</span> autoIncrementId<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></li>
160
- <li class="tsd-description">
161
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
162
- <p>Implementation of IAVLTree.autoIncrementId</p>
163
- <p>Inherited from BST.autoIncrementId</p>
164
- <ul>
165
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L224">src/data-structures/binary-tree/abstract-binary-tree.ts:224</a></li></ul></aside></li></ul></section>
166
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="count" class="tsd-anchor"></a>
167
- <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>
168
- <ul class="tsd-signatures tsd-is-inherited">
169
- <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>
170
- <li class="tsd-description">
171
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
172
- <p>Implementation of IAVLTree.count</p>
173
- <p>Inherited from BST.count</p>
174
- <ul>
175
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L254">src/data-structures/binary-tree/abstract-binary-tree.ts:254</a></li></ul></aside></li></ul></section>
176
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="isDuplicatedVal" class="tsd-anchor"></a>
177
- <h3 class="tsd-anchor-link"><span>is<wbr/>Duplicated<wbr/>Val</span><a href="#isDuplicatedVal" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
178
- <ul class="tsd-signatures tsd-is-inherited">
179
- <li class="tsd-signature" id="isDuplicatedVal.isDuplicatedVal-1"><span class="tsd-signature-symbol">get</span> isDuplicatedVal<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></li>
180
- <li class="tsd-description">
181
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><aside class="tsd-sources">
182
- <p>Implementation of IAVLTree.isDuplicatedVal</p>
183
- <p>Inherited from BST.isDuplicatedVal</p>
184
- <ul>
185
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L236">src/data-structures/binary-tree/abstract-binary-tree.ts:236</a></li></ul></aside></li></ul></section>
186
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="loopType" class="tsd-anchor"></a>
187
- <h3 class="tsd-anchor-link"><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>
188
- <ul class="tsd-signatures tsd-is-inherited">
189
- <li class="tsd-signature" id="loopType.loopType-1"><span class="tsd-signature-symbol">get</span> loopType<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../enums/LoopType.html" class="tsd-signature-type tsd-kind-enum">LoopType</a></li>
190
- <li class="tsd-description">
191
- <h4 class="tsd-returns-title">Returns <a href="../enums/LoopType.html" class="tsd-signature-type tsd-kind-enum">LoopType</a></h4><aside class="tsd-sources">
192
- <p>Implementation of IAVLTree.loopType</p>
193
- <p>Inherited from BST.loopType</p>
194
- <ul>
195
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L189">src/data-structures/binary-tree/abstract-binary-tree.ts:189</a></li></ul></aside></li></ul></section>
196
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="maxId" class="tsd-anchor"></a>
197
- <h3 class="tsd-anchor-link"><span>max<wbr/>Id</span><a href="#maxId" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
198
- <ul class="tsd-signatures tsd-is-inherited">
199
- <li class="tsd-signature" id="maxId.maxId-1"><span class="tsd-signature-symbol">get</span> maxId<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>
200
- <li class="tsd-description">
201
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
202
- <p>Implementation of IAVLTree.maxId</p>
203
- <p>Inherited from BST.maxId</p>
204
- <ul>
205
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L230">src/data-structures/binary-tree/abstract-binary-tree.ts:230</a></li></ul></aside></li></ul></section>
206
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="root" class="tsd-anchor"></a>
207
- <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>
208
- <ul class="tsd-signatures tsd-is-inherited">
209
- <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><span class="tsd-signature-type tsd-kind-type-parameter">N</span></li>
210
- <li class="tsd-description">
211
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><aside class="tsd-sources">
212
- <p>Implementation of IAVLTree.root</p>
213
- <p>Inherited from BST.root</p>
214
- <ul>
215
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L242">src/data-structures/binary-tree/abstract-binary-tree.ts:242</a></li></ul></aside></li></ul></section>
216
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="size" class="tsd-anchor"></a>
217
- <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>
218
- <ul class="tsd-signatures tsd-is-inherited">
219
- <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>
220
- <li class="tsd-description">
221
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources">
222
- <p>Implementation of IAVLTree.size</p>
223
- <p>Inherited from BST.size</p>
224
- <ul>
225
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L248">src/data-structures/binary-tree/abstract-binary-tree.ts:248</a></li></ul></aside></li></ul></section>
226
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedCount" class="tsd-anchor"></a>
227
- <h3 class="tsd-anchor-link"><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>
228
- <ul class="tsd-signatures tsd-is-inherited">
229
- <li class="tsd-signature" id="visitedCount.visitedCount-1"><span class="tsd-signature-symbol">get</span> visitedCount<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></li>
230
- <li class="tsd-description">
231
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
232
- <p>Implementation of IAVLTree.visitedCount</p>
233
- <p>Inherited from BST.visitedCount</p>
234
- <ul>
235
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L212">src/data-structures/binary-tree/abstract-binary-tree.ts:212</a></li></ul></aside></li></ul></section>
236
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedId" class="tsd-anchor"></a>
237
- <h3 class="tsd-anchor-link"><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>
238
- <ul class="tsd-signatures tsd-is-inherited">
239
- <li class="tsd-signature" id="visitedId.visitedId-1"><span class="tsd-signature-symbol">get</span> visitedId<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></li>
240
- <li class="tsd-description">
241
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
242
- <p>Implementation of IAVLTree.visitedId</p>
243
- <p>Inherited from BST.visitedId</p>
244
- <ul>
245
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L194">src/data-structures/binary-tree/abstract-binary-tree.ts:194</a></li></ul></aside></li></ul></section>
246
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedLeftSum" class="tsd-anchor"></a>
247
- <h3 class="tsd-anchor-link"><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>
248
- <ul class="tsd-signatures tsd-is-inherited">
249
- <li class="tsd-signature" id="visitedLeftSum.visitedLeftSum-1"><span class="tsd-signature-symbol">get</span> visitedLeftSum<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></li>
250
- <li class="tsd-description">
251
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
252
- <p>Implementation of IAVLTree.visitedLeftSum</p>
253
- <p>Inherited from BST.visitedLeftSum</p>
254
- <ul>
255
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L218">src/data-structures/binary-tree/abstract-binary-tree.ts:218</a></li></ul></aside></li></ul></section>
256
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedNode" class="tsd-anchor"></a>
257
- <h3 class="tsd-anchor-link"><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>
258
- <ul class="tsd-signatures tsd-is-inherited">
259
- <li class="tsd-signature" id="visitedNode.visitedNode-1"><span class="tsd-signature-symbol">get</span> visitedNode<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">N</span><span class="tsd-signature-symbol">[]</span></li>
260
- <li class="tsd-description">
261
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
262
- <p>Implementation of IAVLTree.visitedNode</p>
263
- <p>Inherited from BST.visitedNode</p>
264
- <ul>
265
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L206">src/data-structures/binary-tree/abstract-binary-tree.ts:206</a></li></ul></aside></li></ul></section>
266
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedVal" class="tsd-anchor"></a>
267
- <h3 class="tsd-anchor-link"><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>
268
- <ul class="tsd-signatures tsd-is-inherited">
269
- <li class="tsd-signature" id="visitedVal.visitedVal-1"><span class="tsd-signature-symbol">get</span> visitedVal<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">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">&quot;val&quot;</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span></li>
270
- <li class="tsd-description">
271
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">&quot;val&quot;</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources">
272
- <p>Implementation of IAVLTree.visitedVal</p>
273
- <p>Inherited from BST.visitedVal</p>
274
- <ul>
275
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L200">src/data-structures/binary-tree/abstract-binary-tree.ts:200</a></li></ul></aside></li></ul></section></section>
276
- <section class="tsd-panel-group tsd-member-group">
277
- <h2>Methods</h2>
278
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="BFS" class="tsd-anchor"></a>
279
- <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>
280
- <ul class="tsd-signatures tsd-is-inherited">
281
- <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>
282
- <li class="tsd-description">
283
- <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
284
- or property name.</p>
285
- </div>
286
- <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>AbstractBinaryTreeNodeProperties&lt;N&gt;</code>.</p>
287
-
288
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
289
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#BFS">BFS</a></p>
290
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#BFS">BFS</a></p>
291
- <ul>
292
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L963">src/data-structures/binary-tree/abstract-binary-tree.ts:963</a></li></ul></aside></li>
293
- <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>
294
- <li class="tsd-description">
295
- <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
296
- or property name.</p>
297
- </div>
298
- <div class="tsd-parameters">
299
- <h4 class="tsd-parameters-title">Parameters</h4>
300
- <ul class="tsd-parameter-list">
301
- <li>
302
- <h5><span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;id&quot;</span></h5>
303
- <div class="tsd-comment tsd-typography"><p>The parameter <code>nodeOrPropertyName</code> is an optional parameter that
304
- represents either a node or a property name. If a node is provided, the breadth-first search algorithm will be
305
- performed starting from that node. If a property name is provided, the breadth-first search algorithm will be
306
- performed starting from the root node</p>
307
- </div>
308
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
309
- <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>AbstractBinaryTreeNodeProperties&lt;N&gt;</code>.</p>
310
-
311
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
312
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#BFS">BFS</a></p>
313
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#BFS">BFS</a></p>
314
- <ul>
315
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L965">src/data-structures/binary-tree/abstract-binary-tree.ts:965</a></li></ul></aside></li>
316
- <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">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">&quot;val&quot;</span><span class="tsd-signature-symbol">]</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>
317
- <li class="tsd-description">
318
- <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
319
- or property name.</p>
320
- </div>
321
- <div class="tsd-parameters">
322
- <h4 class="tsd-parameters-title">Parameters</h4>
323
- <ul class="tsd-parameter-list">
324
- <li>
325
- <h5><span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;val&quot;</span></h5>
326
- <div class="tsd-comment tsd-typography"><p>The parameter <code>nodeOrPropertyName</code> is an optional parameter that
327
- represents either a node or a property name. If a node is provided, the breadth-first search algorithm will be
328
- performed starting from that node. If a property name is provided, the breadth-first search algorithm will be
329
- performed starting from the root node</p>
330
- </div>
331
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
332
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">&quot;val&quot;</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>AbstractBinaryTreeNodeProperties&lt;N&gt;</code>.</p>
333
-
334
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
335
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#BFS">BFS</a></p>
336
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#BFS">BFS</a></p>
337
- <ul>
338
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L967">src/data-structures/binary-tree/abstract-binary-tree.ts:967</a></li></ul></aside></li>
339
- <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><span class="tsd-signature-type tsd-kind-type-parameter">N</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>
340
- <li class="tsd-description">
341
- <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
342
- or property name.</p>
343
- </div>
344
- <div class="tsd-parameters">
345
- <h4 class="tsd-parameters-title">Parameters</h4>
346
- <ul class="tsd-parameter-list">
347
- <li>
348
- <h5><span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;node&quot;</span></h5>
349
- <div class="tsd-comment tsd-typography"><p>The parameter <code>nodeOrPropertyName</code> is an optional parameter that
350
- represents either a node or a property name. If a node is provided, the breadth-first search algorithm will be
351
- performed starting from that node. If a property name is provided, the breadth-first search algorithm will be
352
- performed starting from the root node</p>
353
- </div>
354
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
355
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>AbstractBinaryTreeNodeProperties&lt;N&gt;</code>.</p>
356
-
357
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
358
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#BFS">BFS</a></p>
359
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#BFS">BFS</a></p>
360
- <ul>
361
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L969">src/data-structures/binary-tree/abstract-binary-tree.ts:969</a></li></ul></aside></li>
362
- <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>
363
- <li class="tsd-description">
364
- <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
365
- or property name.</p>
366
- </div>
367
- <div class="tsd-parameters">
368
- <h4 class="tsd-parameters-title">Parameters</h4>
369
- <ul class="tsd-parameter-list">
370
- <li>
371
- <h5><span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;count&quot;</span></h5>
372
- <div class="tsd-comment tsd-typography"><p>The parameter <code>nodeOrPropertyName</code> is an optional parameter that
373
- represents either a node or a property name. If a node is provided, the breadth-first search algorithm will be
374
- performed starting from that node. If a property name is provided, the breadth-first search algorithm will be
375
- performed starting from the root node</p>
376
- </div>
377
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
378
- <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>AbstractBinaryTreeNodeProperties&lt;N&gt;</code>.</p>
379
-
380
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
381
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#BFS">BFS</a></p>
382
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#BFS">BFS</a></p>
383
- <ul>
384
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L971">src/data-structures/binary-tree/abstract-binary-tree.ts:971</a></li></ul></aside></li></ul></section>
385
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="DFS" class="tsd-anchor"></a>
386
- <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>
387
- <ul class="tsd-signatures tsd-is-inherited">
388
- <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>
389
- <li class="tsd-description">
390
- <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
391
- specified pattern and node or property name.</p>
392
- </div>
393
- <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>AbstractBinaryTreeNodeProperties&lt;N&gt;</code>.</p>
394
-
395
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
396
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#DFS">DFS</a></p>
397
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFS">DFS</a></p>
398
- <ul>
399
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L999">src/data-structures/binary-tree/abstract-binary-tree.ts:999</a></li></ul></aside></li>
400
- <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>
401
- <li class="tsd-description">
402
- <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
403
- specified pattern and node or property name.</p>
404
- </div>
405
- <div class="tsd-parameters">
406
- <h4 class="tsd-parameters-title">Parameters</h4>
407
- <ul class="tsd-parameter-list">
408
- <li>
409
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pattern</span>: <a href="../types/DFSOrderPattern.html" class="tsd-signature-type tsd-kind-type-alias">DFSOrderPattern</a></h5>
410
- <div class="tsd-comment tsd-typography"><p>The &quot;pattern&quot; parameter is used to specify the order in which the nodes
411
- of a binary tree are traversed during the Depth-First Search (DFS) algorithm. It can take one of three values: &#39;in&#39;,
412
- &#39;pre&#39;, or &#39;post&#39;.</p>
413
- </div>
414
- <div class="tsd-comment tsd-typography"></div></li>
415
- <li>
416
- <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>
417
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is a string that represents
418
- either the name of a property in the <code>BinaryTreeNode</code> object or the value of the <code>id</code> property in the
419
- <code>BinaryTreeNode</code> object. This parameter is used to accumulate the results based on the specified property name. If
420
- no value</p>
421
- </div>
422
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
423
- <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>AbstractBinaryTreeNodeProperties&lt;N&gt;</code>.</p>
424
-
425
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
426
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#DFS">DFS</a></p>
427
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFS">DFS</a></p>
428
- <ul>
429
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1001">src/data-structures/binary-tree/abstract-binary-tree.ts:1001</a></li></ul></aside></li>
430
- <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">N</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>
431
- <li class="tsd-description">
432
- <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
433
- specified pattern and node or property name.</p>
434
- </div>
435
- <div class="tsd-parameters">
436
- <h4 class="tsd-parameters-title">Parameters</h4>
437
- <ul class="tsd-parameter-list">
438
- <li>
439
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pattern</span>: <a href="../types/DFSOrderPattern.html" class="tsd-signature-type tsd-kind-type-alias">DFSOrderPattern</a></h5>
440
- <div class="tsd-comment tsd-typography"><p>The &quot;pattern&quot; parameter is used to specify the order in which the nodes
441
- of a binary tree are traversed during the Depth-First Search (DFS) algorithm. It can take one of three values: &#39;in&#39;,
442
- &#39;pre&#39;, or &#39;post&#39;.</p>
443
- </div>
444
- <div class="tsd-comment tsd-typography"></div></li>
445
- <li>
446
- <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>
447
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is a string that represents
448
- either the name of a property in the <code>BinaryTreeNode</code> object or the value of the <code>id</code> property in the
449
- <code>BinaryTreeNode</code> object. This parameter is used to accumulate the results based on the specified property name. If
450
- no value</p>
451
- </div>
452
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
453
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>AbstractBinaryTreeNodeProperties&lt;N&gt;</code>.</p>
454
-
455
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
456
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#DFS">DFS</a></p>
457
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFS">DFS</a></p>
458
- <ul>
459
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1003">src/data-structures/binary-tree/abstract-binary-tree.ts:1003</a></li></ul></aside></li>
460
- <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><span class="tsd-signature-type tsd-kind-type-parameter">N</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>
461
- <li class="tsd-description">
462
- <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
463
- specified pattern and node or property name.</p>
464
- </div>
465
- <div class="tsd-parameters">
466
- <h4 class="tsd-parameters-title">Parameters</h4>
467
- <ul class="tsd-parameter-list">
468
- <li>
469
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pattern</span>: <a href="../types/DFSOrderPattern.html" class="tsd-signature-type tsd-kind-type-alias">DFSOrderPattern</a></h5>
470
- <div class="tsd-comment tsd-typography"><p>The &quot;pattern&quot; parameter is used to specify the order in which the nodes
471
- of a binary tree are traversed during the Depth-First Search (DFS) algorithm. It can take one of three values: &#39;in&#39;,
472
- &#39;pre&#39;, or &#39;post&#39;.</p>
473
- </div>
474
- <div class="tsd-comment tsd-typography"></div></li>
475
- <li>
476
- <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>
477
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is a string that represents
478
- either the name of a property in the <code>BinaryTreeNode</code> object or the value of the <code>id</code> property in the
479
- <code>BinaryTreeNode</code> object. This parameter is used to accumulate the results based on the specified property name. If
480
- no value</p>
481
- </div>
482
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
483
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>an object of type <code>AbstractBinaryTreeNodeProperties&lt;N&gt;</code>.</p>
484
-
485
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
486
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#DFS">DFS</a></p>
487
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFS">DFS</a></p>
488
- <ul>
489
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1005">src/data-structures/binary-tree/abstract-binary-tree.ts:1005</a></li></ul></aside></li>
490
- <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>
491
- <li class="tsd-description">
492
- <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
493
- specified pattern and node or property name.</p>
494
- </div>
495
- <div class="tsd-parameters">
496
- <h4 class="tsd-parameters-title">Parameters</h4>
497
- <ul class="tsd-parameter-list">
498
- <li>
499
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pattern</span>: <a href="../types/DFSOrderPattern.html" class="tsd-signature-type tsd-kind-type-alias">DFSOrderPattern</a></h5>
500
- <div class="tsd-comment tsd-typography"><p>The &quot;pattern&quot; parameter is used to specify the order in which the nodes
501
- of a binary tree are traversed during the Depth-First Search (DFS) algorithm. It can take one of three values: &#39;in&#39;,
502
- &#39;pre&#39;, or &#39;post&#39;.</p>
503
- </div>
504
- <div class="tsd-comment tsd-typography"></div></li>
505
- <li>
506
- <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>
507
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is a string that represents
508
- either the name of a property in the <code>BinaryTreeNode</code> object or the value of the <code>id</code> property in the
509
- <code>BinaryTreeNode</code> object. This parameter is used to accumulate the results based on the specified property name. If
510
- no value</p>
511
- </div>
512
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
513
- <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>AbstractBinaryTreeNodeProperties&lt;N&gt;</code>.</p>
514
-
515
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
516
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#DFS">DFS</a></p>
517
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFS">DFS</a></p>
518
- <ul>
519
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1007">src/data-structures/binary-tree/abstract-binary-tree.ts:1007</a></li></ul></aside></li></ul></section>
520
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="DFSIterative" class="tsd-anchor"></a>
521
- <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>
522
- <ul class="tsd-signatures tsd-is-inherited">
523
- <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>
524
- <li class="tsd-description">
525
- <div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
526
- Space complexity of Iterative DFS equals to recursive DFS which is O(n) because of the stack</p>
527
- </div>
528
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4>
529
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
530
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#DFSIterative">DFSIterative</a></p>
531
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFSIterative">DFSIterative</a></p>
532
- <ul>
533
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1049">src/data-structures/binary-tree/abstract-binary-tree.ts:1049</a></li></ul></aside></li>
534
- <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>
535
- <li class="tsd-description">
536
- <div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
537
- Space complexity of Iterative DFS equals to recursive DFS which is O(n) because of the stack</p>
538
- </div>
539
- <div class="tsd-parameters">
540
- <h4 class="tsd-parameters-title">Parameters</h4>
541
- <ul class="tsd-parameter-list">
542
- <li>
543
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pattern</span>: <a href="../types/DFSOrderPattern.html" class="tsd-signature-type tsd-kind-type-alias">DFSOrderPattern</a></h5>
544
- <div class="tsd-comment tsd-typography"></div></li>
545
- <li>
546
- <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>
547
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
548
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4>
549
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
550
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#DFSIterative">DFSIterative</a></p>
551
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFSIterative">DFSIterative</a></p>
552
- <ul>
553
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1051">src/data-structures/binary-tree/abstract-binary-tree.ts:1051</a></li></ul></aside></li>
554
- <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">N</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>
555
- <li class="tsd-description">
556
- <div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
557
- Space complexity of Iterative DFS equals to recursive DFS which is O(n) because of the stack</p>
558
- </div>
559
- <div class="tsd-parameters">
560
- <h4 class="tsd-parameters-title">Parameters</h4>
561
- <ul class="tsd-parameter-list">
562
- <li>
563
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pattern</span>: <a href="../types/DFSOrderPattern.html" class="tsd-signature-type tsd-kind-type-alias">DFSOrderPattern</a></h5>
564
- <div class="tsd-comment tsd-typography"></div></li>
565
- <li>
566
- <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>
567
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
568
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4>
569
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
570
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#DFSIterative">DFSIterative</a></p>
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/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1053">src/data-structures/binary-tree/abstract-binary-tree.ts:1053</a></li></ul></aside></li>
574
- <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><span class="tsd-signature-type tsd-kind-type-parameter">N</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>
575
- <li class="tsd-description">
576
- <div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
577
- Space complexity of Iterative DFS equals to recursive DFS which is O(n) because of the stack</p>
578
- </div>
579
- <div class="tsd-parameters">
580
- <h4 class="tsd-parameters-title">Parameters</h4>
581
- <ul class="tsd-parameter-list">
582
- <li>
583
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pattern</span>: <a href="../types/DFSOrderPattern.html" class="tsd-signature-type tsd-kind-type-alias">DFSOrderPattern</a></h5>
584
- <div class="tsd-comment tsd-typography"></div></li>
585
- <li>
586
- <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>
587
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
588
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4>
589
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
590
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#DFSIterative">DFSIterative</a></p>
591
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFSIterative">DFSIterative</a></p>
592
- <ul>
593
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1055">src/data-structures/binary-tree/abstract-binary-tree.ts:1055</a></li></ul></aside></li>
594
- <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>
595
- <li class="tsd-description">
596
- <div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
597
- Space complexity of Iterative DFS equals to recursive DFS which is O(n) because of the stack</p>
598
- </div>
599
- <div class="tsd-parameters">
600
- <h4 class="tsd-parameters-title">Parameters</h4>
601
- <ul class="tsd-parameter-list">
602
- <li>
603
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pattern</span>: <a href="../types/DFSOrderPattern.html" class="tsd-signature-type tsd-kind-type-alias">DFSOrderPattern</a></h5>
604
- <div class="tsd-comment tsd-typography"></div></li>
605
- <li>
606
- <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>
607
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
608
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4>
609
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
610
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#DFSIterative">DFSIterative</a></p>
611
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFSIterative">DFSIterative</a></p>
612
- <ul>
613
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1057">src/data-structures/binary-tree/abstract-binary-tree.ts:1057</a></li></ul></aside></li></ul></section>
614
- <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_accumulatedByPropertyName" class="tsd-anchor"></a>
615
- <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>
616
- <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
617
- <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>
618
- <li class="tsd-description">
619
- <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
620
- provided property name or a default property name.</p>
621
- </div>
622
- <div class="tsd-parameters">
623
- <h4 class="tsd-parameters-title">Parameters</h4>
624
- <ul class="tsd-parameter-list">
625
- <li>
626
- <h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
627
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is of type <code>N</code>, which represents a node in a binary tree.</p>
628
- </div>
629
- <div class="tsd-comment tsd-typography"></div></li>
630
- <li>
631
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <a href="../types/NodeOrPropertyName.html" class="tsd-signature-type tsd-kind-type-alias">NodeOrPropertyName</a></h5>
632
- <div class="tsd-comment tsd-typography"><p>The parameter <code>nodeOrPropertyName</code> is an optional parameter that
633
- can be either a string representing a property name or a reference to a node object. If it is a string, it specifies
634
- the property name of the node that should be accumulated. If it is a node object, it specifies the node itself</p>
635
- </div>
636
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
637
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
638
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
639
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_accumulatedByPropertyName">_accumulatedByPropertyName</a></p>
640
- <ul>
641
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1469">src/data-structures/binary-tree/abstract-binary-tree.ts:1469</a></li></ul></aside></li></ul></section>
642
- <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_compare" class="tsd-anchor"></a>
643
- <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>
644
- <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
645
- <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>
646
- <li class="tsd-description">
647
- <div class="tsd-comment tsd-typography"><p>The function compares two binary tree node IDs using a comparator function and returns whether the first ID is
648
- greater than, less than, or equal to the second ID.</p>
649
- </div>
650
- <div class="tsd-parameters">
651
- <h4 class="tsd-parameters-title">Parameters</h4>
652
- <ul class="tsd-parameter-list">
653
- <li>
654
- <h5><span class="tsd-kind-parameter">a</span>: <span class="tsd-signature-type">number</span></h5>
655
- <div class="tsd-comment tsd-typography"><p>a is a BinaryTreeNodeId, which represents the identifier of a binary tree node.</p>
656
- </div>
657
- <div class="tsd-comment tsd-typography"></div></li>
658
- <li>
659
- <h5><span class="tsd-kind-parameter">b</span>: <span class="tsd-signature-type">number</span></h5>
660
- <div class="tsd-comment tsd-typography"><p>The parameter &quot;b&quot; in the above code refers to a BinaryTreeNodeId.</p>
661
- </div>
662
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
663
- <h4 class="tsd-returns-title">Returns <a href="../enums/CP.html" class="tsd-signature-type tsd-kind-enum">CP</a></h4><p>a value of type CP (ComparisonResult). The possible return values are CP.gt (greater than), CP.lt (less
664
- than), or CP.eq (equal).</p>
665
-
666
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
667
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_compare">_compare</a></p>
668
- <ul>
669
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/bst.ts#L506">src/data-structures/binary-tree/bst.ts:506</a></li></ul></aside></li></ul></section>
670
- <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_getResultByPropertyName" class="tsd-anchor"></a>
671
- <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>
672
- <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
673
- <li class="tsd-signature tsd-anchor-link" id="_getResultByPropertyName._getResultByPropertyName-1"><span class="tsd-kind-call-signature">_get<wbr/>Result<wbr/>By<wbr/>Property<wbr/>Name</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">nodeOrPropertyName</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../types/AbstractBinaryTreeNodeProperties.html" class="tsd-signature-type tsd-kind-type-alias">AbstractBinaryTreeNodeProperties</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">N</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>
674
- <li class="tsd-description">
675
- <div class="tsd-comment tsd-typography"><p>The function <code>_getResultByPropertyName</code> returns different results based on the provided property name or defaulting
676
- to &#39;id&#39;.</p>
677
- </div>
678
- <div class="tsd-parameters">
679
- <h4 class="tsd-parameters-title">Parameters</h4>
680
- <ul class="tsd-parameter-list">
681
- <li>
682
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <a href="../types/NodeOrPropertyName.html" class="tsd-signature-type tsd-kind-type-alias">NodeOrPropertyName</a></h5>
683
- <div class="tsd-comment tsd-typography"><p>The parameter <code>nodeOrPropertyName</code> is an optional parameter that
684
- can accept a value of type <code>NodeOrPropertyName</code>.</p>
685
- </div>
686
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
687
- <h4 class="tsd-returns-title">Returns <a href="../types/AbstractBinaryTreeNodeProperties.html" class="tsd-signature-type tsd-kind-type-alias">AbstractBinaryTreeNodeProperties</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">&gt;</span></h4><p>The method returns an object of type <code>AbstractBinaryTreeNodeProperties&lt;T&gt;</code>.</p>
688
-
689
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
690
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_getResultByPropertyName">_getResultByPropertyName</a></p>
691
- <ul>
692
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1498">src/data-structures/binary-tree/abstract-binary-tree.ts:1498</a></li></ul></aside></li></ul></section>
693
- <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_pushByPropertyNameStopOrNot" class="tsd-anchor"></a>
694
- <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>
695
- <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
696
- <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>
697
- <li class="tsd-description">
698
- <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
699
- a result array.</p>
700
- </div>
701
- <div class="tsd-parameters">
702
- <h4 class="tsd-parameters-title">Parameters</h4>
703
- <ul class="tsd-parameter-list">
704
- <li>
705
- <h5><span class="tsd-kind-parameter">cur</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
706
- <div class="tsd-comment tsd-typography"><p>The current binary tree node that is being checked.</p>
707
- </div>
708
- <div class="tsd-comment tsd-typography"></div></li>
709
- <li>
710
- <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><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span></h5>
711
- <div class="tsd-comment tsd-typography"><p>An array that stores the matching nodes found during the
712
- traversal.</p>
713
- </div>
714
- <div class="tsd-comment tsd-typography"></div></li>
715
- <li>
716
- <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">N</span></h5>
717
- <div class="tsd-comment tsd-typography"><p>The <code>nodeProperty</code> parameter is the value that we are searching for in
718
- the binary tree nodes. It can be either the <code>id</code>, <code>count</code>, or <code>val</code> property of the node.</p>
719
- </div>
720
- <div class="tsd-comment tsd-typography"></div></li>
721
- <li>
722
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">propertyName</span>: <a href="../types/BinaryTreeNodePropertyName.html" class="tsd-signature-type tsd-kind-type-alias">BinaryTreeNodePropertyName</a></h5>
723
- <div class="tsd-comment tsd-typography"><p>The <code>propertyName</code> parameter is an optional parameter that
724
- specifies the property of the <code>BinaryTreeNode</code> object that you want to compare with the <code>nodeProperty</code> value. It can
725
- be one of the following values: &#39;id&#39;, &#39;count&#39;, or &#39;val&#39;. If no <code>propertyName</code> is provided,</p>
726
- </div>
727
- <div class="tsd-comment tsd-typography"></div></li>
728
- <li>
729
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">onlyOne</span>: <span class="tsd-signature-type">boolean</span></h5>
730
- <div class="tsd-comment tsd-typography"><p>The <code>onlyOne</code> parameter is an optional boolean parameter that determines whether to
731
- stop after finding the first matching node or continue searching for all matching nodes. If <code>onlyOne</code> is set to
732
- <code>true</code>, the function will stop after finding the first matching node and return <code>true</code>. If `onlyOne</p>
733
- </div>
734
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
735
- <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>
736
-
737
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
738
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_pushByPropertyNameStopOrNot">_pushByPropertyNameStopOrNot</a></p>
739
- <ul>
740
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1432">src/data-structures/binary-tree/abstract-binary-tree.ts:1432</a></li></ul></aside></li></ul></section>
741
- <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_resetResults" class="tsd-anchor"></a>
742
- <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>
743
- <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
744
- <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>
745
- <li class="tsd-description">
746
- <div class="tsd-comment tsd-typography"><p>The function resets the values of several arrays used for tracking visited nodes and their properties.</p>
747
- </div>
748
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
749
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
750
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_resetResults">_resetResults</a></p>
751
- <ul>
752
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1408">src/data-structures/binary-tree/abstract-binary-tree.ts:1408</a></li></ul></aside></li></ul></section>
753
- <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setAutoIncrementId" class="tsd-anchor"></a>
754
- <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Auto<wbr/>Increment<wbr/>Id</span><a href="#_setAutoIncrementId" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
755
- <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
756
- <li class="tsd-signature tsd-anchor-link" id="_setAutoIncrementId._setAutoIncrementId-1"><span class="tsd-kind-call-signature">_set<wbr/>Auto<wbr/>Increment<wbr/>Id</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_setAutoIncrementId._setAutoIncrementId-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
757
- <li class="tsd-description">
758
- <div class="tsd-parameters">
759
- <h4 class="tsd-parameters-title">Parameters</h4>
760
- <ul class="tsd-parameter-list">
761
- <li>
762
- <h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">boolean</span></h5></li></ul></div>
763
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
764
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setAutoIncrementId">_setAutoIncrementId</a></p>
765
- <ul>
766
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1377">src/data-structures/binary-tree/abstract-binary-tree.ts:1377</a></li></ul></aside></li></ul></section>
767
- <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setCount" class="tsd-anchor"></a>
768
- <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Count</span><a href="#_setCount" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
769
- <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
770
- <li class="tsd-signature tsd-anchor-link" id="_setCount._setCount-1"><span class="tsd-kind-call-signature">_set<wbr/>Count</span><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><a href="#_setCount._setCount-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
771
- <li class="tsd-description">
772
- <div class="tsd-parameters">
773
- <h4 class="tsd-parameters-title">Parameters</h4>
774
- <ul class="tsd-parameter-list">
775
- <li>
776
- <h5><span class="tsd-kind-parameter">v</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div>
777
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
778
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setCount">_setCount</a></p>
779
- <ul>
780
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1401">src/data-structures/binary-tree/abstract-binary-tree.ts:1401</a></li></ul></aside></li></ul></section>
781
- <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setIsDuplicatedVal" class="tsd-anchor"></a>
782
- <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Is<wbr/>Duplicated<wbr/>Val</span><a href="#_setIsDuplicatedVal" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
783
- <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
784
- <li class="tsd-signature tsd-anchor-link" id="_setIsDuplicatedVal._setIsDuplicatedVal-1"><span class="tsd-kind-call-signature">_set<wbr/>Is<wbr/>Duplicated<wbr/>Val</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_setIsDuplicatedVal._setIsDuplicatedVal-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
785
- <li class="tsd-description">
786
- <div class="tsd-parameters">
787
- <h4 class="tsd-parameters-title">Parameters</h4>
788
- <ul class="tsd-parameter-list">
789
- <li>
790
- <h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">boolean</span></h5></li></ul></div>
791
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
792
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setIsDuplicatedVal">_setIsDuplicatedVal</a></p>
793
- <ul>
794
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1385">src/data-structures/binary-tree/abstract-binary-tree.ts:1385</a></li></ul></aside></li></ul></section>
795
- <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setLoopType" class="tsd-anchor"></a>
796
- <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Loop<wbr/>Type</span><a href="#_setLoopType" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
797
- <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
798
- <li class="tsd-signature tsd-anchor-link" id="_setLoopType._setLoopType-1"><span class="tsd-kind-call-signature">_set<wbr/>Loop<wbr/>Type</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_setLoopType._setLoopType-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
799
- <li class="tsd-description">
800
- <div class="tsd-parameters">
801
- <h4 class="tsd-parameters-title">Parameters</h4>
802
- <ul class="tsd-parameter-list">
803
- <li>
804
- <h5><span class="tsd-kind-parameter">value</span>: <a href="../enums/LoopType.html" class="tsd-signature-type tsd-kind-enum">LoopType</a></h5></li></ul></div>
805
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
806
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setLoopType">_setLoopType</a></p>
807
- <ul>
808
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1353">src/data-structures/binary-tree/abstract-binary-tree.ts:1353</a></li></ul></aside></li></ul></section>
809
- <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setMaxId" class="tsd-anchor"></a>
810
- <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Max<wbr/>Id</span><a href="#_setMaxId" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
811
- <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
812
- <li class="tsd-signature tsd-anchor-link" id="_setMaxId._setMaxId-1"><span class="tsd-kind-call-signature">_set<wbr/>Max<wbr/>Id</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_setMaxId._setMaxId-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
813
- <li class="tsd-description">
814
- <div class="tsd-parameters">
815
- <h4 class="tsd-parameters-title">Parameters</h4>
816
- <ul class="tsd-parameter-list">
817
- <li>
818
- <h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div>
819
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
820
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setMaxId">_setMaxId</a></p>
821
- <ul>
822
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1381">src/data-structures/binary-tree/abstract-binary-tree.ts:1381</a></li></ul></aside></li></ul></section>
823
- <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setRoot" class="tsd-anchor"></a>
824
- <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Root</span><a href="#_setRoot" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
825
- <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
826
- <li class="tsd-signature tsd-anchor-link" id="_setRoot._setRoot-1"><span class="tsd-kind-call-signature">_set<wbr/>Root</span><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><a href="#_setRoot._setRoot-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
827
- <li class="tsd-description">
828
- <div class="tsd-parameters">
829
- <h4 class="tsd-parameters-title">Parameters</h4>
830
- <ul class="tsd-parameter-list">
831
- <li>
832
- <h5><span class="tsd-kind-parameter">v</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5></li></ul></div>
833
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
834
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setRoot">_setRoot</a></p>
835
- <ul>
836
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1389">src/data-structures/binary-tree/abstract-binary-tree.ts:1389</a></li></ul></aside></li></ul></section>
837
- <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setSize" class="tsd-anchor"></a>
838
- <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Size</span><a href="#_setSize" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
839
- <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
840
- <li class="tsd-signature tsd-anchor-link" id="_setSize._setSize-1"><span class="tsd-kind-call-signature">_set<wbr/>Size</span><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><a href="#_setSize._setSize-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
841
- <li class="tsd-description">
842
- <div class="tsd-parameters">
843
- <h4 class="tsd-parameters-title">Parameters</h4>
844
- <ul class="tsd-parameter-list">
845
- <li>
846
- <h5><span class="tsd-kind-parameter">v</span>: <span class="tsd-signature-type">number</span></h5></li></ul></div>
847
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
848
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setSize">_setSize</a></p>
849
- <ul>
850
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1397">src/data-structures/binary-tree/abstract-binary-tree.ts:1397</a></li></ul></aside></li></ul></section>
851
- <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setVisitedId" class="tsd-anchor"></a>
852
- <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Visited<wbr/>Id</span><a href="#_setVisitedId" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
853
- <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
854
- <li class="tsd-signature tsd-anchor-link" id="_setVisitedId._setVisitedId-1"><span class="tsd-kind-call-signature">_set<wbr/>Visited<wbr/>Id</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_setVisitedId._setVisitedId-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
855
- <li class="tsd-description">
856
- <div class="tsd-parameters">
857
- <h4 class="tsd-parameters-title">Parameters</h4>
858
- <ul class="tsd-parameter-list">
859
- <li>
860
- <h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h5></li></ul></div>
861
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
862
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setVisitedId">_setVisitedId</a></p>
863
- <ul>
864
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1357">src/data-structures/binary-tree/abstract-binary-tree.ts:1357</a></li></ul></aside></li></ul></section>
865
- <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setVisitedLeftSum" class="tsd-anchor"></a>
866
- <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Visited<wbr/>Left<wbr/>Sum</span><a href="#_setVisitedLeftSum" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
867
- <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
868
- <li class="tsd-signature tsd-anchor-link" id="_setVisitedLeftSum._setVisitedLeftSum-1"><span class="tsd-kind-call-signature">_set<wbr/>Visited<wbr/>Left<wbr/>Sum</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_setVisitedLeftSum._setVisitedLeftSum-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
869
- <li class="tsd-description">
870
- <div class="tsd-parameters">
871
- <h4 class="tsd-parameters-title">Parameters</h4>
872
- <ul class="tsd-parameter-list">
873
- <li>
874
- <h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h5></li></ul></div>
875
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
876
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setVisitedLeftSum">_setVisitedLeftSum</a></p>
877
- <ul>
878
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1373">src/data-structures/binary-tree/abstract-binary-tree.ts:1373</a></li></ul></aside></li></ul></section>
879
- <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setVisitedNode" class="tsd-anchor"></a>
880
- <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Visited<wbr/>Node</span><a href="#_setVisitedNode" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
881
- <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
882
- <li class="tsd-signature tsd-anchor-link" id="_setVisitedNode._setVisitedNode-1"><span class="tsd-kind-call-signature">_set<wbr/>Visited<wbr/>Node</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_setVisitedNode._setVisitedNode-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
883
- <li class="tsd-description">
884
- <div class="tsd-parameters">
885
- <h4 class="tsd-parameters-title">Parameters</h4>
886
- <ul class="tsd-parameter-list">
887
- <li>
888
- <h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h5></li></ul></div>
889
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
890
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setVisitedNode">_setVisitedNode</a></p>
891
- <ul>
892
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1365">src/data-structures/binary-tree/abstract-binary-tree.ts:1365</a></li></ul></aside></li></ul></section>
893
- <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setVisitedVal" class="tsd-anchor"></a>
894
- <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_set<wbr/>Visited<wbr/>Val</span><a href="#_setVisitedVal" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
895
- <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
896
- <li class="tsd-signature tsd-anchor-link" id="_setVisitedVal._setVisitedVal-1"><span class="tsd-kind-call-signature">_set<wbr/>Visited<wbr/>Val</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#_setVisitedVal._setVisitedVal-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
897
- <li class="tsd-description">
898
- <div class="tsd-parameters">
899
- <h4 class="tsd-parameters-title">Parameters</h4>
900
- <ul class="tsd-parameter-list">
901
- <li>
902
- <h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h5></li></ul></div>
903
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
904
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setVisitedVal">_setVisitedVal</a></p>
905
- <ul>
906
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1361">src/data-structures/binary-tree/abstract-binary-tree.ts:1361</a></li></ul></aside></li></ul></section>
907
- <section class="tsd-panel tsd-member"><a id="add" class="tsd-anchor"></a>
908
- <h3 class="tsd-anchor-link"><span>add</span><a href="#add" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
909
- <ul class="tsd-signatures">
910
- <li class="tsd-signature tsd-anchor-link" id="add.add-1"><span class="tsd-kind-call-signature">add</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">id</span>, <span class="tsd-kind-parameter">val</span>, <span class="tsd-kind-parameter">count</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><a href="#add.add-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
911
- <li class="tsd-description">
912
- <div class="tsd-comment tsd-typography"><p>The function overrides the add method of a Binary Search Tree to insert a node with a given id and value, and then
913
- balances the tree.</p>
914
- </div>
915
- <div class="tsd-parameters">
916
- <h4 class="tsd-parameters-title">Parameters</h4>
917
- <ul class="tsd-parameter-list">
918
- <li>
919
- <h5><span class="tsd-kind-parameter">id</span>: <span class="tsd-signature-type">number</span></h5>
920
- <div class="tsd-comment tsd-typography"><p>The <code>id</code> parameter is the identifier of the binary tree node that we want to add or
921
- update in the AVL tree.</p>
922
- </div>
923
- <div class="tsd-comment tsd-typography"></div></li>
924
- <li>
925
- <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">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">&quot;val&quot;</span><span class="tsd-signature-symbol">]</span></h5>
926
- <div class="tsd-comment tsd-typography"><p>The <code>val</code> parameter represents the value that you want to assign to the node with the given
927
- <code>id</code>. It can be of type <code>N</code> (the generic type) or <code>null</code>.</p>
928
- </div>
929
- <div class="tsd-comment tsd-typography"></div></li>
930
- <li>
931
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">count</span>: <span class="tsd-signature-type">number</span></h5>
932
- <div class="tsd-comment tsd-typography"><p>The <code>count</code> parameter is an optional parameter of type <code>number</code>. It represents the number
933
- of times the value <code>val</code> should be inserted into the AVL tree. If the <code>count</code> parameter is not provided, it defaults
934
- to <code>1</code>, indicating that the value should be inserted once.</p>
935
- </div>
936
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
937
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>The method is returning either an N object or null.</p>
938
-
939
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
940
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#add">add</a></p>
941
- <p>Overrides <a href="BST.html">BST</a>.<a href="BST.html#add">add</a></p>
942
- <ul>
943
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/avl-tree.ts#L39">src/data-structures/binary-tree/avl-tree.ts:39</a></li></ul></aside></li></ul></section>
944
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="addMany" class="tsd-anchor"></a>
945
- <h3 class="tsd-anchor-link"><span>add<wbr/>Many</span><a href="#addMany" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
946
- <ul class="tsd-signatures tsd-is-inherited">
947
- <li class="tsd-signature tsd-anchor-link" id="addMany.addMany-1"><span class="tsd-kind-call-signature">add<wbr/>Many</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span><a href="#addMany.addMany-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
948
- <li class="tsd-description">
949
- <div class="tsd-comment tsd-typography"><p>The <code>addMany</code> function inserts multiple items into a binary tree and returns an array of the inserted nodes or
950
- null/undefined values.</p>
951
- </div>
952
- <div class="tsd-parameters">
953
- <h4 class="tsd-parameters-title">Parameters</h4>
954
- <ul class="tsd-parameter-list">
955
- <li>
956
- <h5><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">&quot;val&quot;</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span></h5>
957
- <div class="tsd-comment tsd-typography"><p>The <code>data</code> parameter can be either an array of elements of type <code>N</code> or an
958
- array of <code>N</code> objects.</p>
959
- </div>
960
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
961
- <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><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>addMany</code> returns an array of <code>N</code>, <code>null</code>, or <code>undefined</code> values.</p>
962
-
963
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
964
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#addMany">addMany</a></p>
965
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#addMany">addMany</a></p>
966
- <ul>
967
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L380">src/data-structures/binary-tree/abstract-binary-tree.ts:380</a></li></ul></aside></li></ul></section>
968
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="addTo" class="tsd-anchor"></a>
969
- <h3 class="tsd-anchor-link"><span>add<wbr/>To</span><a href="#addTo" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
970
- <ul class="tsd-signatures tsd-is-inherited">
971
- <li class="tsd-signature tsd-anchor-link" id="addTo.addTo-1"><span class="tsd-kind-call-signature">add<wbr/>To</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">newNode</span>, <span class="tsd-kind-parameter">parent</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><a href="#addTo.addTo-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
972
- <li class="tsd-description">
973
- <div class="tsd-comment tsd-typography"><p>The function adds a new node to a binary tree as the left or right child of a given parent node.</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">newNode</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
980
- <div class="tsd-comment tsd-typography"><p>The <code>newNode</code> parameter represents the node that you want to add to the tree. It can be
981
- either a node object (<code>N</code>) or <code>null</code>.</p>
982
- </div>
983
- <div class="tsd-comment tsd-typography"></div></li>
984
- <li>
985
- <h5><span class="tsd-kind-parameter">parent</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
986
- <div class="tsd-comment tsd-typography"><p>The <code>parent</code> parameter represents the parent node to which the new node will be added as a
987
- child.</p>
988
- </div>
989
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
990
- <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><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>either the left or right child node that was added to the parent node. It can also return <code>null</code> or
991
- <code>undefined</code> in certain cases.</p>
992
-
993
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
994
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#addTo">addTo</a></p>
995
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#addTo">addTo</a></p>
996
- <ul>
997
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L340">src/data-structures/binary-tree/abstract-binary-tree.ts:340</a></li></ul></aside></li></ul></section>
998
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="allGreaterNodesAdd" class="tsd-anchor"></a>
999
- <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>
1000
- <ul class="tsd-signatures tsd-is-inherited">
1001
- <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>
1002
- <li class="tsd-description">
1003
- <div class="tsd-comment tsd-typography"><p>The function <code>allGreaterNodesAdd</code> updates the value of a specified property for all nodes in a binary search tree
1004
- that have a greater value than a given node.</p>
1005
- </div>
1006
- <div class="tsd-parameters">
1007
- <h4 class="tsd-parameters-title">Parameters</h4>
1008
- <ul class="tsd-parameter-list">
1009
- <li>
1010
- <h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
1011
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is of type <code>N</code>, which represents a node in a binary search tree. It
1012
- contains properties such as <code>id</code> and <code>count</code>.</p>
1013
- </div>
1014
- <div class="tsd-comment tsd-typography"></div></li>
1015
- <li>
1016
- <h5><span class="tsd-kind-parameter">delta</span>: <span class="tsd-signature-type">number</span></h5>
1017
- <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
1018
- each node should be increased.</p>
1019
- </div>
1020
- <div class="tsd-comment tsd-typography"></div></li>
1021
- <li>
1022
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">propertyName</span>: <a href="../types/BinaryTreeNodePropertyName.html" class="tsd-signature-type tsd-kind-type-alias">BinaryTreeNodePropertyName</a></h5>
1023
- <div class="tsd-comment tsd-typography"><p>propertyName is an optional parameter that specifies the
1024
- property of the BSTNode to be modified. It can be either &#39;id&#39; or &#39;count&#39;. If propertyName is not provided, it
1025
- defaults to &#39;id&#39;.</p>
1026
- </div>
1027
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1028
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>a boolean value.</p>
1029
-
1030
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1031
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#allGreaterNodesAdd">allGreaterNodesAdd</a></p>
1032
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#allGreaterNodesAdd">allGreaterNodesAdd</a></p>
1033
- <ul>
1034
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/bst.ts#L362">src/data-structures/binary-tree/bst.ts:362</a></li></ul></aside></li></ul></section>
1035
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="balance" class="tsd-anchor"></a>
1036
- <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>
1037
- <ul class="tsd-signatures tsd-is-inherited">
1038
- <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>
1039
- <li class="tsd-description">
1040
- <div class="tsd-comment tsd-typography"><p>The <code>balance</code> function takes a sorted array of nodes and builds a balanced binary search tree using either a
1041
- recursive or iterative approach.</p>
1042
- </div>
1043
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The <code>balance()</code> function returns a boolean value.</p>
1044
-
1045
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1046
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#balance">balance</a></p>
1047
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#balance">balance</a></p>
1048
- <ul>
1049
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/bst.ts#L413">src/data-structures/binary-tree/bst.ts:413</a></li></ul></aside></li></ul></section>
1050
- <section class="tsd-panel tsd-member"><a id="balanceFactor" class="tsd-anchor"></a>
1051
- <h3 class="tsd-anchor-link"><span>balance<wbr/>Factor</span><a href="#balanceFactor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
1052
- <ul class="tsd-signatures">
1053
- <li class="tsd-signature tsd-anchor-link" id="balanceFactor.balanceFactor-1"><span class="tsd-kind-call-signature">balance<wbr/>Factor</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="#balanceFactor.balanceFactor-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1054
- <li class="tsd-description">
1055
- <div class="tsd-comment tsd-typography"><p>The balance factor of a given AVL tree node is calculated by subtracting the height of its left subtree from the
1056
- height of its right subtree.</p>
1057
- </div>
1058
- <div class="tsd-parameters">
1059
- <h4 class="tsd-parameters-title">Parameters</h4>
1060
- <ul class="tsd-parameter-list">
1061
- <li>
1062
- <h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
1063
- <div class="tsd-comment tsd-typography"><p>The parameter &quot;node&quot; is of type N, which represents a node in an AVL tree.</p>
1064
- </div>
1065
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1066
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>The balance factor of the given AVL tree node.</p>
1067
-
1068
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1069
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#balanceFactor">balanceFactor</a></p>
1070
- <ul>
1071
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/avl-tree.ts#L71">src/data-structures/binary-tree/avl-tree.ts:71</a></li></ul></aside></li></ul></section>
1072
- <section class="tsd-panel tsd-member"><a id="balanceLL" class="tsd-anchor"></a>
1073
- <h3 class="tsd-anchor-link"><span>balanceLL</span><a href="#balanceLL" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
1074
- <ul class="tsd-signatures">
1075
- <li class="tsd-signature tsd-anchor-link" id="balanceLL.balanceLL-1"><span class="tsd-kind-call-signature">balanceLL</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">A</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#balanceLL.balanceLL-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1076
- <li class="tsd-description">
1077
- <div class="tsd-comment tsd-typography"><p>The <code>balanceLL</code> function performs a left-left rotation on an AVL tree to balance it.</p>
1078
- </div>
1079
- <div class="tsd-parameters">
1080
- <h4 class="tsd-parameters-title">Parameters</h4>
1081
- <ul class="tsd-parameter-list">
1082
- <li>
1083
- <h5><span class="tsd-kind-parameter">A</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
1084
- <div class="tsd-comment tsd-typography"><p>The parameter A is an AVLTreeNode object.</p>
1085
- </div>
1086
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1087
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
1088
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1089
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#balanceLL">balanceLL</a></p>
1090
- <ul>
1091
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/avl-tree.ts#L133">src/data-structures/binary-tree/avl-tree.ts:133</a></li></ul></aside></li></ul></section>
1092
- <section class="tsd-panel tsd-member"><a id="balanceLR" class="tsd-anchor"></a>
1093
- <h3 class="tsd-anchor-link"><span>balanceLR</span><a href="#balanceLR" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
1094
- <ul class="tsd-signatures">
1095
- <li class="tsd-signature tsd-anchor-link" id="balanceLR.balanceLR-1"><span class="tsd-kind-call-signature">balanceLR</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">A</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#balanceLR.balanceLR-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1096
- <li class="tsd-description">
1097
- <div class="tsd-comment tsd-typography"><p>The <code>balanceLR</code> function performs a left-right rotation to balance an AVL tree.</p>
1098
- </div>
1099
- <div class="tsd-parameters">
1100
- <h4 class="tsd-parameters-title">Parameters</h4>
1101
- <ul class="tsd-parameter-list">
1102
- <li>
1103
- <h5><span class="tsd-kind-parameter">A</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
1104
- <div class="tsd-comment tsd-typography"><p>A is an AVLTreeNode object.</p>
1105
- </div>
1106
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1107
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
1108
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1109
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#balanceLR">balanceLR</a></p>
1110
- <ul>
1111
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/avl-tree.ts#L163">src/data-structures/binary-tree/avl-tree.ts:163</a></li></ul></aside></li></ul></section>
1112
- <section class="tsd-panel tsd-member"><a id="balancePath" class="tsd-anchor"></a>
1113
- <h3 class="tsd-anchor-link"><span>balance<wbr/>Path</span><a href="#balancePath" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
1114
- <ul class="tsd-signatures">
1115
- <li class="tsd-signature tsd-anchor-link" id="balancePath.balancePath-1"><span class="tsd-kind-call-signature">balance<wbr/>Path</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">void</span><a href="#balancePath.balancePath-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1116
- <li class="tsd-description">
1117
- <div class="tsd-comment tsd-typography"><p>The <code>balancePath</code> function balances the AVL tree by performing appropriate rotations based on the balance factor of
1118
- each node in the path from the given node to the root.</p>
1119
- </div>
1120
- <div class="tsd-parameters">
1121
- <h4 class="tsd-parameters-title">Parameters</h4>
1122
- <ul class="tsd-parameter-list">
1123
- <li>
1124
- <h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
1125
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is an AVLTreeNode object, which represents a node in an AVL tree.</p>
1126
- </div>
1127
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1128
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
1129
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1130
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#balancePath">balancePath</a></p>
1131
- <ul>
1132
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/avl-tree.ts#L102">src/data-structures/binary-tree/avl-tree.ts:102</a></li></ul></aside></li></ul></section>
1133
- <section class="tsd-panel tsd-member"><a id="balanceRL" class="tsd-anchor"></a>
1134
- <h3 class="tsd-anchor-link"><span>balanceRL</span><a href="#balanceRL" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
1135
- <ul class="tsd-signatures">
1136
- <li class="tsd-signature tsd-anchor-link" id="balanceRL.balanceRL-1"><span class="tsd-kind-call-signature">balanceRL</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">A</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#balanceRL.balanceRL-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1137
- <li class="tsd-description">
1138
- <div class="tsd-comment tsd-typography"><p>The <code>balanceRL</code> function performs a right-left rotation to balance an AVL tree.</p>
1139
- </div>
1140
- <div class="tsd-parameters">
1141
- <h4 class="tsd-parameters-title">Parameters</h4>
1142
- <ul class="tsd-parameter-list">
1143
- <li>
1144
- <h5><span class="tsd-kind-parameter">A</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
1145
- <div class="tsd-comment tsd-typography"><p>A is an AVLTreeNode object.</p>
1146
- </div>
1147
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1148
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
1149
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1150
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#balanceRL">balanceRL</a></p>
1151
- <ul>
1152
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/avl-tree.ts#L246">src/data-structures/binary-tree/avl-tree.ts:246</a></li></ul></aside></li></ul></section>
1153
- <section class="tsd-panel tsd-member"><a id="balanceRR" class="tsd-anchor"></a>
1154
- <h3 class="tsd-anchor-link"><span>balanceRR</span><a href="#balanceRR" 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">
1156
- <li class="tsd-signature tsd-anchor-link" id="balanceRR.balanceRR-1"><span class="tsd-kind-call-signature">balanceRR</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">A</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#balanceRR.balanceRR-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 <code>balanceRR</code> function performs a right-right rotation on an AVL tree to balance it.</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><span class="tsd-kind-parameter">A</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
1165
- <div class="tsd-comment tsd-typography"><p>The parameter A is an AVLTreeNode object.</p>
1166
- </div>
1167
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1168
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
1169
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1170
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#balanceRR">balanceRR</a></p>
1171
- <ul>
1172
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/avl-tree.ts#L211">src/data-structures/binary-tree/avl-tree.ts:211</a></li></ul></aside></li></ul></section>
1173
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="clear" class="tsd-anchor"></a>
1174
- <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>
1175
- <ul class="tsd-signatures tsd-is-inherited">
1176
- <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>
1177
- <li class="tsd-description">
1178
- <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>
1179
- </div>
1180
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
1181
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1182
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#clear">clear</a></p>
1183
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#clear">clear</a></p>
1184
- <ul>
1185
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L263">src/data-structures/binary-tree/abstract-binary-tree.ts:263</a></li></ul></aside></li></ul></section>
1186
- <section class="tsd-panel tsd-member"><a id="createNode" class="tsd-anchor"></a>
1187
- <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>
1188
- <ul class="tsd-signatures">
1189
- <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-signature-symbol">?</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 tsd-kind-type-parameter">N</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>
1190
- <li class="tsd-description">
1191
- <div class="tsd-comment tsd-typography"><p>The function creates a new binary search tree node with the given id, value, and count.</p>
1192
- </div>
1193
- <div class="tsd-parameters">
1194
- <h4 class="tsd-parameters-title">Parameters</h4>
1195
- <ul class="tsd-parameter-list">
1196
- <li>
1197
- <h5><span class="tsd-kind-parameter">id</span>: <span class="tsd-signature-type">number</span></h5>
1198
- <div class="tsd-comment tsd-typography"><p>The <code>id</code> parameter is the identifier for the binary tree node. It is of type
1199
- <code>BinaryTreeNodeId</code>.</p>
1200
- </div>
1201
- <div class="tsd-comment tsd-typography"></div></li>
1202
- <li>
1203
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">val</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">&quot;val&quot;</span><span class="tsd-signature-symbol">]</span></h5>
1204
- <div class="tsd-comment tsd-typography"><p>The <code>val</code> parameter is the value that will be stored in the node. It can be of any
1205
- type <code>N[&#39;val&#39;]</code> or <code>null</code>.</p>
1206
- </div>
1207
- <div class="tsd-comment tsd-typography"></div></li>
1208
- <li>
1209
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">count</span>: <span class="tsd-signature-type">number</span></h5>
1210
- <div class="tsd-comment tsd-typography"><p>The <code>count</code> parameter is an optional parameter that represents the number of occurrences
1211
- of a particular value in the binary search tree node.</p>
1212
- </div>
1213
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1214
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>a new instance of the BSTNode class, casted as type N.</p>
1215
-
1216
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1217
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#createNode">createNode</a></p>
1218
- <p>Overrides <a href="BST.html">BST</a>.<a href="BST.html#createNode">createNode</a></p>
1219
- <ul>
1220
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/avl-tree.ts#L23">src/data-structures/binary-tree/avl-tree.ts:23</a></li></ul></aside></li></ul></section>
1221
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="fill" class="tsd-anchor"></a>
1222
- <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>
1223
- <ul class="tsd-signatures tsd-is-inherited">
1224
- <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>
1225
- <li class="tsd-description">
1226
- <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
1227
- was successful.</p>
1228
- </div>
1229
- <div class="tsd-parameters">
1230
- <h4 class="tsd-parameters-title">Parameters</h4>
1231
- <ul class="tsd-parameter-list">
1232
- <li>
1233
- <h5><span class="tsd-kind-parameter">data</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">&quot;val&quot;</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span></h5>
1234
- <div class="tsd-comment tsd-typography"><p>The <code>data</code> parameter can be either an array of elements of type <code>N</code> or an
1235
- array of <code>N</code> objects.</p>
1236
- </div>
1237
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1238
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The method is returning a boolean value.</p>
1239
-
1240
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1241
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#fill">fill</a></p>
1242
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#fill">fill</a></p>
1243
- <ul>
1244
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L441">src/data-structures/binary-tree/abstract-binary-tree.ts:441</a></li></ul></aside></li></ul></section>
1245
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="get" class="tsd-anchor"></a>
1246
- <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>
1247
- <ul class="tsd-signatures tsd-is-inherited">
1248
- <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><span class="tsd-signature-type tsd-kind-type-parameter">N</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>
1249
- <li class="tsd-description">
1250
- <div class="tsd-comment tsd-typography"><p>The <code>get</code> function returns the first node in a binary search tree that matches the given property value or name.</p>
1251
- </div>
1252
- <div class="tsd-parameters">
1253
- <h4 class="tsd-parameters-title">Parameters</h4>
1254
- <ul class="tsd-parameter-list">
1255
- <li>
1256
- <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">N</span></h5>
1257
- <div class="tsd-comment tsd-typography"><p>The <code>nodeProperty</code> parameter can be either a <code>BinaryTreeNodeId</code> or a
1258
- generic type <code>N</code>. It represents the value of the property that you want to search for in the binary search tree.</p>
1259
- </div>
1260
- <div class="tsd-comment tsd-typography"></div></li>
1261
- <li>
1262
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">propertyName</span>: <a href="../types/BinaryTreeNodePropertyName.html" class="tsd-signature-type tsd-kind-type-alias">BinaryTreeNodePropertyName</a></h5>
1263
- <div class="tsd-comment tsd-typography"><p>The <code>propertyName</code> parameter is an optional parameter that
1264
- specifies the property name to use for searching the binary search tree nodes. If not provided, it defaults to
1265
- <code>&#39;id&#39;</code>.</p>
1266
- </div>
1267
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1268
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>The method is returning a N object or null.</p>
1269
-
1270
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1271
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#get">get</a></p>
1272
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#get">get</a></p>
1273
- <ul>
1274
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/bst.ts#L144">src/data-structures/binary-tree/bst.ts:144</a></li></ul></aside></li></ul></section>
1275
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getDepth" class="tsd-anchor"></a>
1276
- <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>
1277
- <ul class="tsd-signatures tsd-is-inherited">
1278
- <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>
1279
- <li class="tsd-description">
1280
- <div class="tsd-comment tsd-typography"><p>The function calculates the depth of a binary tree node by traversing its parent nodes.</p>
1281
- </div>
1282
- <div class="tsd-parameters">
1283
- <h4 class="tsd-parameters-title">Parameters</h4>
1284
- <ul class="tsd-parameter-list">
1285
- <li>
1286
- <h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
1287
- <div class="tsd-comment tsd-typography"><p>N - This is the node for which we want to calculate the depth. It is a generic type,
1288
- meaning it can represent any type of data that we want to store in the node.</p>
1289
- </div>
1290
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1291
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>The depth of the given binary tree node.</p>
1292
-
1293
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1294
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#getDepth">getDepth</a></p>
1295
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getDepth">getDepth</a></p>
1296
- <ul>
1297
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L499">src/data-structures/binary-tree/abstract-binary-tree.ts:499</a></li></ul></aside></li></ul></section>
1298
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getHeight" class="tsd-anchor"></a>
1299
- <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>
1300
- <ul class="tsd-signatures tsd-is-inherited">
1301
- <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>
1302
- <li class="tsd-description">
1303
- <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
1304
- approach.</p>
1305
- </div>
1306
- <div class="tsd-parameters">
1307
- <h4 class="tsd-parameters-title">Parameters</h4>
1308
- <ul class="tsd-parameter-list">
1309
- <li>
1310
- <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><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
1311
- <div class="tsd-comment tsd-typography"><p>The <code>beginRoot</code> parameter is an optional parameter of type
1312
- <code>N | null</code>. It represents the starting node from which to calculate the height of the binary tree.
1313
- If no value is provided for <code>beginRoot</code>, the function will use the <code>root</code> property of the class instance as</p>
1314
- </div>
1315
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1316
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>the height of the binary tree.</p>
1317
-
1318
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1319
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#getHeight">getHeight</a></p>
1320
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getHeight">getHeight</a></p>
1321
- <ul>
1322
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L516">src/data-structures/binary-tree/abstract-binary-tree.ts:516</a></li></ul></aside></li></ul></section>
1323
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getLeftMost" class="tsd-anchor"></a>
1324
- <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>
1325
- <ul class="tsd-signatures tsd-is-inherited">
1326
- <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><span class="tsd-signature-type tsd-kind-type-parameter">N</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>
1327
- <li class="tsd-description">
1328
- <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
1329
- recursion optimization.</p>
1330
- </div>
1331
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>The <code>getLeftMost</code> function returns the leftmost node in a binary tree.</p>
1332
-
1333
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1334
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#getLeftMost">getLeftMost</a></p>
1335
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getLeftMost">getLeftMost</a></p>
1336
- <ul>
1337
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L703">src/data-structures/binary-tree/abstract-binary-tree.ts:703</a></li></ul></aside></li>
1338
- <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><span class="tsd-signature-type tsd-kind-type-parameter">N</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>
1339
- <li class="tsd-description">
1340
- <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
1341
- recursion optimization.</p>
1342
- </div>
1343
- <div class="tsd-parameters">
1344
- <h4 class="tsd-parameters-title">Parameters</h4>
1345
- <ul class="tsd-parameter-list">
1346
- <li>
1347
- <h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
1348
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is an optional parameter of type <code>N | null</code>. It represents the starting node from which to find the leftmost node in a binary tree. If no node is
1349
- provided, the function will use the root node of the binary tree.</p>
1350
- </div>
1351
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1352
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>The <code>getLeftMost</code> function returns the leftmost node in a binary tree.</p>
1353
-
1354
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1355
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#getLeftMost">getLeftMost</a></p>
1356
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getLeftMost">getLeftMost</a></p>
1357
- <ul>
1358
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L705">src/data-structures/binary-tree/abstract-binary-tree.ts:705</a></li></ul></aside></li></ul></section>
1359
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getMinHeight" class="tsd-anchor"></a>
1360
- <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>
1361
- <ul class="tsd-signatures tsd-is-inherited">
1362
- <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>
1363
- <li class="tsd-description">
1364
- <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
1365
- approach.</p>
1366
- </div>
1367
- <div class="tsd-parameters">
1368
- <h4 class="tsd-parameters-title">Parameters</h4>
1369
- <ul class="tsd-parameter-list">
1370
- <li>
1371
- <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><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
1372
- <div class="tsd-comment tsd-typography"><p>The <code>beginRoot</code> parameter is an optional parameter of type
1373
- <code>N | null</code>. It represents the starting node from which to calculate the minimum height of the binary
1374
- tree. If no value is provided for <code>beginRoot</code>, the function will use the root node of the binary tree.</p>
1375
- </div>
1376
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1377
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>The function <code>getMinHeight</code> returns the minimum height of the binary tree.</p>
1378
-
1379
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1380
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#getMinHeight">getMinHeight</a></p>
1381
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getMinHeight">getMinHeight</a></p>
1382
- <ul>
1383
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L565">src/data-structures/binary-tree/abstract-binary-tree.ts:565</a></li></ul></aside></li></ul></section>
1384
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getNodes" class="tsd-anchor"></a>
1385
- <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>
1386
- <ul class="tsd-signatures tsd-is-inherited">
1387
- <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><span class="tsd-signature-type tsd-kind-type-parameter">N</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>
1388
- <li class="tsd-description">
1389
- <div class="tsd-comment tsd-typography"><p>The function <code>getNodes</code> returns an array of binary search tree nodes that match a given property value, with the
1390
- option to specify the property name and whether to return only one node.</p>
1391
- </div>
1392
- <div class="tsd-parameters">
1393
- <h4 class="tsd-parameters-title">Parameters</h4>
1394
- <ul class="tsd-parameter-list">
1395
- <li>
1396
- <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">N</span></h5>
1397
- <div class="tsd-comment tsd-typography"><p>The <code>nodeProperty</code> parameter can be either a <code>BinaryTreeNodeId</code> or a
1398
- generic type <code>N</code>. It represents the property value that you want to search for in the binary search tree.</p>
1399
- </div>
1400
- <div class="tsd-comment tsd-typography"></div></li>
1401
- <li>
1402
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">propertyName</span>: <a href="../types/BinaryTreeNodePropertyName.html" class="tsd-signature-type tsd-kind-type-alias">BinaryTreeNodePropertyName</a></h5>
1403
- <div class="tsd-comment tsd-typography"><p>The <code>propertyName</code> parameter is an optional parameter that
1404
- specifies the property of the nodes to compare with the <code>nodeProperty</code> parameter. If not provided, it defaults to
1405
- <code>&#39;id&#39;</code>.</p>
1406
- </div>
1407
- <div class="tsd-comment tsd-typography"></div></li>
1408
- <li>
1409
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">onlyOne</span>: <span class="tsd-signature-type">boolean</span></h5>
1410
- <div class="tsd-comment tsd-typography"><p>A boolean value indicating whether to return only one node that matches the given
1411
- nodeProperty. If set to true, the function will stop traversing the tree and return the first matching node. If set
1412
- to false or not provided, the function will return all nodes that match the given nodeProperty.</p>
1413
- </div>
1414
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1415
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>an array of N objects.</p>
1416
-
1417
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1418
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#getNodes">getNodes</a></p>
1419
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getNodes">getNodes</a></p>
1420
- <ul>
1421
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/bst.ts#L234">src/data-structures/binary-tree/bst.ts:234</a></li></ul></aside></li></ul></section>
1422
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getPathToRoot" class="tsd-anchor"></a>
1423
- <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>
1424
- <ul class="tsd-signatures tsd-is-inherited">
1425
- <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><span class="tsd-signature-type tsd-kind-type-parameter">N</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>
1426
- <li class="tsd-description">
1427
- <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
1428
- root of a binary tree.</p>
1429
- </div>
1430
- <div class="tsd-parameters">
1431
- <h4 class="tsd-parameters-title">Parameters</h4>
1432
- <ul class="tsd-parameter-list">
1433
- <li>
1434
- <h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
1435
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object.</p>
1436
- </div>
1437
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1438
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>getPathToRoot</code> returns an array of <code>N</code> objects, representing the path from
1439
- the given <code>node</code> to the root of the binary tree.</p>
1440
-
1441
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1442
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#getPathToRoot">getPathToRoot</a></p>
1443
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getPathToRoot">getPathToRoot</a></p>
1444
- <ul>
1445
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L693">src/data-structures/binary-tree/abstract-binary-tree.ts:693</a></li></ul></aside></li></ul></section>
1446
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getPredecessor" class="tsd-anchor"></a>
1447
- <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>
1448
- <ul class="tsd-signatures tsd-is-inherited">
1449
- <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><span class="tsd-signature-type tsd-kind-type-parameter">N</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>
1450
- <li class="tsd-description">
1451
- <div class="tsd-comment tsd-typography"><p>The function returns the predecessor of a given node in a binary tree.</p>
1452
- </div>
1453
- <div class="tsd-parameters">
1454
- <h4 class="tsd-parameters-title">Parameters</h4>
1455
- <ul class="tsd-parameter-list">
1456
- <li>
1457
- <h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
1458
- <div class="tsd-comment tsd-typography"><p>The parameter <code>node</code> is a BinaryTreeNode object, representing a node in a binary tree.</p>
1459
- </div>
1460
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1461
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>the predecessor of the given node in a binary tree.</p>
1462
-
1463
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1464
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#getPredecessor">getPredecessor</a></p>
1465
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getPredecessor">getPredecessor</a></p>
1466
- <ul>
1467
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1231">src/data-structures/binary-tree/abstract-binary-tree.ts:1231</a></li></ul></aside></li></ul></section>
1468
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getRightMost" class="tsd-anchor"></a>
1469
- <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>
1470
- <ul class="tsd-signatures tsd-is-inherited">
1471
- <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><span class="tsd-signature-type tsd-kind-type-parameter">N</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>
1472
- <li class="tsd-description">
1473
- <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
1474
- tail recursion optimization.</p>
1475
- </div>
1476
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>The <code>getRightMost</code> function returns the rightmost node in a binary tree.</p>
1477
-
1478
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1479
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#getRightMost">getRightMost</a></p>
1480
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getRightMost">getRightMost</a></p>
1481
- <ul>
1482
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L738">src/data-structures/binary-tree/abstract-binary-tree.ts:738</a></li></ul></aside></li>
1483
- <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><span class="tsd-signature-type tsd-kind-type-parameter">N</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>
1484
- <li class="tsd-description">
1485
- <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
1486
- tail recursion optimization.</p>
1487
- </div>
1488
- <div class="tsd-parameters">
1489
- <h4 class="tsd-parameters-title">Parameters</h4>
1490
- <ul class="tsd-parameter-list">
1491
- <li>
1492
- <h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
1493
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is an optional parameter of type <code>N | null</code>. It represents the starting node from which to find the rightmost node in a binary tree. If no node is
1494
- provided, the function will use the root node of the binary tree.</p>
1495
- </div>
1496
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1497
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>The <code>getRightMost</code> function returns the rightmost node in a binary tree.</p>
1498
-
1499
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1500
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#getRightMost">getRightMost</a></p>
1501
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getRightMost">getRightMost</a></p>
1502
- <ul>
1503
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L740">src/data-structures/binary-tree/abstract-binary-tree.ts:740</a></li></ul></aside></li></ul></section>
1504
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getSubTreeSizeAndCount" class="tsd-anchor"></a>
1505
- <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>
1506
- <ul class="tsd-signatures tsd-is-inherited">
1507
- <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>
1508
- <li class="tsd-description">
1509
- <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
1510
- traversal.</p>
1511
- </div>
1512
- <div class="tsd-parameters">
1513
- <h4 class="tsd-parameters-title">Parameters</h4>
1514
- <ul class="tsd-parameter-list">
1515
- <li>
1516
- <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><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
1517
- <div class="tsd-comment tsd-typography"><p>The <code>subTreeRoot</code> parameter is the root node of a binary
1518
- tree.</p>
1519
- </div>
1520
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1521
- <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
1522
- represents the size of the subtree, and the second element represents the count of the nodes in the subtree.</p>
1523
-
1524
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1525
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#getSubTreeSizeAndCount">getSubTreeSizeAndCount</a></p>
1526
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getSubTreeSizeAndCount">getSubTreeSizeAndCount</a></p>
1527
- <ul>
1528
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L825">src/data-structures/binary-tree/abstract-binary-tree.ts:825</a></li></ul></aside></li></ul></section>
1529
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="has" class="tsd-anchor"></a>
1530
- <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>
1531
- <ul class="tsd-signatures tsd-is-inherited">
1532
- <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>
1533
- <li class="tsd-description">
1534
- <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
1535
- property.</p>
1536
- </div>
1537
- <div class="tsd-parameters">
1538
- <h4 class="tsd-parameters-title">Parameters</h4>
1539
- <ul class="tsd-parameter-list">
1540
- <li>
1541
- <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">N</span></h5>
1542
- <div class="tsd-comment tsd-typography"><p>The <code>nodeProperty</code> parameter can be either a <code>BinaryTreeNodeId</code> or a
1543
- generic type <code>N</code>. It represents the property of a binary tree node that you want to check.</p>
1544
- </div>
1545
- <div class="tsd-comment tsd-typography"></div></li>
1546
- <li>
1547
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">propertyName</span>: <a href="../types/BinaryTreeNodePropertyName.html" class="tsd-signature-type tsd-kind-type-alias">BinaryTreeNodePropertyName</a></h5>
1548
- <div class="tsd-comment tsd-typography"><p>The <code>propertyName</code> parameter is an optional parameter that
1549
- specifies the name of the property to check for in the nodes.</p>
1550
- </div>
1551
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1552
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>a boolean value.</p>
1553
-
1554
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1555
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#has">has</a></p>
1556
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#has">has</a></p>
1557
- <ul>
1558
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L668">src/data-structures/binary-tree/abstract-binary-tree.ts:668</a></li></ul></aside></li></ul></section>
1559
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="isAVLBalanced" class="tsd-anchor"></a>
1560
- <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>
1561
- <ul class="tsd-signatures tsd-is-inherited">
1562
- <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>
1563
- <li class="tsd-description">
1564
- <div class="tsd-comment tsd-typography"><p>The function <code>isAVLBalanced</code> checks if a binary search tree is balanced according to the AVL tree property.</p>
1565
- </div>
1566
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The function <code>isAVLBalanced()</code> returns a boolean value. It returns <code>true</code> if the binary search tree (BST)
1567
- is balanced according to the AVL tree property, and <code>false</code> otherwise.</p>
1568
-
1569
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1570
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#isAVLBalanced">isAVLBalanced</a></p>
1571
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#isAVLBalanced">isAVLBalanced</a></p>
1572
- <ul>
1573
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/bst.ts#L454">src/data-structures/binary-tree/bst.ts:454</a></li></ul></aside></li></ul></section>
1574
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="isBST" class="tsd-anchor"></a>
1575
- <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>
1576
- <ul class="tsd-signatures tsd-is-inherited">
1577
- <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>
1578
- <li class="tsd-description">
1579
- <div class="tsd-comment tsd-typography"><p>The function checks if a binary tree is a binary search tree.</p>
1580
- </div>
1581
- <div class="tsd-parameters">
1582
- <h4 class="tsd-parameters-title">Parameters</h4>
1583
- <ul class="tsd-parameter-list">
1584
- <li>
1585
- <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><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
1586
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is of type <code>N</code> or <code>null</code>. It represents the root node of a binary
1587
- search tree (BST).</p>
1588
- </div>
1589
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1590
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>a boolean value.</p>
1591
-
1592
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1593
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#isBST">isBST</a></p>
1594
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#isBST">isBST</a></p>
1595
- <ul>
1596
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L813">src/data-structures/binary-tree/abstract-binary-tree.ts:813</a></li></ul></aside></li></ul></section>
1597
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="isBSTByRooted" class="tsd-anchor"></a>
1598
- <h3 class="tsd-anchor-link"><span>isBSTBy<wbr/>Rooted</span><a href="#isBSTByRooted" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
1599
- <ul class="tsd-signatures tsd-is-inherited">
1600
- <li class="tsd-signature tsd-anchor-link" id="isBSTByRooted.isBSTByRooted-1"><span class="tsd-kind-call-signature">isBSTBy<wbr/>Rooted</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">boolean</span><a href="#isBSTByRooted.isBSTByRooted-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
1601
- <li class="tsd-description">
1602
- <div class="tsd-comment tsd-typography"><p>The function <code>isBSTByRooted</code> checks if a binary tree is a binary search tree (BST) by rooted traversal.</p>
1603
- </div>
1604
- <div class="tsd-parameters">
1605
- <h4 class="tsd-parameters-title">Parameters</h4>
1606
- <ul class="tsd-parameter-list">
1607
- <li>
1608
- <h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
1609
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter represents the root node of a binary search tree (BST).</p>
1610
- </div>
1611
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1612
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>a boolean value.</p>
1613
-
1614
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1615
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#isBSTByRooted">isBSTByRooted</a></p>
1616
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#isBSTByRooted">isBSTByRooted</a></p>
1617
- <ul>
1618
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L778">src/data-structures/binary-tree/abstract-binary-tree.ts:778</a></li></ul></aside></li></ul></section>
1619
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="isBalanced" class="tsd-anchor"></a>
1620
- <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>
1621
- <ul class="tsd-signatures tsd-is-inherited">
1622
- <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>
1623
- <li class="tsd-description">
1624
- <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>
1625
- </div>
1626
- <div class="tsd-parameters">
1627
- <h4 class="tsd-parameters-title">Parameters</h4>
1628
- <ul class="tsd-parameter-list">
1629
- <li>
1630
- <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><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
1631
- <div class="tsd-comment tsd-typography"><p>The <code>beginRoot</code> parameter is the root node of a binary tree. It is
1632
- of type <code>N | null</code>, which means it can either be a <code>BinaryTreeNode</code> object or <code>null</code>.</p>
1633
- </div>
1634
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1635
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The method is returning a boolean value.</p>
1636
-
1637
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1638
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#isBalanced">isBalanced</a></p>
1639
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#isBalanced">isBalanced</a></p>
1640
- <ul>
1641
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L613">src/data-structures/binary-tree/abstract-binary-tree.ts:613</a></li></ul></aside></li></ul></section>
1642
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="isEmpty" class="tsd-anchor"></a>
1643
- <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>
1644
- <ul class="tsd-signatures tsd-is-inherited">
1645
- <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>
1646
- <li class="tsd-description">
1647
- <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>
1648
- </div>
1649
- <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>
1650
-
1651
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1652
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#isEmpty">isEmpty</a></p>
1653
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#isEmpty">isEmpty</a></p>
1654
- <ul>
1655
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L274">src/data-structures/binary-tree/abstract-binary-tree.ts:274</a></li></ul></aside></li></ul></section>
1656
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="lastKey" class="tsd-anchor"></a>
1657
- <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>
1658
- <ul class="tsd-signatures tsd-is-inherited">
1659
- <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>
1660
- <li class="tsd-description">
1661
- <div class="tsd-comment tsd-typography"><p>The function returns the id of the rightmost node if the comparison between two values is less than, the id of the
1662
- leftmost node if the comparison is greater than, and the id of the rightmost node otherwise.</p>
1663
- </div>
1664
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>The function <code>lastKey()</code> returns the ID of the rightmost node in a binary tree. If the comparison between
1665
- the first two elements in the tree is less than, it returns the ID of the rightmost node. If the comparison is
1666
- greater than, it returns the ID of the leftmost node. Otherwise, it also returns the ID of the rightmost node. If
1667
- there are no nodes in</p>
1668
-
1669
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1670
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#lastKey">lastKey</a></p>
1671
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#lastKey">lastKey</a></p>
1672
- <ul>
1673
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/bst.ts#L157">src/data-structures/binary-tree/bst.ts:157</a></li></ul></aside></li></ul></section>
1674
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="lesserSum" class="tsd-anchor"></a>
1675
- <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>
1676
- <ul class="tsd-signatures tsd-is-inherited">
1677
- <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>
1678
- <li class="tsd-description">
1679
- <div class="tsd-comment tsd-typography"><p>The <code>lesserSum</code> function calculates the sum of a specified property in all nodes with an ID less than a given ID in
1680
- a binary search tree.</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 for which you want to
1688
- calculate the lesser sum.</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">propertyName</span>: <a href="../types/BinaryTreeNodePropertyName.html" class="tsd-signature-type tsd-kind-type-alias">BinaryTreeNodePropertyName</a></h5>
1693
- <div class="tsd-comment tsd-typography"><p>The <code>propertyName</code> parameter is an optional parameter that
1694
- specifies the property of the binary tree node to use for calculating the sum. If not provided, it defaults to &#39;id&#39;.</p>
1695
- </div>
1696
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1697
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>The function <code>lesserSum</code> returns a number, which represents the sum of the values of the nodes in the
1698
- binary search tree that have a property value lesser than the given <code>id</code>.</p>
1699
-
1700
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1701
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#lesserSum">lesserSum</a></p>
1702
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#lesserSum">lesserSum</a></p>
1703
- <ul>
1704
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/bst.ts#L285">src/data-structures/binary-tree/bst.ts:285</a></li></ul></aside></li></ul></section>
1705
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="levelIterative" class="tsd-anchor"></a>
1706
- <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>
1707
- <ul class="tsd-signatures tsd-is-inherited">
1708
- <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>
1709
- <li class="tsd-description">
1710
- <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
1711
- in an array, based on a specified property name.</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">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
1718
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
1719
- node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
1720
- the tree is used as the starting node.</p>
1721
- </div>
1722
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1723
- <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>AbstractBinaryTreeNodeProperties&lt;N&gt;</code>.</p>
1724
-
1725
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1726
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#levelIterative">levelIterative</a></p>
1727
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#levelIterative">levelIterative</a></p>
1728
- <ul>
1729
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1108">src/data-structures/binary-tree/abstract-binary-tree.ts:1108</a></li></ul></aside></li>
1730
- <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>
1731
- <li class="tsd-description">
1732
- <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
1733
- in an array, based on a specified property name.</p>
1734
- </div>
1735
- <div class="tsd-parameters">
1736
- <h4 class="tsd-parameters-title">Parameters</h4>
1737
- <ul class="tsd-parameter-list">
1738
- <li>
1739
- <h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
1740
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
1741
- node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
1742
- the tree is used as the starting node.</p>
1743
- </div>
1744
- <div class="tsd-comment tsd-typography"></div></li>
1745
- <li>
1746
- <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>
1747
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is an optional parameter that
1748
- 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
1749
- will accumulate results based on that property. If no property name is provided, the function will default to
1750
- accumulating results</p>
1751
- </div>
1752
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1753
- <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>AbstractBinaryTreeNodeProperties&lt;N&gt;</code>.</p>
1754
-
1755
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1756
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#levelIterative">levelIterative</a></p>
1757
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#levelIterative">levelIterative</a></p>
1758
- <ul>
1759
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1110">src/data-structures/binary-tree/abstract-binary-tree.ts:1110</a></li></ul></aside></li>
1760
- <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">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">&quot;val&quot;</span><span class="tsd-signature-symbol">]</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>
1761
- <li class="tsd-description">
1762
- <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
1763
- in an array, based on a specified property name.</p>
1764
- </div>
1765
- <div class="tsd-parameters">
1766
- <h4 class="tsd-parameters-title">Parameters</h4>
1767
- <ul class="tsd-parameter-list">
1768
- <li>
1769
- <h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
1770
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
1771
- node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
1772
- the tree is used as the starting node.</p>
1773
- </div>
1774
- <div class="tsd-comment tsd-typography"></div></li>
1775
- <li>
1776
- <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>
1777
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is an optional parameter that
1778
- 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
1779
- will accumulate results based on that property. If no property name is provided, the function will default to
1780
- accumulating results</p>
1781
- </div>
1782
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1783
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">&quot;val&quot;</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>levelIterative</code> returns an object of type <code>AbstractBinaryTreeNodeProperties&lt;N&gt;</code>.</p>
1784
-
1785
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1786
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#levelIterative">levelIterative</a></p>
1787
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#levelIterative">levelIterative</a></p>
1788
- <ul>
1789
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1112">src/data-structures/binary-tree/abstract-binary-tree.ts:1112</a></li></ul></aside></li>
1790
- <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><span class="tsd-signature-type tsd-kind-type-parameter">N</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>
1791
- <li class="tsd-description">
1792
- <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
1793
- in an array, based on a specified property name.</p>
1794
- </div>
1795
- <div class="tsd-parameters">
1796
- <h4 class="tsd-parameters-title">Parameters</h4>
1797
- <ul class="tsd-parameter-list">
1798
- <li>
1799
- <h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
1800
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
1801
- node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
1802
- the tree is used as the starting node.</p>
1803
- </div>
1804
- <div class="tsd-comment tsd-typography"></div></li>
1805
- <li>
1806
- <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>
1807
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is an optional parameter that
1808
- 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
1809
- will accumulate results based on that property. If no property name is provided, the function will default to
1810
- accumulating results</p>
1811
- </div>
1812
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1813
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>levelIterative</code> returns an object of type <code>AbstractBinaryTreeNodeProperties&lt;N&gt;</code>.</p>
1814
-
1815
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1816
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#levelIterative">levelIterative</a></p>
1817
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#levelIterative">levelIterative</a></p>
1818
- <ul>
1819
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1114">src/data-structures/binary-tree/abstract-binary-tree.ts:1114</a></li></ul></aside></li>
1820
- <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>
1821
- <li class="tsd-description">
1822
- <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
1823
- in an array, based on a specified property name.</p>
1824
- </div>
1825
- <div class="tsd-parameters">
1826
- <h4 class="tsd-parameters-title">Parameters</h4>
1827
- <ul class="tsd-parameter-list">
1828
- <li>
1829
- <h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
1830
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
1831
- node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
1832
- the tree is used as the starting node.</p>
1833
- </div>
1834
- <div class="tsd-comment tsd-typography"></div></li>
1835
- <li>
1836
- <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>
1837
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is an optional parameter that
1838
- 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
1839
- will accumulate results based on that property. If no property name is provided, the function will default to
1840
- accumulating results</p>
1841
- </div>
1842
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1843
- <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>AbstractBinaryTreeNodeProperties&lt;N&gt;</code>.</p>
1844
-
1845
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1846
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#levelIterative">levelIterative</a></p>
1847
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#levelIterative">levelIterative</a></p>
1848
- <ul>
1849
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1116">src/data-structures/binary-tree/abstract-binary-tree.ts:1116</a></li></ul></aside></li></ul></section>
1850
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="listLevels" class="tsd-anchor"></a>
1851
- <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>
1852
- <ul class="tsd-signatures tsd-is-inherited">
1853
- <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>
1854
- <li class="tsd-description">
1855
- <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>
1856
- </div>
1857
- <div class="tsd-parameters">
1858
- <h4 class="tsd-parameters-title">Parameters</h4>
1859
- <ul class="tsd-parameter-list">
1860
- <li>
1861
- <h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
1862
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
1863
- root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
1864
- </div>
1865
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1866
- <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>AbstractBinaryTreeNodeProperty&lt;N&gt;</code> objects.</p>
1867
-
1868
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1869
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#listLevels">listLevels</a></p>
1870
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#listLevels">listLevels</a></p>
1871
- <ul>
1872
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1154">src/data-structures/binary-tree/abstract-binary-tree.ts:1154</a></li></ul></aside></li>
1873
- <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>
1874
- <li class="tsd-description">
1875
- <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>
1876
- </div>
1877
- <div class="tsd-parameters">
1878
- <h4 class="tsd-parameters-title">Parameters</h4>
1879
- <ul class="tsd-parameter-list">
1880
- <li>
1881
- <h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
1882
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
1883
- root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
1884
- </div>
1885
- <div class="tsd-comment tsd-typography"></div></li>
1886
- <li>
1887
- <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>
1888
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is an optional parameter that
1889
- specifies the property of the <code>BinaryTreeNode</code> object to collect at each level. It can be one of the following
1890
- values:</p>
1891
- </div>
1892
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1893
- <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>AbstractBinaryTreeNodeProperty&lt;N&gt;</code> objects.</p>
1894
-
1895
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1896
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#listLevels">listLevels</a></p>
1897
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#listLevels">listLevels</a></p>
1898
- <ul>
1899
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1156">src/data-structures/binary-tree/abstract-binary-tree.ts:1156</a></li></ul></aside></li>
1900
- <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">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">&quot;val&quot;</span><span class="tsd-signature-symbol">]</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>
1901
- <li class="tsd-description">
1902
- <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>
1903
- </div>
1904
- <div class="tsd-parameters">
1905
- <h4 class="tsd-parameters-title">Parameters</h4>
1906
- <ul class="tsd-parameter-list">
1907
- <li>
1908
- <h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
1909
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
1910
- root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
1911
- </div>
1912
- <div class="tsd-comment tsd-typography"></div></li>
1913
- <li>
1914
- <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>
1915
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is an optional parameter that
1916
- specifies the property of the <code>BinaryTreeNode</code> object to collect at each level. It can be one of the following
1917
- values:</p>
1918
- </div>
1919
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1920
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">&quot;val&quot;</span><span class="tsd-signature-symbol">]</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>AbstractBinaryTreeNodeProperty&lt;N&gt;</code> objects.</p>
1921
-
1922
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1923
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#listLevels">listLevels</a></p>
1924
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#listLevels">listLevels</a></p>
1925
- <ul>
1926
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1158">src/data-structures/binary-tree/abstract-binary-tree.ts:1158</a></li></ul></aside></li>
1927
- <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><span class="tsd-signature-type tsd-kind-type-parameter">N</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>
1928
- <li class="tsd-description">
1929
- <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>
1930
- </div>
1931
- <div class="tsd-parameters">
1932
- <h4 class="tsd-parameters-title">Parameters</h4>
1933
- <ul class="tsd-parameter-list">
1934
- <li>
1935
- <h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
1936
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
1937
- root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
1938
- </div>
1939
- <div class="tsd-comment tsd-typography"></div></li>
1940
- <li>
1941
- <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>
1942
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is an optional parameter that
1943
- specifies the property of the <code>BinaryTreeNode</code> object to collect at each level. It can be one of the following
1944
- values:</p>
1945
- </div>
1946
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1947
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</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>AbstractBinaryTreeNodeProperty&lt;N&gt;</code> objects.</p>
1948
-
1949
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1950
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#listLevels">listLevels</a></p>
1951
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#listLevels">listLevels</a></p>
1952
- <ul>
1953
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1160">src/data-structures/binary-tree/abstract-binary-tree.ts:1160</a></li></ul></aside></li>
1954
- <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>
1955
- <li class="tsd-description">
1956
- <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>
1957
- </div>
1958
- <div class="tsd-parameters">
1959
- <h4 class="tsd-parameters-title">Parameters</h4>
1960
- <ul class="tsd-parameter-list">
1961
- <li>
1962
- <h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
1963
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
1964
- root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
1965
- </div>
1966
- <div class="tsd-comment tsd-typography"></div></li>
1967
- <li>
1968
- <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>
1969
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is an optional parameter that
1970
- specifies the property of the <code>BinaryTreeNode</code> object to collect at each level. It can be one of the following
1971
- values:</p>
1972
- </div>
1973
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1974
- <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>AbstractBinaryTreeNodeProperty&lt;N&gt;</code> objects.</p>
1975
-
1976
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1977
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#listLevels">listLevels</a></p>
1978
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#listLevels">listLevels</a></p>
1979
- <ul>
1980
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1162">src/data-structures/binary-tree/abstract-binary-tree.ts:1162</a></li></ul></aside></li></ul></section>
1981
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="morris" class="tsd-anchor"></a>
1982
- <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>
1983
- <ul class="tsd-signatures tsd-is-inherited">
1984
- <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>
1985
- <li class="tsd-description">
1986
- <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
1987
- traversal algorithm and returns the results based on the specified property name.
1988
- The time complexity of Morris traversal is O(n), it&#39;s may slower than others
1989
- The space complexity Morris traversal is O(1) because no using stack</p>
1990
- </div>
1991
- <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>AbstractBinaryTreeNodeProperties&lt;N&gt;</code>.</p>
1992
-
1993
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1994
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#morris">morris</a></p>
1995
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#morris">morris</a></p>
1996
- <ul>
1997
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1245">src/data-structures/binary-tree/abstract-binary-tree.ts:1245</a></li></ul></aside></li>
1998
- <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>
1999
- <li class="tsd-description">
2000
- <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
2001
- traversal algorithm and returns the results based on the specified property name.
2002
- The time complexity of Morris traversal is O(n), it&#39;s may slower than others
2003
- The space complexity Morris traversal is O(1) because no using stack</p>
2004
- </div>
2005
- <div class="tsd-parameters">
2006
- <h4 class="tsd-parameters-title">Parameters</h4>
2007
- <ul class="tsd-parameter-list">
2008
- <li>
2009
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pattern</span>: <a href="../types/DFSOrderPattern.html" class="tsd-signature-type tsd-kind-type-alias">DFSOrderPattern</a></h5>
2010
- <div class="tsd-comment tsd-typography"><p>The <code>pattern</code> parameter is an optional parameter that determines the
2011
- traversal pattern of the binary tree. It can have one of three values:</p>
2012
- </div>
2013
- <div class="tsd-comment tsd-typography"></div></li>
2014
- <li>
2015
- <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>
2016
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is used to specify the
2017
- property of the nodes that you want to retrieve in the results. It can be either the node itself or the name of the
2018
- property. If not provided, it defaults to <code>&#39;id&#39;</code>.</p>
2019
- </div>
2020
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
2021
- <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>AbstractBinaryTreeNodeProperties&lt;N&gt;</code>.</p>
2022
-
2023
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
2024
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#morris">morris</a></p>
2025
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#morris">morris</a></p>
2026
- <ul>
2027
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1247">src/data-structures/binary-tree/abstract-binary-tree.ts:1247</a></li></ul></aside></li>
2028
- <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">N</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>
2029
- <li class="tsd-description">
2030
- <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
2031
- traversal algorithm and returns the results based on the specified property name.
2032
- The time complexity of Morris traversal is O(n), it&#39;s may slower than others
2033
- The space complexity Morris traversal is O(1) because no using stack</p>
2034
- </div>
2035
- <div class="tsd-parameters">
2036
- <h4 class="tsd-parameters-title">Parameters</h4>
2037
- <ul class="tsd-parameter-list">
2038
- <li>
2039
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pattern</span>: <a href="../types/DFSOrderPattern.html" class="tsd-signature-type tsd-kind-type-alias">DFSOrderPattern</a></h5>
2040
- <div class="tsd-comment tsd-typography"><p>The <code>pattern</code> parameter is an optional parameter that determines the
2041
- traversal pattern of the binary tree. It can have one of three values:</p>
2042
- </div>
2043
- <div class="tsd-comment tsd-typography"></div></li>
2044
- <li>
2045
- <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>
2046
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is used to specify the
2047
- property of the nodes that you want to retrieve in the results. It can be either the node itself or the name of the
2048
- property. If not provided, it defaults to <code>&#39;id&#39;</code>.</p>
2049
- </div>
2050
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
2051
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>morris</code> returns an object of type <code>AbstractBinaryTreeNodeProperties&lt;N&gt;</code>.</p>
2052
-
2053
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
2054
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#morris">morris</a></p>
2055
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#morris">morris</a></p>
2056
- <ul>
2057
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1249">src/data-structures/binary-tree/abstract-binary-tree.ts:1249</a></li></ul></aside></li>
2058
- <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><span class="tsd-signature-type tsd-kind-type-parameter">N</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>
2059
- <li class="tsd-description">
2060
- <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
2061
- traversal algorithm and returns the results based on the specified property name.
2062
- The time complexity of Morris traversal is O(n), it&#39;s may slower than others
2063
- The space complexity Morris traversal is O(1) because no using stack</p>
2064
- </div>
2065
- <div class="tsd-parameters">
2066
- <h4 class="tsd-parameters-title">Parameters</h4>
2067
- <ul class="tsd-parameter-list">
2068
- <li>
2069
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pattern</span>: <a href="../types/DFSOrderPattern.html" class="tsd-signature-type tsd-kind-type-alias">DFSOrderPattern</a></h5>
2070
- <div class="tsd-comment tsd-typography"><p>The <code>pattern</code> parameter is an optional parameter that determines the
2071
- traversal pattern of the binary tree. It can have one of three values:</p>
2072
- </div>
2073
- <div class="tsd-comment tsd-typography"></div></li>
2074
- <li>
2075
- <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>
2076
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is used to specify the
2077
- property of the nodes that you want to retrieve in the results. It can be either the node itself or the name of the
2078
- property. If not provided, it defaults to <code>&#39;id&#39;</code>.</p>
2079
- </div>
2080
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
2081
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4><p>The function <code>morris</code> returns an object of type <code>AbstractBinaryTreeNodeProperties&lt;N&gt;</code>.</p>
2082
-
2083
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
2084
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#morris">morris</a></p>
2085
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#morris">morris</a></p>
2086
- <ul>
2087
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1251">src/data-structures/binary-tree/abstract-binary-tree.ts:1251</a></li></ul></aside></li>
2088
- <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>
2089
- <li class="tsd-description">
2090
- <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
2091
- traversal algorithm and returns the results based on the specified property name.
2092
- The time complexity of Morris traversal is O(n), it&#39;s may slower than others
2093
- The space complexity Morris traversal is O(1) because no using stack</p>
2094
- </div>
2095
- <div class="tsd-parameters">
2096
- <h4 class="tsd-parameters-title">Parameters</h4>
2097
- <ul class="tsd-parameter-list">
2098
- <li>
2099
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">pattern</span>: <a href="../types/DFSOrderPattern.html" class="tsd-signature-type tsd-kind-type-alias">DFSOrderPattern</a></h5>
2100
- <div class="tsd-comment tsd-typography"><p>The <code>pattern</code> parameter is an optional parameter that determines the
2101
- traversal pattern of the binary tree. It can have one of three values:</p>
2102
- </div>
2103
- <div class="tsd-comment tsd-typography"></div></li>
2104
- <li>
2105
- <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>
2106
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is used to specify the
2107
- property of the nodes that you want to retrieve in the results. It can be either the node itself or the name of the
2108
- property. If not provided, it defaults to <code>&#39;id&#39;</code>.</p>
2109
- </div>
2110
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
2111
- <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>AbstractBinaryTreeNodeProperties&lt;N&gt;</code>.</p>
2112
-
2113
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
2114
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#morris">morris</a></p>
2115
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#morris">morris</a></p>
2116
- <ul>
2117
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1253">src/data-structures/binary-tree/abstract-binary-tree.ts:1253</a></li></ul></aside></li></ul></section>
2118
- <section class="tsd-panel tsd-member"><a id="remove" class="tsd-anchor"></a>
2119
- <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>
2120
- <ul class="tsd-signatures">
2121
- <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><a href="../types/BinaryTreeDeletedResult.html" class="tsd-signature-type tsd-kind-type-alias">BinaryTreeDeletedResult</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">N</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>
2122
- <li class="tsd-description">
2123
- <div class="tsd-comment tsd-typography"><p>The function overrides the remove method of the Binary Search Tree class, performs the removal operation, and
2124
- then balances the tree if necessary.</p>
2125
- </div>
2126
- <div class="tsd-parameters">
2127
- <h4 class="tsd-parameters-title">Parameters</h4>
2128
- <ul class="tsd-parameter-list">
2129
- <li>
2130
- <h5><span class="tsd-kind-parameter">id</span>: <span class="tsd-signature-type">number</span></h5>
2131
- <div class="tsd-comment tsd-typography"><p>The <code>id</code> parameter represents the identifier of the binary tree node that needs to be
2132
- removed from the AVL tree.</p>
2133
- </div>
2134
- <div class="tsd-comment tsd-typography"></div></li>
2135
- <li>
2136
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">isUpdateAllLeftSum</span>: <span class="tsd-signature-type">boolean</span></h5>
2137
- <div class="tsd-comment tsd-typography"><p>The <code>isUpdateAllLeftSum</code> parameter is an optional boolean parameter that
2138
- determines whether the left sum of all nodes in the AVL tree should be updated after removing a node. If
2139
- <code>isUpdateAllLeftSum</code> is set to <code>true</code>, the left sum of all nodes will be recalculated.</p>
2140
- </div>
2141
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
2142
- <h4 class="tsd-returns-title">Returns <a href="../types/BinaryTreeDeletedResult.html" class="tsd-signature-type tsd-kind-type-alias">BinaryTreeDeletedResult</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">[]</span></h4><p>The method is returning an array of <code>AVLTreeDeleted&lt;N&gt;</code> objects.</p>
2143
-
2144
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
2145
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#remove">remove</a></p>
2146
- <p>Overrides <a href="BST.html">BST</a>.<a href="BST.html#remove">remove</a></p>
2147
- <ul>
2148
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/avl-tree.ts#L55">src/data-structures/binary-tree/avl-tree.ts:55</a></li></ul></aside></li></ul></section>
2149
- <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="setVisitedCount" class="tsd-anchor"></a>
2150
- <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>set<wbr/>Visited<wbr/>Count</span><a href="#setVisitedCount" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
2151
- <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
2152
- <li class="tsd-signature tsd-anchor-link" id="setVisitedCount.setVisitedCount-1"><span class="tsd-kind-call-signature">set<wbr/>Visited<wbr/>Count</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">value</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#setVisitedCount.setVisitedCount-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
2153
- <li class="tsd-description">
2154
- <div class="tsd-parameters">
2155
- <h4 class="tsd-parameters-title">Parameters</h4>
2156
- <ul class="tsd-parameter-list">
2157
- <li>
2158
- <h5><span class="tsd-kind-parameter">value</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h5></li></ul></div>
2159
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
2160
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#setVisitedCount">setVisitedCount</a></p>
2161
- <ul>
2162
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L1369">src/data-structures/binary-tree/abstract-binary-tree.ts:1369</a></li></ul></aside></li></ul></section>
2163
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="subTreeAdd" class="tsd-anchor"></a>
2164
- <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>
2165
- <ul class="tsd-signatures tsd-is-inherited">
2166
- <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>
2167
- <li class="tsd-description">
2168
- <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>
2169
- </div>
2170
- <div class="tsd-parameters">
2171
- <h4 class="tsd-parameters-title">Parameters</h4>
2172
- <ul class="tsd-parameter-list">
2173
- <li>
2174
- <h5><span class="tsd-kind-parameter">subTreeRoot</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
2175
- <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>
2176
- </div>
2177
- <div class="tsd-comment tsd-typography"></div></li>
2178
- <li>
2179
- <h5><span class="tsd-kind-parameter">delta</span>: <span class="tsd-signature-type">number</span></h5>
2180
- <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
2181
- each node in the subtree should be increased or decreased.</p>
2182
- </div>
2183
- <div class="tsd-comment tsd-typography"></div></li>
2184
- <li>
2185
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">propertyName</span>: <a href="../types/BinaryTreeNodePropertyName.html" class="tsd-signature-type tsd-kind-type-alias">BinaryTreeNodePropertyName</a></h5>
2186
- <div class="tsd-comment tsd-typography"><p>The <code>propertyName</code> parameter is an optional parameter that
2187
- specifies the property of the <code>BinaryTreeNode</code> that should be modified. It defaults to <code>&#39;id&#39;</code> if not provided.</p>
2188
- </div>
2189
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
2190
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>a boolean value, which is <code>true</code>.</p>
2191
-
2192
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
2193
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#subTreeAdd">subTreeAdd</a></p>
2194
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#subTreeAdd">subTreeAdd</a></p>
2195
- <ul>
2196
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L922">src/data-structures/binary-tree/abstract-binary-tree.ts:922</a></li></ul></aside></li></ul></section>
2197
- <section class="tsd-panel tsd-member tsd-is-inherited"><a id="subTreeSum" class="tsd-anchor"></a>
2198
- <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>
2199
- <ul class="tsd-signatures tsd-is-inherited">
2200
- <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>
2201
- <li class="tsd-description">
2202
- <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
2203
- iteratively.</p>
2204
- </div>
2205
- <div class="tsd-parameters">
2206
- <h4 class="tsd-parameters-title">Parameters</h4>
2207
- <ul class="tsd-parameter-list">
2208
- <li>
2209
- <h5><span class="tsd-kind-parameter">subTreeRoot</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
2210
- <div class="tsd-comment tsd-typography"><p>The subTreeRoot parameter is the root node of the subtree for which you want to calculate the
2211
- sum.</p>
2212
- </div>
2213
- <div class="tsd-comment tsd-typography"></div></li>
2214
- <li>
2215
- <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">propertyName</span>: <a href="../types/BinaryTreeNodePropertyName.html" class="tsd-signature-type tsd-kind-type-alias">BinaryTreeNodePropertyName</a></h5>
2216
- <div class="tsd-comment tsd-typography"><p>The <code>propertyName</code> parameter is an optional parameter that
2217
- specifies the property of the <code>BinaryTreeNode</code> object to use for calculating the sum. If <code>propertyName</code> is not
2218
- provided, it defaults to <code>&#39;val&#39;</code>.</p>
2219
- </div>
2220
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
2221
- <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>
2222
-
2223
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
2224
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#subTreeSum">subTreeSum</a></p>
2225
- <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#subTreeSum">subTreeSum</a></p>
2226
- <ul>
2227
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/abstract-binary-tree.ts#L866">src/data-structures/binary-tree/abstract-binary-tree.ts:866</a></li></ul></aside></li></ul></section>
2228
- <section class="tsd-panel tsd-member"><a id="updateHeight" class="tsd-anchor"></a>
2229
- <h3 class="tsd-anchor-link"><span>update<wbr/>Height</span><a href="#updateHeight" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
2230
- <ul class="tsd-signatures">
2231
- <li class="tsd-signature tsd-anchor-link" id="updateHeight.updateHeight-1"><span class="tsd-kind-call-signature">update<wbr/>Height</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">void</span><a href="#updateHeight.updateHeight-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></li>
2232
- <li class="tsd-description">
2233
- <div class="tsd-comment tsd-typography"><p>The function updates the height of a node in an AVL tree based on the heights of its left and right subtrees.</p>
2234
- </div>
2235
- <div class="tsd-parameters">
2236
- <h4 class="tsd-parameters-title">Parameters</h4>
2237
- <ul class="tsd-parameter-list">
2238
- <li>
2239
- <h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
2240
- <div class="tsd-comment tsd-typography"><p>The parameter <code>node</code> is an AVLTreeNode object, which represents a node in an AVL tree.</p>
2241
- </div>
2242
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
2243
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
2244
- <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
2245
- <p>Implementation of <a href="../interfaces/IAVLTree.html">IAVLTree</a>.<a href="../interfaces/IAVLTree.html#updateHeight">updateHeight</a></p>
2246
- <ul>
2247
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/2ea57d2/src/data-structures/binary-tree/avl-tree.ts#L84">src/data-structures/binary-tree/avl-tree.ts:84</a></li></ul></aside></li></ul></section></section></div>
2248
- <div class="col-sidebar">
2249
- <div class="page-menu">
2250
- <div class="tsd-navigation settings">
2251
- <details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
2252
- <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>
2253
- <div class="tsd-accordion-details">
2254
- <div class="tsd-filter-visibility">
2255
- <h4 class="uppercase">Member Visibility</h4><form>
2256
- <ul id="tsd-filter-options">
2257
- <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>
2258
- <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>
2259
- <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>
2260
- <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>
2261
- <div class="tsd-theme-toggle">
2262
- <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>
2263
- <details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary">
2264
- <h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="#icon-chevronDown"></use></svg>On This Page</h3></summary>
2265
- <div class="tsd-accordion-details">
2266
- <ul>
2267
- <li><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-512"></use></svg><span>constructor</span></a></li>
2268
- <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>
2269
- <li><a href="#autoIncrementId" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>auto<wbr/>Increment<wbr/>Id</span></a></li>
2270
- <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>
2271
- <li><a href="#isDuplicatedVal" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>is<wbr/>Duplicated<wbr/>Val</span></a></li>
2272
- <li><a href="#loopType" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>loop<wbr/>Type</span></a></li>
2273
- <li><a href="#maxId" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>max<wbr/>Id</span></a></li>
2274
- <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>
2275
- <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>
2276
- <li><a href="#visitedCount" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>visited<wbr/>Count</span></a></li>
2277
- <li><a href="#visitedId" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>visited<wbr/>Id</span></a></li>
2278
- <li><a href="#visitedLeftSum" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>visited<wbr/>Left<wbr/>Sum</span></a></li>
2279
- <li><a href="#visitedNode" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>visited<wbr/>Node</span></a></li>
2280
- <li><a href="#visitedVal" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-262144"></use></svg><span>visited<wbr/>Val</span></a></li>
2281
- <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>
2282
- <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>
2283
- <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>
2284
- <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>
2285
- <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>
2286
- <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>
2287
- <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>
2288
- <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>
2289
- <li><a href="#_setAutoIncrementId" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Auto<wbr/>Increment<wbr/>Id</span></a></li>
2290
- <li><a href="#_setCount" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Count</span></a></li>
2291
- <li><a href="#_setIsDuplicatedVal" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Is<wbr/>Duplicated<wbr/>Val</span></a></li>
2292
- <li><a href="#_setLoopType" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Loop<wbr/>Type</span></a></li>
2293
- <li><a href="#_setMaxId" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Max<wbr/>Id</span></a></li>
2294
- <li><a href="#_setRoot" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Root</span></a></li>
2295
- <li><a href="#_setSize" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Size</span></a></li>
2296
- <li><a href="#_setVisitedId" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Visited<wbr/>Id</span></a></li>
2297
- <li><a href="#_setVisitedLeftSum" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Visited<wbr/>Left<wbr/>Sum</span></a></li>
2298
- <li><a href="#_setVisitedNode" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Visited<wbr/>Node</span></a></li>
2299
- <li><a href="#_setVisitedVal" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>_set<wbr/>Visited<wbr/>Val</span></a></li>
2300
- <li><a href="#add" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>add</span></a></li>
2301
- <li><a href="#addMany" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>add<wbr/>Many</span></a></li>
2302
- <li><a href="#addTo" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>add<wbr/>To</span></a></li>
2303
- <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>
2304
- <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>
2305
- <li><a href="#balanceFactor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>balance<wbr/>Factor</span></a></li>
2306
- <li><a href="#balanceLL" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>balanceLL</span></a></li>
2307
- <li><a href="#balanceLR" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>balanceLR</span></a></li>
2308
- <li><a href="#balancePath" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>balance<wbr/>Path</span></a></li>
2309
- <li><a href="#balanceRL" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>balanceRL</span></a></li>
2310
- <li><a href="#balanceRR" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>balanceRR</span></a></li>
2311
- <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>
2312
- <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>
2313
- <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>
2314
- <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>
2315
- <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>
2316
- <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>
2317
- <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>
2318
- <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>
2319
- <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>
2320
- <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>
2321
- <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>
2322
- <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>
2323
- <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>
2324
- <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>
2325
- <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>
2326
- <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>
2327
- <li><a href="#isBSTByRooted" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>isBSTBy<wbr/>Rooted</span></a></li>
2328
- <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>
2329
- <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>
2330
- <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>
2331
- <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>
2332
- <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>
2333
- <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>
2334
- <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>
2335
- <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>
2336
- <li><a href="#setVisitedCount" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>set<wbr/>Visited<wbr/>Count</span></a></li>
2337
- <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>
2338
- <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>
2339
- <li><a href="#updateHeight" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-2048"></use></svg><span>update<wbr/>Height</span></a></li></ul></div></details></div>
2340
- <div class="site-menu">
2341
- <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>
2342
- <ul class="tsd-small-nested-navigation">
2343
- <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>
2344
- <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>
2345
- <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>
2346
- <li><a href="../enums/RBColor.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-8"></use></svg><span>RBColor</span></a></li>
2347
- <li><a href="../enums/TopologicalProperty.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-8"></use></svg><span>Topological<wbr/>Property</span></a></li>
2348
- <li><a href="AVLTree.html" class="current"><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>
2349
- <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>
2350
- <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>
2351
- <li><a href="AbstractBinaryTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Abstract<wbr/>Binary<wbr/>Tree</span></a></li>
2352
- <li><a href="AbstractBinaryTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Abstract<wbr/>Binary<wbr/>Tree<wbr/>Node</span></a></li>
2353
- <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>
2354
- <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>
2355
- <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>
2356
- <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>
2357
- <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>
2358
- <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>
2359
- <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>
2360
- <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>
2361
- <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>
2362
- <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>
2363
- <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>
2364
- <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>
2365
- <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>
2366
- <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>
2367
- <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>
2368
- <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>
2369
- <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>
2370
- <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>
2371
- <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>
2372
- <li><a href="HashTable.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Hash<wbr/>Table</span></a></li>
2373
- <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>
2374
- <li><a href="HeapItem.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Heap<wbr/>Item</span></a></li>
2375
- <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>
2376
- <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>
2377
- <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>
2378
- <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>
2379
- <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>
2380
- <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>
2381
- <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>
2382
- <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>
2383
- <li><a href="Pair.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Pair</span></a></li>
2384
- <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>
2385
- <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>
2386
- <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>
2387
- <li><a href="RBTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>RBTree<wbr/>Node</span></a></li>
2388
- <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>
2389
- <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>
2390
- <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>
2391
- <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>
2392
- <li><a href="SkipLinkedList.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Skip<wbr/>Linked<wbr/>List</span></a></li>
2393
- <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>
2394
- <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>
2395
- <li><a href="TreeMap.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Tree<wbr/>Map</span></a></li>
2396
- <li><a href="TreeMultiSet.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Tree<wbr/>Multi<wbr/>Set</span></a></li>
2397
- <li><a href="TreeMultiSetNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Tree<wbr/>Multi<wbr/>Set<wbr/>Node</span></a></li>
2398
- <li><a href="TreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Tree<wbr/>Node</span></a></li>
2399
- <li><a href="TreeSet.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-128"></use></svg><span>Tree<wbr/>Set</span></a></li>
2400
- <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>
2401
- <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>
2402
- <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>
2403
- <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>
2404
- <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>
2405
- <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>
2406
- <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>
2407
- <li><a href="../interfaces/IAVLTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-256"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)"></path></g></svg><span>IAVLTree</span></a></li>
2408
- <li><a href="../interfaces/IAVLTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>IAVLTree<wbr/>Node</span></a></li>
2409
- <li><a href="../interfaces/IAbstractBinaryTree.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>IAbstract<wbr/>Binary<wbr/>Tree</span></a></li>
2410
- <li><a href="../interfaces/IAbstractBinaryTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>IAbstract<wbr/>Binary<wbr/>Tree<wbr/>Node</span></a></li>
2411
- <li><a href="../interfaces/IAbstractGraph.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>IAbstract<wbr/>Graph</span></a></li>
2412
- <li><a href="../interfaces/IBST.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>IBST</span></a></li>
2413
- <li><a href="../interfaces/IBSTNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>IBSTNode</span></a></li>
2414
- <li><a href="../interfaces/IDirectedGraph.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>IDirected<wbr/>Graph</span></a></li>
2415
- <li><a href="../interfaces/IUNDirectedGraph.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-256"></use></svg><span>IUNDirected<wbr/>Graph</span></a></li>
2416
- <li><a href="../types/AVLTreeOptions.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><g id="icon-4194304"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)"></path></g></svg><span>AVLTree<wbr/>Options</span></a></li>
2417
- <li><a href="../types/AbstractBinaryTreeNodeProperties.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Abstract<wbr/>Binary<wbr/>Tree<wbr/>Node<wbr/>Properties</span></a></li>
2418
- <li><a href="../types/AbstractBinaryTreeNodeProperty.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Abstract<wbr/>Binary<wbr/>Tree<wbr/>Node<wbr/>Property</span></a></li>
2419
- <li><a href="../types/AbstractBinaryTreeOptions.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Abstract<wbr/>Binary<wbr/>Tree<wbr/>Options</span></a></li>
2420
- <li><a href="../types/AbstractRecursiveBinaryTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Abstract<wbr/>Recursive<wbr/>Binary<wbr/>Tree<wbr/>Node</span></a></li>
2421
- <li><a href="../types/BSTComparator.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>BSTComparator</span></a></li>
2422
- <li><a href="../types/BSTOptions.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>BSTOptions</span></a></li>
2423
- <li><a href="../types/BinaryTreeDeletedResult.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Binary<wbr/>Tree<wbr/>Deleted<wbr/>Result</span></a></li>
2424
- <li><a href="../types/BinaryTreeNodeId.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Binary<wbr/>Tree<wbr/>Node<wbr/>Id</span></a></li>
2425
- <li><a href="../types/BinaryTreeNodePropertyName.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Binary<wbr/>Tree<wbr/>Node<wbr/>Property<wbr/>Name</span></a></li>
2426
- <li><a href="../types/BinaryTreeOptions.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Binary<wbr/>Tree<wbr/>Options</span></a></li>
2427
- <li><a href="../types/DFSOrderPattern.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>DFSOrder<wbr/>Pattern</span></a></li>
2428
- <li><a href="../types/DijkstraResult.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Dijkstra<wbr/>Result</span></a></li>
2429
- <li><a href="../types/Direction.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Direction</span></a></li>
2430
- <li><a href="../types/EdgeId.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Edge<wbr/>Id</span></a></li>
2431
- <li><a href="../types/HeapOptions.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Heap<wbr/>Options</span></a></li>
2432
- <li><a href="../types/IdObject.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Id<wbr/>Object</span></a></li>
2433
- <li><a href="../types/KeyValObject.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Key<wbr/>Val<wbr/>Object</span></a></li>
2434
- <li><a href="../types/NavigatorParams.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Navigator<wbr/>Params</span></a></li>
2435
- <li><a href="../types/NodeOrPropertyName.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Node<wbr/>Or<wbr/>Property<wbr/>Name</span></a></li>
2436
- <li><a href="../types/PriorityQueueComparator.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Priority<wbr/>Queue<wbr/>Comparator</span></a></li>
2437
- <li><a href="../types/PriorityQueueDFSOrderPattern.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Priority<wbr/>QueueDFSOrder<wbr/>Pattern</span></a></li>
2438
- <li><a href="../types/PriorityQueueOptions.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Priority<wbr/>Queue<wbr/>Options</span></a></li>
2439
- <li><a href="../types/RBTreeOptions.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>RBTree<wbr/>Options</span></a></li>
2440
- <li><a href="../types/RecursiveAVLTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>RecursiveAVLTree<wbr/>Node</span></a></li>
2441
- <li><a href="../types/RecursiveBSTNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>RecursiveBSTNode</span></a></li>
2442
- <li><a href="../types/RecursiveBinaryTreeNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Recursive<wbr/>Binary<wbr/>Tree<wbr/>Node</span></a></li>
2443
- <li><a href="../types/RecursiveTreeMultiSetNode.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Recursive<wbr/>Tree<wbr/>Multi<wbr/>Set<wbr/>Node</span></a></li>
2444
- <li><a href="../types/SegmentTreeNodeVal.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Segment<wbr/>Tree<wbr/>Node<wbr/>Val</span></a></li>
2445
- <li><a href="../types/TopologicalStatus.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Topological<wbr/>Status</span></a></li>
2446
- <li><a href="../types/TreeMultiSetOptions.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Tree<wbr/>Multi<wbr/>Set<wbr/>Options</span></a></li>
2447
- <li><a href="../types/Turning.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Turning</span></a></li>
2448
- <li><a href="../types/VertexId.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="#icon-4194304"></use></svg><span>Vertex<wbr/>Id</span></a></li></ul></nav></div></div></div>
2449
- <div class="tsd-generator">
2450
- <p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
2451
- <div class="overlay"></div></body></html>