data-structure-typed 1.31.0 → 1.32.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (365) hide show
  1. package/.gitattributes +112 -0
  2. package/.github/workflows/ci.yml +12 -1
  3. package/.prettierrc.js +1 -1
  4. package/CHANGELOG.md +1 -1
  5. package/CODE-OF-CONDUCT.md +80 -0
  6. package/COMMANDS.md +28 -0
  7. package/README.md +20 -3
  8. package/SECURITY.md +15 -0
  9. package/coverage/clover.xml +3393 -0
  10. package/coverage/coverage-final.json +67 -0
  11. package/coverage/coverage-summary.json +68 -0
  12. package/coverage/lcov-report/base.css +224 -0
  13. package/coverage/lcov-report/block-navigation.js +87 -0
  14. package/coverage/lcov-report/favicon.png +0 -0
  15. package/coverage/lcov-report/index.html +386 -0
  16. package/coverage/lcov-report/prettify.css +1 -0
  17. package/coverage/lcov-report/prettify.js +2 -0
  18. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  19. package/coverage/lcov-report/sorter.js +196 -0
  20. package/coverage/lcov-report/src/data-structures/binary-tree/aa-tree.ts.html +88 -0
  21. package/coverage/lcov-report/src/data-structures/binary-tree/abstract-binary-tree.ts.html +4978 -0
  22. package/coverage/lcov-report/src/data-structures/binary-tree/avl-tree.ts.html +1015 -0
  23. package/coverage/lcov-report/src/data-structures/binary-tree/b-tree.ts.html +88 -0
  24. package/coverage/lcov-report/src/data-structures/binary-tree/binary-indexed-tree.ts.html +313 -0
  25. package/coverage/lcov-report/src/data-structures/binary-tree/binary-tree.ts.html +226 -0
  26. package/coverage/lcov-report/src/data-structures/binary-tree/bst.ts.html +1696 -0
  27. package/coverage/lcov-report/src/data-structures/binary-tree/index.html +296 -0
  28. package/coverage/lcov-report/src/data-structures/binary-tree/index.ts.html +121 -0
  29. package/coverage/lcov-report/src/data-structures/binary-tree/rb-tree.ts.html +388 -0
  30. package/coverage/lcov-report/src/data-structures/binary-tree/segment-tree.ts.html +811 -0
  31. package/coverage/lcov-report/src/data-structures/binary-tree/splay-tree.ts.html +88 -0
  32. package/coverage/lcov-report/src/data-structures/binary-tree/tree-multiset.ts.html +2185 -0
  33. package/coverage/lcov-report/src/data-structures/binary-tree/two-three-tree.ts.html +88 -0
  34. package/coverage/lcov-report/src/data-structures/graph/abstract-graph.ts.html +3205 -0
  35. package/coverage/lcov-report/src/data-structures/graph/directed-graph.ts.html +1495 -0
  36. package/coverage/lcov-report/src/data-structures/graph/index.html +176 -0
  37. package/coverage/lcov-report/src/data-structures/graph/index.ts.html +97 -0
  38. package/coverage/lcov-report/src/data-structures/graph/map-graph.ts.html +472 -0
  39. package/coverage/lcov-report/src/data-structures/graph/undirected-graph.ts.html +907 -0
  40. package/coverage/lcov-report/src/data-structures/hash/coordinate-map.ts.html +286 -0
  41. package/coverage/lcov-report/src/data-structures/hash/coordinate-set.ts.html +253 -0
  42. package/coverage/lcov-report/src/data-structures/hash/hash-table.ts.html +88 -0
  43. package/coverage/lcov-report/src/data-structures/hash/index.html +206 -0
  44. package/coverage/lcov-report/src/data-structures/hash/index.ts.html +103 -0
  45. package/coverage/lcov-report/src/data-structures/hash/pair.ts.html +88 -0
  46. package/coverage/lcov-report/src/data-structures/hash/tree-map.ts.html +88 -0
  47. package/coverage/lcov-report/src/data-structures/hash/tree-set.ts.html +88 -0
  48. package/coverage/lcov-report/src/data-structures/heap/heap.ts.html +721 -0
  49. package/coverage/lcov-report/src/data-structures/heap/index.html +161 -0
  50. package/coverage/lcov-report/src/data-structures/heap/index.ts.html +94 -0
  51. package/coverage/lcov-report/src/data-structures/heap/max-heap.ts.html +178 -0
  52. package/coverage/lcov-report/src/data-structures/heap/min-heap.ts.html +181 -0
  53. package/coverage/lcov-report/src/data-structures/index.html +116 -0
  54. package/coverage/lcov-report/src/data-structures/index.ts.html +118 -0
  55. package/coverage/lcov-report/src/data-structures/linked-list/doubly-linked-list.ts.html +1804 -0
  56. package/coverage/lcov-report/src/data-structures/linked-list/index.html +161 -0
  57. package/coverage/lcov-report/src/data-structures/linked-list/index.ts.html +94 -0
  58. package/coverage/lcov-report/src/data-structures/linked-list/singly-linked-list.ts.html +1588 -0
  59. package/coverage/lcov-report/src/data-structures/linked-list/skip-linked-list.ts.html +88 -0
  60. package/coverage/lcov-report/src/data-structures/matrix/index.html +176 -0
  61. package/coverage/lcov-report/src/data-structures/matrix/index.ts.html +97 -0
  62. package/coverage/lcov-report/src/data-structures/matrix/matrix.ts.html +166 -0
  63. package/coverage/lcov-report/src/data-structures/matrix/matrix2d.ts.html +721 -0
  64. package/coverage/lcov-report/src/data-structures/matrix/navigator.ts.html +448 -0
  65. package/coverage/lcov-report/src/data-structures/matrix/vector2d.ts.html +1033 -0
  66. package/coverage/lcov-report/src/data-structures/priority-queue/index.html +161 -0
  67. package/coverage/lcov-report/src/data-structures/priority-queue/index.ts.html +94 -0
  68. package/coverage/lcov-report/src/data-structures/priority-queue/max-priority-queue.ts.html +253 -0
  69. package/coverage/lcov-report/src/data-structures/priority-queue/min-priority-queue.ts.html +256 -0
  70. package/coverage/lcov-report/src/data-structures/priority-queue/priority-queue.ts.html +1162 -0
  71. package/coverage/lcov-report/src/data-structures/queue/deque.ts.html +976 -0
  72. package/coverage/lcov-report/src/data-structures/queue/index.html +146 -0
  73. package/coverage/lcov-report/src/data-structures/queue/index.ts.html +91 -0
  74. package/coverage/lcov-report/src/data-structures/queue/queue.ts.html +658 -0
  75. package/coverage/lcov-report/src/data-structures/stack/index.html +131 -0
  76. package/coverage/lcov-report/src/data-structures/stack/index.ts.html +88 -0
  77. package/coverage/lcov-report/src/data-structures/stack/stack.ts.html +379 -0
  78. package/coverage/lcov-report/src/data-structures/tree/index.html +131 -0
  79. package/coverage/lcov-report/src/data-structures/tree/index.ts.html +88 -0
  80. package/coverage/lcov-report/src/data-structures/tree/tree.ts.html +292 -0
  81. package/coverage/lcov-report/src/data-structures/trie/index.html +131 -0
  82. package/coverage/lcov-report/src/data-structures/trie/index.ts.html +88 -0
  83. package/coverage/lcov-report/src/data-structures/trie/trie.ts.html +760 -0
  84. package/coverage/lcov-report/src/index.html +116 -0
  85. package/coverage/lcov-report/src/index.ts.html +97 -0
  86. package/coverage/lcov-report/src/interfaces/index.html +116 -0
  87. package/coverage/lcov-report/src/interfaces/index.ts.html +130 -0
  88. package/coverage/lcov-report/src/types/data-structures/abstract-binary-tree.ts.html +235 -0
  89. package/coverage/lcov-report/src/types/data-structures/bst.ts.html +124 -0
  90. package/coverage/lcov-report/src/types/data-structures/directed-graph.ts.html +109 -0
  91. package/coverage/lcov-report/src/types/data-structures/index.html +176 -0
  92. package/coverage/lcov-report/src/types/data-structures/index.ts.html +130 -0
  93. package/coverage/lcov-report/src/types/data-structures/rb-tree.ts.html +106 -0
  94. package/coverage/lcov-report/src/types/index.html +116 -0
  95. package/coverage/lcov-report/src/types/index.ts.html +94 -0
  96. package/coverage/lcov-report/src/types/utils/index.html +116 -0
  97. package/coverage/lcov-report/src/types/utils/index.ts.html +91 -0
  98. package/coverage/lcov-report/src/utils/index.html +131 -0
  99. package/coverage/lcov-report/src/utils/index.ts.html +88 -0
  100. package/coverage/lcov-report/src/utils/utils.ts.html +322 -0
  101. package/coverage/lcov-report/test/utils/index.html +146 -0
  102. package/coverage/lcov-report/test/utils/index.ts.html +91 -0
  103. package/coverage/lcov-report/test/utils/magnitude.ts.html +148 -0
  104. package/coverage/lcov-report/test/utils/number.ts.html +94 -0
  105. package/coverage/lcov.info +6676 -0
  106. package/dist/data-structures/binary-tree/abstract-binary-tree.js.map +1 -1
  107. package/dist/data-structures/binary-tree/avl-tree.js.map +1 -1
  108. package/dist/data-structures/binary-tree/binary-tree.js.map +1 -1
  109. package/dist/data-structures/binary-tree/bst.js.map +1 -1
  110. package/dist/data-structures/binary-tree/rb-tree.js.map +1 -1
  111. package/dist/data-structures/binary-tree/tree-multiset.js.map +1 -1
  112. package/dist/data-structures/graph/abstract-graph.js.map +1 -1
  113. package/dist/data-structures/graph/directed-graph.js.map +1 -1
  114. package/dist/data-structures/graph/map-graph.js.map +1 -1
  115. package/dist/data-structures/graph/undirected-graph.js.map +1 -1
  116. package/dist/data-structures/heap/heap.js.map +1 -1
  117. package/dist/data-structures/heap/max-heap.js.map +1 -1
  118. package/dist/data-structures/heap/min-heap.js.map +1 -1
  119. package/dist/data-structures/matrix/matrix.js.map +1 -1
  120. package/dist/data-structures/matrix/navigator.js.map +1 -1
  121. package/dist/data-structures/priority-queue/max-priority-queue.js.map +1 -1
  122. package/dist/data-structures/priority-queue/min-priority-queue.js.map +1 -1
  123. package/dist/data-structures/priority-queue/priority-queue.js.map +1 -1
  124. package/dist/data-structures/queue/deque.js.map +1 -1
  125. package/dist/data-structures/queue/queue.js.map +1 -1
  126. package/dist/data-structures/tree/tree.js.map +1 -1
  127. package/dist/utils/utils.js.map +1 -1
  128. package/docs/classes/AVLTree.html +205 -282
  129. package/docs/classes/AVLTreeNode.html +15 -15
  130. package/docs/classes/AaTree.html +1 -1
  131. package/docs/classes/AbstractBinaryTree.html +198 -275
  132. package/docs/classes/AbstractBinaryTreeNode.html +21 -21
  133. package/docs/classes/AbstractEdge.html +11 -11
  134. package/docs/classes/AbstractGraph.html +36 -36
  135. package/docs/classes/AbstractVertex.html +8 -8
  136. package/docs/classes/ArrayDeque.html +14 -14
  137. package/docs/classes/BST.html +198 -275
  138. package/docs/classes/BSTNode.html +15 -15
  139. package/docs/classes/BTree.html +1 -1
  140. package/docs/classes/BinaryIndexedTree.html +9 -9
  141. package/docs/classes/BinaryTree.html +191 -268
  142. package/docs/classes/BinaryTreeNode.html +15 -15
  143. package/docs/classes/Character.html +4 -4
  144. package/docs/classes/CoordinateMap.html +9 -9
  145. package/docs/classes/CoordinateSet.html +8 -8
  146. package/docs/classes/Deque.html +34 -34
  147. package/docs/classes/DirectedEdge.html +15 -15
  148. package/docs/classes/DirectedGraph.html +52 -52
  149. package/docs/classes/DirectedVertex.html +6 -6
  150. package/docs/classes/DoublyLinkedList.html +37 -37
  151. package/docs/classes/DoublyLinkedListNode.html +11 -11
  152. package/docs/classes/HashTable.html +1 -1
  153. package/docs/classes/Heap.html +26 -26
  154. package/docs/classes/HeapItem.html +8 -8
  155. package/docs/classes/LinkedListQueue.html +35 -35
  156. package/docs/classes/MapEdge.html +13 -13
  157. package/docs/classes/MapGraph.html +56 -56
  158. package/docs/classes/MapVertex.html +12 -12
  159. package/docs/classes/Matrix2D.html +16 -16
  160. package/docs/classes/MatrixNTI2D.html +4 -4
  161. package/docs/classes/MaxHeap.html +26 -26
  162. package/docs/classes/MaxPriorityQueue.html +34 -34
  163. package/docs/classes/MinHeap.html +26 -26
  164. package/docs/classes/MinPriorityQueue.html +34 -34
  165. package/docs/classes/Navigator.html +10 -10
  166. package/docs/classes/ObjectDeque.html +25 -25
  167. package/docs/classes/Pair.html +1 -1
  168. package/docs/classes/PriorityQueue.html +32 -32
  169. package/docs/classes/Queue.html +22 -22
  170. package/docs/classes/RBTree.html +198 -275
  171. package/docs/classes/RBTreeNode.html +18 -18
  172. package/docs/classes/SegmentTree.html +17 -17
  173. package/docs/classes/SegmentTreeNode.html +20 -20
  174. package/docs/classes/SinglyLinkedList.html +35 -35
  175. package/docs/classes/SinglyLinkedListNode.html +8 -8
  176. package/docs/classes/SkipLinkedList.html +1 -1
  177. package/docs/classes/SplayTree.html +1 -1
  178. package/docs/classes/Stack.html +12 -12
  179. package/docs/classes/TreeMap.html +1 -1
  180. package/docs/classes/TreeMultiset.html +219 -296
  181. package/docs/classes/TreeMultisetNode.html +18 -18
  182. package/docs/classes/TreeNode.html +13 -13
  183. package/docs/classes/TreeSet.html +1 -1
  184. package/docs/classes/Trie.html +13 -13
  185. package/docs/classes/TrieNode.html +11 -11
  186. package/docs/classes/TwoThreeTree.html +1 -1
  187. package/docs/classes/UndirectedEdge.html +12 -12
  188. package/docs/classes/UndirectedGraph.html +40 -40
  189. package/docs/classes/UndirectedVertex.html +6 -6
  190. package/docs/classes/Vector2D.html +28 -28
  191. package/docs/enums/CP.html +4 -4
  192. package/docs/enums/FamilyPosition.html +8 -8
  193. package/docs/enums/LoopType.html +3 -3
  194. package/docs/enums/RBColor.html +3 -3
  195. package/docs/enums/TopologicalProperty.html +4 -4
  196. package/docs/functions/arrayRemove.html +1 -1
  197. package/docs/functions/isThunk.html +1 -1
  198. package/docs/functions/toThunk.html +1 -1
  199. package/docs/functions/trampoline.html +1 -1
  200. package/docs/functions/trampolineAsync.html +1 -1
  201. package/docs/functions/uuidV4.html +1 -1
  202. package/docs/index.html +11 -12
  203. package/docs/interfaces/IAVLTree.html +77 -77
  204. package/docs/interfaces/IAbstractBinaryTree.html +72 -72
  205. package/docs/interfaces/IAbstractBinaryTreeNode.html +14 -14
  206. package/docs/interfaces/IAbstractGraph.html +15 -15
  207. package/docs/interfaces/IBST.html +77 -77
  208. package/docs/interfaces/IDirectedGraph.html +23 -23
  209. package/docs/interfaces/IRBTree.html +77 -77
  210. package/docs/interfaces/IUNDirectedGraph.html +16 -16
  211. package/docs/types/AVLTreeNodeNested.html +1 -1
  212. package/docs/types/AVLTreeOptions.html +1 -1
  213. package/docs/types/AbstractBinaryTreeNodeNested.html +1 -1
  214. package/docs/types/AbstractBinaryTreeNodeProperties.html +1 -1
  215. package/docs/types/AbstractBinaryTreeNodeProperty.html +1 -1
  216. package/docs/types/AbstractBinaryTreeOptions.html +1 -1
  217. package/docs/types/BSTComparator.html +1 -1
  218. package/docs/types/BSTNodeNested.html +1 -1
  219. package/docs/types/BSTOptions.html +1 -1
  220. package/docs/types/BinaryTreeDeletedResult.html +1 -1
  221. package/docs/types/BinaryTreeNodeId.html +1 -1
  222. package/docs/types/BinaryTreeNodeNested.html +1 -1
  223. package/docs/types/BinaryTreeNodePropertyName.html +1 -1
  224. package/docs/types/BinaryTreeOptions.html +1 -1
  225. package/docs/types/DFSOrderPattern.html +1 -1
  226. package/docs/types/DijkstraResult.html +1 -1
  227. package/docs/types/Direction.html +1 -1
  228. package/docs/types/DummyAny.html +1 -1
  229. package/docs/types/EdgeId.html +1 -1
  230. package/docs/types/HeapOptions.html +1 -1
  231. package/docs/types/IAVLTreeNode.html +1 -1
  232. package/docs/types/IBSTNode.html +1 -1
  233. package/docs/types/IBinaryTree.html +1 -1
  234. package/docs/types/IBinaryTreeNode.html +1 -1
  235. package/docs/types/IRBTreeNode.html +1 -1
  236. package/docs/types/ITreeMultiset.html +1 -1
  237. package/docs/types/ITreeMultisetNode.html +1 -1
  238. package/docs/types/KeyValueObject.html +1 -1
  239. package/docs/types/KeyValueObjectWithId.html +1 -1
  240. package/docs/types/MapGraphCoordinate.html +1 -1
  241. package/docs/types/NavigatorParams.html +1 -1
  242. package/docs/types/NodeOrPropertyName.html +1 -1
  243. package/docs/types/NonNumberNonObjectButDefined.html +1 -1
  244. package/docs/types/ObjectWithNonNumberId.html +1 -1
  245. package/docs/types/ObjectWithNumberId.html +1 -1
  246. package/docs/types/ObjectWithoutId.html +1 -1
  247. package/docs/types/PriorityQueueComparator.html +1 -1
  248. package/docs/types/PriorityQueueDFSOrderPattern.html +1 -1
  249. package/docs/types/PriorityQueueOptions.html +1 -1
  250. package/docs/types/RBTreeNodeNested.html +1 -1
  251. package/docs/types/RBTreeOptions.html +1 -1
  252. package/docs/types/RestrictValById.html +1 -1
  253. package/docs/types/SegmentTreeNodeVal.html +1 -1
  254. package/docs/types/SpecifyOptional.html +1 -1
  255. package/docs/types/Thunk.html +1 -1
  256. package/docs/types/ToThunkFn.html +1 -1
  257. package/docs/types/TopologicalStatus.html +1 -1
  258. package/docs/types/TreeMultisetNodeNested.html +1 -1
  259. package/docs/types/TreeMultisetOptions.html +1 -1
  260. package/docs/types/TrlAsyncFn.html +1 -1
  261. package/docs/types/TrlFn.html +1 -1
  262. package/docs/types/Turning.html +1 -1
  263. package/docs/types/VertexId.html +1 -1
  264. package/docs/variables/THUNK_SYMBOL.html +1 -1
  265. package/jest.config.js +6 -3
  266. package/lib/data-structures/binary-tree/abstract-binary-tree.d.ts +169 -2
  267. package/lib/data-structures/binary-tree/abstract-binary-tree.js +31 -47
  268. package/package.json +40 -25
  269. package/src/data-structures/binary-tree/aa-tree.ts +1 -0
  270. package/src/data-structures/binary-tree/abstract-binary-tree.ts +1631 -0
  271. package/src/data-structures/binary-tree/avl-tree.ts +310 -0
  272. package/src/data-structures/binary-tree/b-tree.ts +1 -0
  273. package/src/data-structures/binary-tree/binary-indexed-tree.ts +76 -0
  274. package/src/data-structures/binary-tree/binary-tree.ts +47 -0
  275. package/src/data-structures/binary-tree/bst.ts +537 -0
  276. package/src/data-structures/binary-tree/index.ts +12 -0
  277. package/src/data-structures/binary-tree/rb-tree.ts +101 -0
  278. package/src/data-structures/binary-tree/segment-tree.ts +242 -0
  279. package/src/data-structures/binary-tree/splay-tree.ts +1 -0
  280. package/src/data-structures/binary-tree/tree-multiset.ts +700 -0
  281. package/src/data-structures/binary-tree/two-three-tree.ts +1 -0
  282. package/src/data-structures/diagrams/README.md +5 -0
  283. package/src/data-structures/graph/abstract-graph.ts +1040 -0
  284. package/src/data-structures/graph/directed-graph.ts +470 -0
  285. package/src/data-structures/graph/index.ts +4 -0
  286. package/src/data-structures/graph/map-graph.ts +129 -0
  287. package/src/data-structures/graph/undirected-graph.ts +274 -0
  288. package/src/data-structures/hash/coordinate-map.ts +67 -0
  289. package/src/data-structures/hash/coordinate-set.ts +56 -0
  290. package/src/data-structures/hash/hash-table.ts +1 -0
  291. package/src/data-structures/hash/index.ts +6 -0
  292. package/src/data-structures/hash/pair.ts +1 -0
  293. package/src/data-structures/hash/tree-map.ts +1 -0
  294. package/src/data-structures/hash/tree-set.ts +1 -0
  295. package/src/data-structures/heap/heap.ts +212 -0
  296. package/src/data-structures/heap/index.ts +3 -0
  297. package/src/data-structures/heap/max-heap.ts +31 -0
  298. package/src/data-structures/heap/min-heap.ts +32 -0
  299. package/src/data-structures/index.ts +11 -0
  300. package/src/data-structures/linked-list/doubly-linked-list.ts +573 -0
  301. package/src/data-structures/linked-list/index.ts +3 -0
  302. package/src/data-structures/linked-list/singly-linked-list.ts +501 -0
  303. package/src/data-structures/linked-list/skip-linked-list.ts +1 -0
  304. package/src/data-structures/matrix/index.ts +4 -0
  305. package/src/data-structures/matrix/matrix.ts +27 -0
  306. package/src/data-structures/matrix/matrix2d.ts +212 -0
  307. package/src/data-structures/matrix/navigator.ts +121 -0
  308. package/src/data-structures/matrix/vector2d.ts +316 -0
  309. package/src/data-structures/priority-queue/index.ts +3 -0
  310. package/src/data-structures/priority-queue/max-priority-queue.ts +56 -0
  311. package/src/data-structures/priority-queue/min-priority-queue.ts +57 -0
  312. package/src/data-structures/priority-queue/priority-queue.ts +359 -0
  313. package/src/data-structures/queue/deque.ts +297 -0
  314. package/src/data-structures/queue/index.ts +2 -0
  315. package/src/data-structures/queue/queue.ts +191 -0
  316. package/src/data-structures/stack/index.ts +1 -0
  317. package/src/data-structures/stack/stack.ts +98 -0
  318. package/src/data-structures/tree/index.ts +1 -0
  319. package/src/data-structures/tree/tree.ts +69 -0
  320. package/src/data-structures/trie/index.ts +1 -0
  321. package/src/data-structures/trie/trie.ts +225 -0
  322. package/src/index.ts +4 -0
  323. package/src/interfaces/abstract-binary-tree.ts +191 -0
  324. package/src/interfaces/abstract-graph.ts +31 -0
  325. package/src/interfaces/avl-tree.ts +25 -0
  326. package/src/interfaces/binary-tree.ts +6 -0
  327. package/src/interfaces/bst.ts +31 -0
  328. package/src/interfaces/directed-graph.ts +20 -0
  329. package/src/interfaces/doubly-linked-list.ts +1 -0
  330. package/src/interfaces/heap.ts +1 -0
  331. package/src/interfaces/index.ts +15 -0
  332. package/src/interfaces/navigator.ts +1 -0
  333. package/src/interfaces/priority-queue.ts +1 -0
  334. package/src/interfaces/rb-tree.ts +9 -0
  335. package/src/interfaces/segment-tree.ts +1 -0
  336. package/src/interfaces/singly-linked-list.ts +1 -0
  337. package/src/interfaces/tree-multiset.ts +7 -0
  338. package/src/interfaces/undirected-graph.ts +6 -0
  339. package/src/types/data-structures/abstract-binary-tree.ts +50 -0
  340. package/src/types/data-structures/abstract-graph.ts +11 -0
  341. package/src/types/data-structures/avl-tree.ts +5 -0
  342. package/src/types/data-structures/binary-tree.ts +5 -0
  343. package/src/types/data-structures/bst.ts +13 -0
  344. package/src/types/data-structures/directed-graph.ts +8 -0
  345. package/src/types/data-structures/doubly-linked-list.ts +1 -0
  346. package/src/types/data-structures/heap.ts +5 -0
  347. package/src/types/data-structures/index.ts +15 -0
  348. package/src/types/data-structures/map-graph.ts +1 -0
  349. package/src/types/data-structures/navigator.ts +13 -0
  350. package/src/types/data-structures/priority-queue.ts +9 -0
  351. package/src/types/data-structures/rb-tree.ts +8 -0
  352. package/src/types/data-structures/segment-tree.ts +1 -0
  353. package/src/types/data-structures/singly-linked-list.ts +1 -0
  354. package/src/types/data-structures/tree-multiset.ts +6 -0
  355. package/src/types/helpers.ts +1 -0
  356. package/src/types/index.ts +3 -0
  357. package/src/types/utils/index.ts +2 -0
  358. package/src/types/utils/utils.ts +6 -0
  359. package/src/types/utils/validate-type.ts +35 -0
  360. package/src/utils/index.ts +1 -0
  361. package/src/utils/utils.ts +79 -0
  362. package/test/unit/data-structures/linked-list/singly-linked-list.test.ts +1 -1
  363. package/test/unit/data-structures/priority-queue/max-priority-queue.test.ts +3 -1
  364. package/tsconfig.json +1 -1
  365. package/umd/bundle.min.js.map +1 -1
@@ -31,7 +31,7 @@
31
31
  <ul class="tsd-hierarchy">
32
32
  <li><a href="../interfaces/IRBTree.html" class="tsd-signature-type tsd-kind-interface">IRBTree</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
33
  <ul>
34
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/rb-tree.ts#L58">src/data-structures/binary-tree/rb-tree.ts:58</a></li></ul></aside>
34
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/rb-tree.ts#L58">src/data-structures/binary-tree/rb-tree.ts:58</a></li></ul></aside>
35
35
  <section class="tsd-panel-group tsd-index-group">
36
36
  <section class="tsd-panel tsd-index-panel">
37
37
  <details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
@@ -126,7 +126,7 @@
126
126
  <h4 class="tsd-returns-title">Returns <a href="RBTree.html" class="tsd-signature-type tsd-kind-class">RBTree</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">
127
127
  <p>Overrides <a href="BST.html">BST</a>.<a href="BST.html#constructor">constructor</a></p>
128
128
  <ul>
129
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/rb-tree.ts#L59">src/data-structures/binary-tree/rb-tree.ts:59</a></li></ul></aside></li></ul></section></section>
129
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/rb-tree.ts#L59">src/data-structures/binary-tree/rb-tree.ts:59</a></li></ul></aside></li></ul></section></section>
130
130
  <section class="tsd-panel-group tsd-member-group">
131
131
  <h2>Properties</h2>
132
132
  <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_comparator" class="tsd-anchor"></a>
@@ -134,7 +134,7 @@
134
134
  <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">
135
135
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_comparator">_comparator</a></p>
136
136
  <ul>
137
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/bst.ts#L525">src/data-structures/binary-tree/bst.ts:525</a></li></ul></aside></section></section>
137
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/bst.ts#L519">src/data-structures/binary-tree/bst.ts:519</a></li></ul></aside></section></section>
138
138
  <section class="tsd-panel-group tsd-member-group">
139
139
  <h2>Accessors</h2>
140
140
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="loopType" class="tsd-anchor"></a>
@@ -146,7 +146,7 @@
146
146
  <p>Implementation of IRBTree.loopType</p>
147
147
  <p>Inherited from BST.loopType</p>
148
148
  <ul>
149
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L168">src/data-structures/binary-tree/abstract-binary-tree.ts:168</a></li></ul></aside></li></ul></section>
149
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L168">src/data-structures/binary-tree/abstract-binary-tree.ts:168</a></li></ul></aside></li></ul></section>
150
150
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="root" class="tsd-anchor"></a>
151
151
  <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>
152
152
  <ul class="tsd-signatures tsd-is-inherited">
@@ -156,7 +156,7 @@
156
156
  <p>Implementation of IRBTree.root</p>
157
157
  <p>Inherited from BST.root</p>
158
158
  <ul>
159
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L156">src/data-structures/binary-tree/abstract-binary-tree.ts:156</a></li></ul></aside></li></ul></section>
159
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L156">src/data-structures/binary-tree/abstract-binary-tree.ts:156</a></li></ul></aside></li></ul></section>
160
160
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="size" class="tsd-anchor"></a>
161
161
  <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>
162
162
  <ul class="tsd-signatures tsd-is-inherited">
@@ -166,7 +166,7 @@
166
166
  <p>Implementation of IRBTree.size</p>
167
167
  <p>Inherited from BST.size</p>
168
168
  <ul>
169
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L162">src/data-structures/binary-tree/abstract-binary-tree.ts:162</a></li></ul></aside></li></ul></section>
169
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L162">src/data-structures/binary-tree/abstract-binary-tree.ts:162</a></li></ul></aside></li></ul></section>
170
170
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedId" class="tsd-anchor"></a>
171
171
  <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>
172
172
  <ul class="tsd-signatures tsd-is-inherited">
@@ -176,7 +176,7 @@
176
176
  <p>Implementation of IRBTree.visitedId</p>
177
177
  <p>Inherited from BST.visitedId</p>
178
178
  <ul>
179
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L174">src/data-structures/binary-tree/abstract-binary-tree.ts:174</a></li></ul></aside></li></ul></section>
179
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L174">src/data-structures/binary-tree/abstract-binary-tree.ts:174</a></li></ul></aside></li></ul></section>
180
180
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedLeftSum" class="tsd-anchor"></a>
181
181
  <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>
182
182
  <ul class="tsd-signatures tsd-is-inherited">
@@ -186,7 +186,7 @@
186
186
  <p>Implementation of IRBTree.visitedLeftSum</p>
187
187
  <p>Inherited from BST.visitedLeftSum</p>
188
188
  <ul>
189
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L192">src/data-structures/binary-tree/abstract-binary-tree.ts:192</a></li></ul></aside></li></ul></section>
189
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L192">src/data-structures/binary-tree/abstract-binary-tree.ts:192</a></li></ul></aside></li></ul></section>
190
190
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedNode" class="tsd-anchor"></a>
191
191
  <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>
192
192
  <ul class="tsd-signatures tsd-is-inherited">
@@ -196,7 +196,7 @@
196
196
  <p>Implementation of IRBTree.visitedNode</p>
197
197
  <p>Inherited from BST.visitedNode</p>
198
198
  <ul>
199
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L186">src/data-structures/binary-tree/abstract-binary-tree.ts:186</a></li></ul></aside></li></ul></section>
199
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L186">src/data-structures/binary-tree/abstract-binary-tree.ts:186</a></li></ul></aside></li></ul></section>
200
200
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedVal" class="tsd-anchor"></a>
201
201
  <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>
202
202
  <ul class="tsd-signatures tsd-is-inherited">
@@ -206,7 +206,7 @@
206
206
  <p>Implementation of IRBTree.visitedVal</p>
207
207
  <p>Inherited from BST.visitedVal</p>
208
208
  <ul>
209
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L180">src/data-structures/binary-tree/abstract-binary-tree.ts:180</a></li></ul></aside></li></ul></section></section>
209
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L180">src/data-structures/binary-tree/abstract-binary-tree.ts:180</a></li></ul></aside></li></ul></section></section>
210
210
  <section class="tsd-panel-group tsd-member-group">
211
211
  <h2>Methods</h2>
212
212
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="BFS" class="tsd-anchor"></a>
@@ -214,290 +214,244 @@
214
214
  <ul class="tsd-signatures tsd-is-inherited">
215
215
  <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>
216
216
  <li class="tsd-description">
217
- <div class="tsd-comment tsd-typography"><p>The BFS function performs a breadth-first search on a binary tree, accumulating properties of each node based on a
218
- specified property name.</p>
217
+ <div class="tsd-comment tsd-typography"><p>Performs a breadth-first search (BFS) on a binary tree, accumulating properties of each node based on their &#39;id&#39; property.</p>
219
218
  </div>
220
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an instance of the <code>AbstractBinaryTreeNodeProperties</code> class with generic type <code>N</code>.</p>
219
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>An array of binary tree node IDs.</p>
221
220
 
222
221
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
223
222
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#BFS">BFS</a></p>
224
223
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#BFS">BFS</a></p>
225
224
  <ul>
226
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L888">src/data-structures/binary-tree/abstract-binary-tree.ts:888</a></li></ul></aside></li>
225
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L929">src/data-structures/binary-tree/abstract-binary-tree.ts:929</a></li></ul></aside></li>
227
226
  <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>
228
227
  <li class="tsd-description">
229
- <div class="tsd-comment tsd-typography"><p>The BFS function performs a breadth-first search on a binary tree, accumulating properties of each node based on a
230
- specified property name.</p>
228
+ <div class="tsd-comment tsd-typography"><p>Performs a breadth-first search (BFS) on a binary tree, accumulating properties of each node based on the specified property name.</p>
231
229
  </div>
232
230
  <div class="tsd-parameters">
233
231
  <h4 class="tsd-parameters-title">Parameters</h4>
234
232
  <ul class="tsd-parameter-list">
235
233
  <li>
236
234
  <h5><span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;id&quot;</span></h5>
237
- <div class="tsd-comment tsd-typography"><p>The parameter <code>nodeOrPropertyName</code> is an optional parameter that
238
- represents either a node or a property name. If a node is provided, the breadth-first search (BFS) algorithm will be
239
- performed starting from that node. If a property name is provided, the BFS algorithm will be performed starting from
240
- the</p>
235
+ <div class="tsd-comment tsd-typography"><p>The name of the property to accumulate.</p>
241
236
  </div>
242
237
  <div class="tsd-comment tsd-typography"></div></li></ul></div>
243
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an instance of the <code>AbstractBinaryTreeNodeProperties</code> class with generic type <code>N</code>.</p>
238
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>An array of values corresponding to the specified property.</p>
244
239
 
245
240
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
246
241
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#BFS">BFS</a></p>
247
242
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#BFS">BFS</a></p>
248
243
  <ul>
249
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L890">src/data-structures/binary-tree/abstract-binary-tree.ts:890</a></li></ul></aside></li>
244
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L936">src/data-structures/binary-tree/abstract-binary-tree.ts:936</a></li></ul></aside></li>
250
245
  <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>
251
246
  <li class="tsd-description">
252
- <div class="tsd-comment tsd-typography"><p>The BFS function performs a breadth-first search on a binary tree, accumulating properties of each node based on a
253
- specified property name.</p>
247
+ <div class="tsd-comment tsd-typography"><p>Performs a breadth-first search (BFS) on a binary tree, accumulating the &#39;val&#39; property of each node.</p>
254
248
  </div>
255
249
  <div class="tsd-parameters">
256
250
  <h4 class="tsd-parameters-title">Parameters</h4>
257
251
  <ul class="tsd-parameter-list">
258
252
  <li>
259
253
  <h5><span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;val&quot;</span></h5>
260
- <div class="tsd-comment tsd-typography"><p>The parameter <code>nodeOrPropertyName</code> is an optional parameter that
261
- represents either a node or a property name. If a node is provided, the breadth-first search (BFS) algorithm will be
262
- performed starting from that node. If a property name is provided, the BFS algorithm will be performed starting from
263
- the</p>
254
+ <div class="tsd-comment tsd-typography"><p>The name of the property to accumulate.</p>
264
255
  </div>
265
256
  <div class="tsd-comment tsd-typography"></div></li></ul></div>
266
- <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 instance of the <code>AbstractBinaryTreeNodeProperties</code> class with generic type <code>N</code>.</p>
257
+ <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 array of &#39;val&#39; properties from each node.</p>
267
258
 
268
259
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
269
260
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#BFS">BFS</a></p>
270
261
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#BFS">BFS</a></p>
271
262
  <ul>
272
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L892">src/data-structures/binary-tree/abstract-binary-tree.ts:892</a></li></ul></aside></li>
263
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L943">src/data-structures/binary-tree/abstract-binary-tree.ts:943</a></li></ul></aside></li>
273
264
  <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>
274
265
  <li class="tsd-description">
275
- <div class="tsd-comment tsd-typography"><p>The BFS function performs a breadth-first search on a binary tree, accumulating properties of each node based on a
276
- specified property name.</p>
266
+ <div class="tsd-comment tsd-typography"><p>Performs a breadth-first search (BFS) on a binary tree, accumulating nodes themselves.</p>
277
267
  </div>
278
268
  <div class="tsd-parameters">
279
269
  <h4 class="tsd-parameters-title">Parameters</h4>
280
270
  <ul class="tsd-parameter-list">
281
271
  <li>
282
272
  <h5><span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;node&quot;</span></h5>
283
- <div class="tsd-comment tsd-typography"><p>The parameter <code>nodeOrPropertyName</code> is an optional parameter that
284
- represents either a node or a property name. If a node is provided, the breadth-first search (BFS) algorithm will be
285
- performed starting from that node. If a property name is provided, the BFS algorithm will be performed starting from
286
- the</p>
273
+ <div class="tsd-comment tsd-typography"><p>The name of the property to accumulate.</p>
287
274
  </div>
288
275
  <div class="tsd-comment tsd-typography"></div></li></ul></div>
289
- <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 instance of the <code>AbstractBinaryTreeNodeProperties</code> class with generic type <code>N</code>.</p>
276
+ <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 binary tree nodes.</p>
290
277
 
291
278
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
292
279
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#BFS">BFS</a></p>
293
280
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#BFS">BFS</a></p>
294
281
  <ul>
295
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L894">src/data-structures/binary-tree/abstract-binary-tree.ts:894</a></li></ul></aside></li></ul></section>
282
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L950">src/data-structures/binary-tree/abstract-binary-tree.ts:950</a></li></ul></aside></li></ul></section>
296
283
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="DFS" class="tsd-anchor"></a>
297
284
  <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>
298
285
  <ul class="tsd-signatures tsd-is-inherited">
299
286
  <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>
300
287
  <li class="tsd-description">
301
- <div class="tsd-comment tsd-typography"><p>The DFS function performs a depth-first search traversal on a binary tree and returns the accumulated properties of
302
- each node based on the specified pattern and property name.</p>
288
+ <div class="tsd-comment tsd-typography"><p>Performs a depth-first search (DFS) traversal on a binary tree and accumulates properties of each node based on their &#39;id&#39; property.</p>
303
289
  </div>
304
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an instance of the AbstractBinaryTreeNodeProperties class, which contains the accumulated properties of the
305
- binary tree nodes based on the specified pattern and node or property name.</p>
290
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>An array of binary tree node IDs.</p>
306
291
 
307
292
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
308
293
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#DFS">DFS</a></p>
309
294
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFS">DFS</a></p>
310
295
  <ul>
311
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/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>
296
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L980">src/data-structures/binary-tree/abstract-binary-tree.ts:980</a></li></ul></aside></li>
312
297
  <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>
313
298
  <li class="tsd-description">
314
- <div class="tsd-comment tsd-typography"><p>The DFS function performs a depth-first search traversal on a binary tree and returns the accumulated properties of
315
- each node based on the specified pattern and property name.</p>
299
+ <div class="tsd-comment tsd-typography"><p>Performs a depth-first search (DFS) traversal on a binary tree and accumulates properties of each node based on the specified property name.</p>
316
300
  </div>
317
301
  <div class="tsd-parameters">
318
302
  <h4 class="tsd-parameters-title">Parameters</h4>
319
303
  <ul class="tsd-parameter-list">
320
304
  <li>
321
305
  <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>
322
- <div class="tsd-comment tsd-typography"><p>The &quot;pattern&quot; parameter is used to specify the traversal order of the
323
- binary tree. It can have three possible values:</p>
306
+ <div class="tsd-comment tsd-typography"><p>The traversal pattern: &#39;in&#39; (in-order), &#39;pre&#39; (pre-order), or &#39;post&#39; (post-order).</p>
324
307
  </div>
325
308
  <div class="tsd-comment tsd-typography"></div></li>
326
309
  <li>
327
310
  <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>
328
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is a string that represents
329
- the name of a property of the nodes in the binary tree. This property will be used to accumulate values during the
330
- depth-first search traversal. If no <code>nodeOrPropertyName</code> is provided, the default value is <code>&#39;id&#39;</code>.</p>
311
+ <div class="tsd-comment tsd-typography"><p>The name of the property to accumulate.</p>
331
312
  </div>
332
313
  <div class="tsd-comment tsd-typography"></div></li></ul></div>
333
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an instance of the AbstractBinaryTreeNodeProperties class, which contains the accumulated properties of the
334
- binary tree nodes based on the specified pattern and node or property name.</p>
314
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>An array of values corresponding to the specified property.</p>
335
315
 
336
316
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
337
317
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#DFS">DFS</a></p>
338
318
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFS">DFS</a></p>
339
319
  <ul>
340
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L924">src/data-structures/binary-tree/abstract-binary-tree.ts:924</a></li></ul></aside></li>
320
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L988">src/data-structures/binary-tree/abstract-binary-tree.ts:988</a></li></ul></aside></li>
341
321
  <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>
342
322
  <li class="tsd-description">
343
- <div class="tsd-comment tsd-typography"><p>The DFS function performs a depth-first search traversal on a binary tree and returns the accumulated properties of
344
- each node based on the specified pattern and property name.</p>
323
+ <div class="tsd-comment tsd-typography"><p>Performs a depth-first search (DFS) traversal on a binary tree and accumulates the &#39;val&#39; property of each node.</p>
345
324
  </div>
346
325
  <div class="tsd-parameters">
347
326
  <h4 class="tsd-parameters-title">Parameters</h4>
348
327
  <ul class="tsd-parameter-list">
349
328
  <li>
350
329
  <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>
351
- <div class="tsd-comment tsd-typography"><p>The &quot;pattern&quot; parameter is used to specify the traversal order of the
352
- binary tree. It can have three possible values:</p>
330
+ <div class="tsd-comment tsd-typography"><p>The traversal pattern: &#39;in&#39; (in-order), &#39;pre&#39; (pre-order), or &#39;post&#39; (post-order).</p>
353
331
  </div>
354
332
  <div class="tsd-comment tsd-typography"></div></li>
355
333
  <li>
356
334
  <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>
357
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is a string that represents
358
- the name of a property of the nodes in the binary tree. This property will be used to accumulate values during the
359
- depth-first search traversal. If no <code>nodeOrPropertyName</code> is provided, the default value is <code>&#39;id&#39;</code>.</p>
335
+ <div class="tsd-comment tsd-typography"><p>The name of the property to accumulate.</p>
360
336
  </div>
361
337
  <div class="tsd-comment tsd-typography"></div></li></ul></div>
362
- <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 instance of the AbstractBinaryTreeNodeProperties class, which contains the accumulated properties of the
363
- binary tree nodes based on the specified pattern and node or property name.</p>
338
+ <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 &#39;val&#39; properties from each node.</p>
364
339
 
365
340
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
366
341
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#DFS">DFS</a></p>
367
342
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFS">DFS</a></p>
368
343
  <ul>
369
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L926">src/data-structures/binary-tree/abstract-binary-tree.ts:926</a></li></ul></aside></li>
344
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L996">src/data-structures/binary-tree/abstract-binary-tree.ts:996</a></li></ul></aside></li>
370
345
  <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>
371
346
  <li class="tsd-description">
372
- <div class="tsd-comment tsd-typography"><p>The DFS function performs a depth-first search traversal on a binary tree and returns the accumulated properties of
373
- each node based on the specified pattern and property name.</p>
347
+ <div class="tsd-comment tsd-typography"><p>Performs a depth-first search (DFS) traversal on a binary tree and accumulates nodes themselves.</p>
374
348
  </div>
375
349
  <div class="tsd-parameters">
376
350
  <h4 class="tsd-parameters-title">Parameters</h4>
377
351
  <ul class="tsd-parameter-list">
378
352
  <li>
379
353
  <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>
380
- <div class="tsd-comment tsd-typography"><p>The &quot;pattern&quot; parameter is used to specify the traversal order of the
381
- binary tree. It can have three possible values:</p>
354
+ <div class="tsd-comment tsd-typography"><p>The traversal pattern: &#39;in&#39; (in-order), &#39;pre&#39; (pre-order), or &#39;post&#39; (post-order).</p>
382
355
  </div>
383
356
  <div class="tsd-comment tsd-typography"></div></li>
384
357
  <li>
385
358
  <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>
386
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is a string that represents
387
- the name of a property of the nodes in the binary tree. This property will be used to accumulate values during the
388
- depth-first search traversal. If no <code>nodeOrPropertyName</code> is provided, the default value is <code>&#39;id&#39;</code>.</p>
359
+ <div class="tsd-comment tsd-typography"><p>The name of the property to accumulate.</p>
389
360
  </div>
390
361
  <div class="tsd-comment tsd-typography"></div></li></ul></div>
391
- <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 instance of the AbstractBinaryTreeNodeProperties class, which contains the accumulated properties of the
392
- binary tree nodes based on the specified pattern and node or property name.</p>
362
+ <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 binary tree nodes.</p>
393
363
 
394
364
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
395
365
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#DFS">DFS</a></p>
396
366
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFS">DFS</a></p>
397
367
  <ul>
398
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L928">src/data-structures/binary-tree/abstract-binary-tree.ts:928</a></li></ul></aside></li></ul></section>
368
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L1004">src/data-structures/binary-tree/abstract-binary-tree.ts:1004</a></li></ul></aside></li></ul></section>
399
369
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="DFSIterative" class="tsd-anchor"></a>
400
370
  <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>
401
371
  <ul class="tsd-signatures tsd-is-inherited">
402
372
  <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>
403
373
  <li class="tsd-description">
404
- <div class="tsd-comment tsd-typography"><p>The DFSIterative function performs an iterative depth-first search traversal on a binary tree, with the option to
405
- specify the traversal pattern and the property name to accumulate results by.</p>
374
+ <div class="tsd-comment tsd-typography"><p>Performs an iterative depth-first search (DFS) traversal on a binary tree and accumulates properties of each node based on their &#39;id&#39; property.</p>
406
375
  </div>
407
- <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 AbstractBinaryTreeNodeProperties<N>.</p>
376
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>An array of binary tree node IDs.</p>
408
377
 
409
378
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
410
379
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#DFSIterative">DFSIterative</a></p>
411
380
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFSIterative">DFSIterative</a></p>
412
381
  <ul>
413
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/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>
382
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L1047">src/data-structures/binary-tree/abstract-binary-tree.ts:1047</a></li></ul></aside></li>
414
383
  <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>
415
384
  <li class="tsd-description">
416
- <div class="tsd-comment tsd-typography"><p>The DFSIterative function performs an iterative depth-first search traversal on a binary tree, with the option to
417
- specify the traversal pattern and the property name to accumulate results by.</p>
385
+ <div class="tsd-comment tsd-typography"><p>Performs an iterative depth-first search (DFS) traversal on a binary tree and accumulates properties of each node based on the specified property name.</p>
418
386
  </div>
419
387
  <div class="tsd-parameters">
420
388
  <h4 class="tsd-parameters-title">Parameters</h4>
421
389
  <ul class="tsd-parameter-list">
422
390
  <li>
423
391
  <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>
424
- <div class="tsd-comment tsd-typography"><p>The &quot;pattern&quot; parameter determines the order in which the nodes of the
425
- binary tree are visited during the depth-first search. It can have one of the following values:</p>
392
+ <div class="tsd-comment tsd-typography"><p>The traversal pattern: &#39;in&#39; (in-order), &#39;pre&#39; (pre-order), or &#39;post&#39; (post-order).</p>
426
393
  </div>
427
394
  <div class="tsd-comment tsd-typography"></div></li>
428
395
  <li>
429
396
  <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;id&quot;</span></h5>
430
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is used to specify the
431
- property of the nodes that you want to retrieve or perform operations on during the depth-first search traversal. By
432
- default, it is set to <code>&#39;id&#39;</code>, which means that the traversal will accumulate results based on the <code>id</code> property of
433
- the</p>
397
+ <div class="tsd-comment tsd-typography"><p>The name of the property to accumulate.</p>
434
398
  </div>
435
399
  <div class="tsd-comment tsd-typography"></div></li></ul></div>
436
- <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 AbstractBinaryTreeNodeProperties<N>.</p>
400
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>An array of values corresponding to the specified property.</p>
437
401
 
438
402
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
439
403
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#DFSIterative">DFSIterative</a></p>
440
404
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFSIterative">DFSIterative</a></p>
441
405
  <ul>
442
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L973">src/data-structures/binary-tree/abstract-binary-tree.ts:973</a></li></ul></aside></li>
406
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/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>
443
407
  <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>
444
408
  <li class="tsd-description">
445
- <div class="tsd-comment tsd-typography"><p>The DFSIterative function performs an iterative depth-first search traversal on a binary tree, with the option to
446
- specify the traversal pattern and the property name to accumulate results by.</p>
409
+ <div class="tsd-comment tsd-typography"><p>Performs an iterative depth-first search (DFS) traversal on a binary tree and accumulates the &#39;val&#39; property of each node.</p>
447
410
  </div>
448
411
  <div class="tsd-parameters">
449
412
  <h4 class="tsd-parameters-title">Parameters</h4>
450
413
  <ul class="tsd-parameter-list">
451
414
  <li>
452
415
  <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>
453
- <div class="tsd-comment tsd-typography"><p>The &quot;pattern&quot; parameter determines the order in which the nodes of the
454
- binary tree are visited during the depth-first search. It can have one of the following values:</p>
416
+ <div class="tsd-comment tsd-typography"><p>The traversal pattern: &#39;in&#39; (in-order), &#39;pre&#39; (pre-order), or &#39;post&#39; (post-order).</p>
455
417
  </div>
456
418
  <div class="tsd-comment tsd-typography"></div></li>
457
419
  <li>
458
420
  <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>
459
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is used to specify the
460
- property of the nodes that you want to retrieve or perform operations on during the depth-first search traversal. By
461
- default, it is set to <code>&#39;id&#39;</code>, which means that the traversal will accumulate results based on the <code>id</code> property of
462
- the</p>
421
+ <div class="tsd-comment tsd-typography"><p>The name of the property to accumulate.</p>
463
422
  </div>
464
423
  <div class="tsd-comment tsd-typography"></div></li></ul></div>
465
- <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 AbstractBinaryTreeNodeProperties<N>.</p>
424
+ <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 &#39;val&#39; properties from each node.</p>
466
425
 
467
426
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
468
427
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#DFSIterative">DFSIterative</a></p>
469
428
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFSIterative">DFSIterative</a></p>
470
429
  <ul>
471
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L975">src/data-structures/binary-tree/abstract-binary-tree.ts:975</a></li></ul></aside></li>
430
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L1063">src/data-structures/binary-tree/abstract-binary-tree.ts:1063</a></li></ul></aside></li>
472
431
  <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>
473
432
  <li class="tsd-description">
474
- <div class="tsd-comment tsd-typography"><p>The DFSIterative function performs an iterative depth-first search traversal on a binary tree, with the option to
475
- specify the traversal pattern and the property name to accumulate results by.</p>
433
+ <div class="tsd-comment tsd-typography"><p>Performs an iterative depth-first search (DFS) traversal on a binary tree and accumulates nodes themselves.</p>
476
434
  </div>
477
435
  <div class="tsd-parameters">
478
436
  <h4 class="tsd-parameters-title">Parameters</h4>
479
437
  <ul class="tsd-parameter-list">
480
438
  <li>
481
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>
482
- <div class="tsd-comment tsd-typography"><p>The &quot;pattern&quot; parameter determines the order in which the nodes of the
483
- binary tree are visited during the depth-first search. It can have one of the following values:</p>
440
+ <div class="tsd-comment tsd-typography"><p>The traversal pattern: &#39;in&#39; (in-order), &#39;pre&#39; (pre-order), or &#39;post&#39; (post-order).</p>
484
441
  </div>
485
442
  <div class="tsd-comment tsd-typography"></div></li>
486
443
  <li>
487
444
  <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>
488
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is used to specify the
489
- property of the nodes that you want to retrieve or perform operations on during the depth-first search traversal. By
490
- default, it is set to <code>&#39;id&#39;</code>, which means that the traversal will accumulate results based on the <code>id</code> property of
491
- the</p>
445
+ <div class="tsd-comment tsd-typography"><p>The name of the property to accumulate.</p>
492
446
  </div>
493
447
  <div class="tsd-comment tsd-typography"></div></li></ul></div>
494
- <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 AbstractBinaryTreeNodeProperties<N>.</p>
448
+ <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 binary tree nodes.</p>
495
449
 
496
450
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
497
451
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#DFSIterative">DFSIterative</a></p>
498
452
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#DFSIterative">DFSIterative</a></p>
499
453
  <ul>
500
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L977">src/data-structures/binary-tree/abstract-binary-tree.ts:977</a></li></ul></aside></li></ul></section>
454
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L1071">src/data-structures/binary-tree/abstract-binary-tree.ts:1071</a></li></ul></aside></li></ul></section>
501
455
  <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_accumulatedByPropertyName" class="tsd-anchor"></a>
502
456
  <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>
503
457
  <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
@@ -524,7 +478,7 @@ specifies the property name to be used for accumulating values. If it is a <code
524
478
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
525
479
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_accumulatedByPropertyName">_accumulatedByPropertyName</a></p>
526
480
  <ul>
527
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1433">src/data-structures/binary-tree/abstract-binary-tree.ts:1433</a></li></ul></aside></li></ul></section>
481
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L1584">src/data-structures/binary-tree/abstract-binary-tree.ts:1584</a></li></ul></aside></li></ul></section>
528
482
  <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_addTo" class="tsd-anchor"></a>
529
483
  <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <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>
530
484
  <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
@@ -554,7 +508,7 @@ undefined.</p>
554
508
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
555
509
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_addTo">_addTo</a></p>
556
510
  <ul>
557
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1287">src/data-structures/binary-tree/abstract-binary-tree.ts:1287</a></li></ul></aside></li></ul></section>
511
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L1438">src/data-structures/binary-tree/abstract-binary-tree.ts:1438</a></li></ul></aside></li></ul></section>
558
512
  <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_clearResults" class="tsd-anchor"></a>
559
513
  <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>_clear<wbr/>Results</span><a href="#_clearResults" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
560
514
  <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
@@ -567,7 +521,7 @@ properties.</p>
567
521
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
568
522
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_clearResults">_clearResults</a></p>
569
523
  <ul>
570
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1375">src/data-structures/binary-tree/abstract-binary-tree.ts:1375</a></li></ul></aside></li></ul></section>
524
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L1526">src/data-structures/binary-tree/abstract-binary-tree.ts:1526</a></li></ul></aside></li></ul></section>
571
525
  <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_compare" class="tsd-anchor"></a>
572
526
  <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>
573
527
  <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
@@ -595,7 +549,7 @@ than), or CP.eq (equal).</p>
595
549
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
596
550
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_compare">_compare</a></p>
597
551
  <ul>
598
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/bst.ts#L535">src/data-structures/binary-tree/bst.ts:535</a></li></ul></aside></li></ul></section>
552
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/bst.ts#L529">src/data-structures/binary-tree/bst.ts:529</a></li></ul></aside></li></ul></section>
599
553
  <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_getResultByPropertyName" class="tsd-anchor"></a>
600
554
  <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>
601
555
  <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
@@ -618,7 +572,7 @@ can accept either a <code>NodeOrPropertyName</code> type or be undefined.</p>
618
572
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
619
573
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_getResultByPropertyName">_getResultByPropertyName</a></p>
620
574
  <ul>
621
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1464">src/data-structures/binary-tree/abstract-binary-tree.ts:1464</a></li></ul></aside></li></ul></section>
575
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L1615">src/data-structures/binary-tree/abstract-binary-tree.ts:1615</a></li></ul></aside></li></ul></section>
622
576
  <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_pushByPropertyNameStopOrNot" class="tsd-anchor"></a>
623
577
  <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>
624
578
  <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
@@ -665,7 +619,7 @@ stop after finding the first matching node or continue searching for all matchin
665
619
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
666
620
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_pushByPropertyNameStopOrNot">_pushByPropertyNameStopOrNot</a></p>
667
621
  <ul>
668
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/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>
622
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L1548">src/data-structures/binary-tree/abstract-binary-tree.ts:1548</a></li></ul></aside></li></ul></section>
669
623
  <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setLoopType" class="tsd-anchor"></a>
670
624
  <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>
671
625
  <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
@@ -685,7 +639,7 @@ stop after finding the first matching node or continue searching for all matchin
685
639
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
686
640
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setLoopType">_setLoopType</a></p>
687
641
  <ul>
688
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1315">src/data-structures/binary-tree/abstract-binary-tree.ts:1315</a></li></ul></aside></li></ul></section>
642
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L1466">src/data-structures/binary-tree/abstract-binary-tree.ts:1466</a></li></ul></aside></li></ul></section>
689
643
  <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setRoot" class="tsd-anchor"></a>
690
644
  <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>
691
645
  <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
@@ -706,7 +660,7 @@ parent property of the value to undefined.</p>
706
660
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
707
661
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setRoot">_setRoot</a></p>
708
662
  <ul>
709
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1356">src/data-structures/binary-tree/abstract-binary-tree.ts:1356</a></li></ul></aside></li></ul></section>
663
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L1507">src/data-structures/binary-tree/abstract-binary-tree.ts:1507</a></li></ul></aside></li></ul></section>
710
664
  <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setSize" class="tsd-anchor"></a>
711
665
  <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>
712
666
  <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
@@ -726,7 +680,7 @@ parent property of the value to undefined.</p>
726
680
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
727
681
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setSize">_setSize</a></p>
728
682
  <ul>
729
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1367">src/data-structures/binary-tree/abstract-binary-tree.ts:1367</a></li></ul></aside></li></ul></section>
683
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L1518">src/data-structures/binary-tree/abstract-binary-tree.ts:1518</a></li></ul></aside></li></ul></section>
730
684
  <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setVisitedId" class="tsd-anchor"></a>
731
685
  <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>
732
686
  <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
@@ -746,7 +700,7 @@ parent property of the value to undefined.</p>
746
700
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
747
701
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setVisitedId">_setVisitedId</a></p>
748
702
  <ul>
749
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1323">src/data-structures/binary-tree/abstract-binary-tree.ts:1323</a></li></ul></aside></li></ul></section>
703
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L1474">src/data-structures/binary-tree/abstract-binary-tree.ts:1474</a></li></ul></aside></li></ul></section>
750
704
  <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setVisitedLeftSum" class="tsd-anchor"></a>
751
705
  <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>
752
706
  <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
@@ -766,7 +720,7 @@ parent property of the value to undefined.</p>
766
720
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
767
721
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setVisitedLeftSum">_setVisitedLeftSum</a></p>
768
722
  <ul>
769
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1347">src/data-structures/binary-tree/abstract-binary-tree.ts:1347</a></li></ul></aside></li></ul></section>
723
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/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>
770
724
  <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setVisitedNode" class="tsd-anchor"></a>
771
725
  <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>
772
726
  <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
@@ -786,7 +740,7 @@ parent property of the value to undefined.</p>
786
740
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
787
741
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setVisitedNode">_setVisitedNode</a></p>
788
742
  <ul>
789
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1339">src/data-structures/binary-tree/abstract-binary-tree.ts:1339</a></li></ul></aside></li></ul></section>
743
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L1490">src/data-structures/binary-tree/abstract-binary-tree.ts:1490</a></li></ul></aside></li></ul></section>
790
744
  <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setVisitedVal" class="tsd-anchor"></a>
791
745
  <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>
792
746
  <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
@@ -806,7 +760,7 @@ parent property of the value to undefined.</p>
806
760
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
807
761
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#_setVisitedVal">_setVisitedVal</a></p>
808
762
  <ul>
809
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1331">src/data-structures/binary-tree/abstract-binary-tree.ts:1331</a></li></ul></aside></li></ul></section>
763
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L1482">src/data-structures/binary-tree/abstract-binary-tree.ts:1482</a></li></ul></aside></li></ul></section>
810
764
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="add" class="tsd-anchor"></a>
811
765
  <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>
812
766
  <ul class="tsd-signatures tsd-is-inherited">
@@ -836,7 +790,7 @@ being added to the binary search tree.</p>
836
790
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#add">add</a></p>
837
791
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#add">add</a></p>
838
792
  <ul>
839
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/bst.ts#L64">src/data-structures/binary-tree/bst.ts:64</a></li></ul></aside></li></ul></section>
793
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/bst.ts#L58">src/data-structures/binary-tree/bst.ts:58</a></li></ul></aside></li></ul></section>
840
794
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="addMany" class="tsd-anchor"></a>
841
795
  <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>
842
796
  <ul class="tsd-signatures tsd-is-inherited">
@@ -871,7 +825,7 @@ to the binary search tree.</p>
871
825
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#addMany">addMany</a></p>
872
826
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#addMany">addMany</a></p>
873
827
  <ul>
874
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/bst.ts#L140">src/data-structures/binary-tree/bst.ts:140</a></li></ul></aside></li></ul></section>
828
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/bst.ts#L134">src/data-structures/binary-tree/bst.ts:134</a></li></ul></aside></li></ul></section>
875
829
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="allGreaterNodesAdd" class="tsd-anchor"></a>
876
830
  <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>
877
831
  <ul class="tsd-signatures tsd-is-inherited">
@@ -908,7 +862,7 @@ specifies the property name of the nodes in the binary tree that you want to upd
908
862
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#allGreaterNodesAdd">allGreaterNodesAdd</a></p>
909
863
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#allGreaterNodesAdd">allGreaterNodesAdd</a></p>
910
864
  <ul>
911
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/bst.ts#L376">src/data-structures/binary-tree/bst.ts:376</a></li></ul></aside></li></ul></section>
865
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/bst.ts#L370">src/data-structures/binary-tree/bst.ts:370</a></li></ul></aside></li></ul></section>
912
866
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="clear" class="tsd-anchor"></a>
913
867
  <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>
914
868
  <ul class="tsd-signatures tsd-is-inherited">
@@ -921,7 +875,7 @@ specifies the property name of the nodes in the binary tree that you want to upd
921
875
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#clear">clear</a></p>
922
876
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#clear">clear</a></p>
923
877
  <ul>
924
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L227">src/data-structures/binary-tree/abstract-binary-tree.ts:227</a></li></ul></aside></li></ul></section>
878
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L227">src/data-structures/binary-tree/abstract-binary-tree.ts:227</a></li></ul></aside></li></ul></section>
925
879
  <section class="tsd-panel tsd-member"><a id="createNode" class="tsd-anchor"></a>
926
880
  <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>
927
881
  <ul class="tsd-signatures">
@@ -950,7 +904,7 @@ that will be stored in the node.</p>
950
904
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#createNode">createNode</a></p>
951
905
  <p>Overrides <a href="BST.html">BST</a>.<a href="BST.html#createNode">createNode</a></p>
952
906
  <ul>
953
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/rb-tree.ts#L63">src/data-structures/binary-tree/rb-tree.ts:63</a></li></ul></aside></li></ul></section>
907
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/rb-tree.ts#L63">src/data-structures/binary-tree/rb-tree.ts:63</a></li></ul></aside></li></ul></section>
954
908
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="fill" class="tsd-anchor"></a>
955
909
  <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>
956
910
  <ul class="tsd-signatures tsd-is-inherited">
@@ -980,7 +934,7 @@ array. Each value in the <code>data</code> array will be assigned to the</p>
980
934
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#fill">fill</a></p>
981
935
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#fill">fill</a></p>
982
936
  <ul>
983
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L345">src/data-structures/binary-tree/abstract-binary-tree.ts:345</a></li></ul></aside></li></ul></section>
937
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L345">src/data-structures/binary-tree/abstract-binary-tree.ts:345</a></li></ul></aside></li></ul></section>
984
938
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="get" class="tsd-anchor"></a>
985
939
  <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>
986
940
  <ul class="tsd-signatures tsd-is-inherited">
@@ -1009,7 +963,7 @@ specifies the property name to use for searching the binary tree nodes. If not p
1009
963
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#get">get</a></p>
1010
964
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#get">get</a></p>
1011
965
  <ul>
1012
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/bst.ts#L217">src/data-structures/binary-tree/bst.ts:217</a></li></ul></aside></li></ul></section>
966
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/bst.ts#L211">src/data-structures/binary-tree/bst.ts:211</a></li></ul></aside></li></ul></section>
1013
967
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getDepth" class="tsd-anchor"></a>
1014
968
  <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>
1015
969
  <ul class="tsd-signatures tsd-is-inherited">
@@ -1031,7 +985,7 @@ specifies the property name to use for searching the binary tree nodes. If not p
1031
985
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#getDepth">getDepth</a></p>
1032
986
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getDepth">getDepth</a></p>
1033
987
  <ul>
1034
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L412">src/data-structures/binary-tree/abstract-binary-tree.ts:412</a></li></ul></aside></li></ul></section>
988
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L412">src/data-structures/binary-tree/abstract-binary-tree.ts:412</a></li></ul></aside></li></ul></section>
1035
989
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getHeight" class="tsd-anchor"></a>
1036
990
  <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>
1037
991
  <ul class="tsd-signatures tsd-is-inherited">
@@ -1055,43 +1009,52 @@ node), or <code>null</code>.</p>
1055
1009
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#getHeight">getHeight</a></p>
1056
1010
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getHeight">getHeight</a></p>
1057
1011
  <ul>
1058
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L430">src/data-structures/binary-tree/abstract-binary-tree.ts:430</a></li></ul></aside></li></ul></section>
1012
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L430">src/data-structures/binary-tree/abstract-binary-tree.ts:430</a></li></ul></aside></li></ul></section>
1059
1013
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getLeftMost" class="tsd-anchor"></a>
1060
1014
  <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>
1061
1015
  <ul class="tsd-signatures tsd-is-inherited">
1062
1016
  <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>
1063
1017
  <li class="tsd-description">
1064
- <div class="tsd-comment tsd-typography"><p>The <code>getLeftMost</code> function returns the leftmost node in a binary tree, starting from a specified node or the root if
1065
- no node is specified.</p>
1018
+ <div class="tsd-comment tsd-typography"><p>The function <code>getLeftMost</code> returns the leftmost node in a binary tree, starting from a specified node or the root if
1019
+ no node is specified.
1020
+ generic type representing a node in a binary tree), <code>BinaryTreeNodeId</code> (a type representing the ID of a binary tree
1021
+ node), or <code>null</code>.</p>
1066
1022
  </div>
1067
1023
  <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 function <code>getLeftMost</code> returns the leftmost node in a binary tree. If the <code>beginRoot</code> parameter is
1068
- provided, it starts the traversal from that node. If <code>beginRoot</code> is not provided or is <code>null</code>, it starts the
1069
- traversal from the root of the binary tree. If there are no nodes in the binary tree, it returns <code>null</code>.</p>
1024
+ provided, it starts the traversal from that node. If <code>beginRoot</code> is not provided or is <code>null</code>, it starts the traversal
1025
+ from the root of the binary tree. The function returns the leftmost node found during the traversal. If no leftmost
1026
+ node is found (</p>
1070
1027
 
1071
1028
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1072
1029
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#getLeftMost">getLeftMost</a></p>
1073
1030
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getLeftMost">getLeftMost</a></p>
1074
1031
  <ul>
1075
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L628">src/data-structures/binary-tree/abstract-binary-tree.ts:628</a></li></ul></aside></li>
1076
- <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>
1032
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L638">src/data-structures/binary-tree/abstract-binary-tree.ts:638</a></li></ul></aside></li>
1033
+ <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-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>
1077
1034
  <li class="tsd-description">
1078
- <div class="tsd-comment tsd-typography"><p>The <code>getLeftMost</code> function returns the leftmost node in a binary tree, starting from a specified node or the root if
1035
+ <div class="tsd-comment tsd-typography"><p>The function <code>getLeftMost</code> returns the leftmost node in a binary tree, starting from a specified node or the root if
1079
1036
  no node is specified.</p>
1080
1037
  </div>
1081
1038
  <div class="tsd-parameters">
1082
1039
  <h4 class="tsd-parameters-title">Parameters</h4>
1083
1040
  <ul class="tsd-parameter-list">
1084
1041
  <li>
1085
- <h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5></li></ul></div>
1042
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
1043
+ <div class="tsd-comment tsd-typography"><p>The <code>beginRoot</code> parameter is optional and can be of type <code>N</code> (a
1044
+ generic type representing a node in a binary tree), <code>BinaryTreeNodeId</code> (a type representing the ID of a binary tree
1045
+ node).</p>
1046
+ </div>
1047
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
1086
1048
  <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>The function <code>getLeftMost</code> returns the leftmost node in a binary tree. If the <code>beginRoot</code> parameter is
1087
- provided, it starts the traversal from that node. If <code>beginRoot</code> is not provided or is <code>null</code>, it starts the
1088
- traversal from the root of the binary tree. If there are no nodes in the binary tree, it returns <code>null</code>.</p>
1049
+ provided, it starts the traversal from that node. If <code>beginRoot</code> is not provided or is <code>null</code>, it starts the traversal
1050
+ from the root of the binary tree. The function returns the leftmost node found during the traversal. If no leftmost
1051
+ node is found (</p>
1089
1052
 
1090
1053
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1091
1054
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#getLeftMost">getLeftMost</a></p>
1092
1055
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getLeftMost">getLeftMost</a></p>
1093
1056
  <ul>
1094
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L630">src/data-structures/binary-tree/abstract-binary-tree.ts:630</a></li></ul></aside></li></ul></section>
1057
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L651">src/data-structures/binary-tree/abstract-binary-tree.ts:651</a></li></ul></aside></li></ul></section>
1095
1058
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getMinHeight" class="tsd-anchor"></a>
1096
1059
  <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>
1097
1060
  <ul class="tsd-signatures tsd-is-inherited">
@@ -1116,7 +1079,7 @@ for <code>beginRoot</code>, the <code>this.root</code> property is used as the d
1116
1079
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#getMinHeight">getMinHeight</a></p>
1117
1080
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getMinHeight">getMinHeight</a></p>
1118
1081
  <ul>
1119
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L479">src/data-structures/binary-tree/abstract-binary-tree.ts:479</a></li></ul></aside></li></ul></section>
1082
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L479">src/data-structures/binary-tree/abstract-binary-tree.ts:479</a></li></ul></aside></li></ul></section>
1120
1083
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getNodes" class="tsd-anchor"></a>
1121
1084
  <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>
1122
1085
  <ul class="tsd-signatures tsd-is-inherited">
@@ -1152,7 +1115,7 @@ is set to <code>true</code>, the function will return an array with only one nod
1152
1115
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#getNodes">getNodes</a></p>
1153
1116
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getNodes">getNodes</a></p>
1154
1117
  <ul>
1155
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/bst.ts#L246">src/data-structures/binary-tree/bst.ts:246</a></li></ul></aside></li></ul></section>
1118
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/bst.ts#L240">src/data-structures/binary-tree/bst.ts:240</a></li></ul></aside></li></ul></section>
1156
1119
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getPathToRoot" class="tsd-anchor"></a>
1157
1120
  <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>
1158
1121
  <ul class="tsd-signatures tsd-is-inherited">
@@ -1183,7 +1146,7 @@ path should be reversed or not. If <code>isReverse</code> is set to <code>true</
1183
1146
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#getPathToRoot">getPathToRoot</a></p>
1184
1147
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getPathToRoot">getPathToRoot</a></p>
1185
1148
  <ul>
1186
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L615">src/data-structures/binary-tree/abstract-binary-tree.ts:615</a></li></ul></aside></li></ul></section>
1149
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L615">src/data-structures/binary-tree/abstract-binary-tree.ts:615</a></li></ul></aside></li></ul></section>
1187
1150
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getPredecessor" class="tsd-anchor"></a>
1188
1151
  <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>
1189
1152
  <ul class="tsd-signatures tsd-is-inherited">
@@ -1205,48 +1168,46 @@ path should be reversed or not. If <code>isReverse</code> is set to <code>true</
1205
1168
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#getPredecessor">getPredecessor</a></p>
1206
1169
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getPredecessor">getPredecessor</a></p>
1207
1170
  <ul>
1208
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1151">src/data-structures/binary-tree/abstract-binary-tree.ts:1151</a></li></ul></aside></li></ul></section>
1171
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L1284">src/data-structures/binary-tree/abstract-binary-tree.ts:1284</a></li></ul></aside></li></ul></section>
1209
1172
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getRightMost" class="tsd-anchor"></a>
1210
1173
  <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>
1211
1174
  <ul class="tsd-signatures tsd-is-inherited">
1212
1175
  <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>
1213
1176
  <li class="tsd-description">
1214
- <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
1215
- tail recursion optimization.</p>
1177
+ <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 tail
1178
+ recursion optimization.</p>
1216
1179
  </div>
1217
- <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 function <code>getRightMost</code> returns the rightmost node (<code>N</code>) in a binary tree. If the <code>node</code> parameter is
1218
- not provided, it defaults to the root node of the tree. If the tree is empty or the <code>node</code> parameter is <code>null</code>, the
1219
- function returns <code>null</code>.</p>
1180
+ <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. It returns the
1181
+ rightmost node starting from the root of the binary tree.</p>
1220
1182
 
1221
1183
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1222
1184
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#getRightMost">getRightMost</a></p>
1223
1185
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getRightMost">getRightMost</a></p>
1224
1186
  <ul>
1225
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L666">src/data-structures/binary-tree/abstract-binary-tree.ts:666</a></li></ul></aside></li>
1226
- <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>
1187
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L694">src/data-structures/binary-tree/abstract-binary-tree.ts:694</a></li></ul></aside></li>
1188
+ <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-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>
1227
1189
  <li class="tsd-description">
1228
- <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
1229
- tail recursion optimization.</p>
1190
+ <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 tail
1191
+ recursion optimization.</p>
1230
1192
  </div>
1231
1193
  <div class="tsd-parameters">
1232
1194
  <h4 class="tsd-parameters-title">Parameters</h4>
1233
1195
  <ul class="tsd-parameter-list">
1234
1196
  <li>
1235
- <h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
1197
+ <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
1236
1198
  <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is an optional parameter of type <code>N</code> or <code>null</code>. It represents the
1237
- starting node from which we want to find the rightmost node. If no node is provided, the <code>node</code> parameter defaults
1238
- to <code>this.root</code>, which is the root node of the data structure</p>
1199
+ starting node from which we want to find the rightmost node. If no node is provided, the function will default to
1200
+ using the root node of the data structure.</p>
1239
1201
  </div>
1240
1202
  <div class="tsd-comment tsd-typography"></div></li></ul></div>
1241
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h4><p>The function <code>getRightMost</code> returns the rightmost node (<code>N</code>) in a binary tree. If the <code>node</code> parameter is
1242
- not provided, it defaults to the root node of the tree. If the tree is empty or the <code>node</code> parameter is <code>null</code>, the
1243
- function returns <code>null</code>.</p>
1203
+ <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. It returns the rightmost node
1204
+ starting from that node.</p>
1244
1205
 
1245
1206
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1246
1207
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#getRightMost">getRightMost</a></p>
1247
1208
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getRightMost">getRightMost</a></p>
1248
1209
  <ul>
1249
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/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>
1210
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/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>
1250
1211
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getSubTreeSize" class="tsd-anchor"></a>
1251
1212
  <h3 class="tsd-anchor-link"><span>get<wbr/>Sub<wbr/>Tree<wbr/>Size</span><a href="#getSubTreeSize" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
1252
1213
  <ul class="tsd-signatures tsd-is-inherited">
@@ -1269,7 +1230,7 @@ binary tree.</p>
1269
1230
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#getSubTreeSize">getSubTreeSize</a></p>
1270
1231
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#getSubTreeSize">getSubTreeSize</a></p>
1271
1232
  <ul>
1272
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L752">src/data-structures/binary-tree/abstract-binary-tree.ts:752</a></li></ul></aside></li></ul></section>
1233
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L789">src/data-structures/binary-tree/abstract-binary-tree.ts:789</a></li></ul></aside></li></ul></section>
1273
1234
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="has" class="tsd-anchor"></a>
1274
1235
  <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>
1275
1236
  <ul class="tsd-signatures tsd-is-inherited">
@@ -1298,7 +1259,7 @@ specifies the name of the property to be checked in the nodes. If not provided,
1298
1259
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#has">has</a></p>
1299
1260
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#has">has</a></p>
1300
1261
  <ul>
1301
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L582">src/data-structures/binary-tree/abstract-binary-tree.ts:582</a></li></ul></aside></li></ul></section>
1262
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L582">src/data-structures/binary-tree/abstract-binary-tree.ts:582</a></li></ul></aside></li></ul></section>
1302
1263
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="isAVLBalanced" class="tsd-anchor"></a>
1303
1264
  <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>
1304
1265
  <ul class="tsd-signatures tsd-is-inherited">
@@ -1312,7 +1273,7 @@ specifies the name of the property to be checked in the nodes. If not provided,
1312
1273
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#isAVLBalanced">isAVLBalanced</a></p>
1313
1274
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#isAVLBalanced">isAVLBalanced</a></p>
1314
1275
  <ul>
1315
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/bst.ts#L481">src/data-structures/binary-tree/bst.ts:481</a></li></ul></aside></li></ul></section>
1276
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/bst.ts#L475">src/data-structures/binary-tree/bst.ts:475</a></li></ul></aside></li></ul></section>
1316
1277
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="isBST" class="tsd-anchor"></a>
1317
1278
  <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>
1318
1279
  <ul class="tsd-signatures tsd-is-inherited">
@@ -1326,7 +1287,7 @@ specifies the name of the property to be checked in the nodes. If not provided,
1326
1287
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#isBST">isBST</a></p>
1327
1288
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#isBST">isBST</a></p>
1328
1289
  <ul>
1329
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L742">src/data-structures/binary-tree/abstract-binary-tree.ts:742</a></li></ul></aside></li></ul></section>
1290
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L779">src/data-structures/binary-tree/abstract-binary-tree.ts:779</a></li></ul></aside></li></ul></section>
1330
1291
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="isEmpty" class="tsd-anchor"></a>
1331
1292
  <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>
1332
1293
  <ul class="tsd-signatures tsd-is-inherited">
@@ -1340,7 +1301,7 @@ specifies the name of the property to be checked in the nodes. If not provided,
1340
1301
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#isEmpty">isEmpty</a></p>
1341
1302
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#isEmpty">isEmpty</a></p>
1342
1303
  <ul>
1343
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L237">src/data-structures/binary-tree/abstract-binary-tree.ts:237</a></li></ul></aside></li></ul></section>
1304
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L237">src/data-structures/binary-tree/abstract-binary-tree.ts:237</a></li></ul></aside></li></ul></section>
1344
1305
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="isPerfectlyBalanced" class="tsd-anchor"></a>
1345
1306
  <h3 class="tsd-anchor-link"><span>is<wbr/>Perfectly<wbr/>Balanced</span><a href="#isPerfectlyBalanced" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
1346
1307
  <ul class="tsd-signatures tsd-is-inherited">
@@ -1364,7 +1325,7 @@ tree or null if the tree is empty.</p>
1364
1325
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#isPerfectlyBalanced">isPerfectlyBalanced</a></p>
1365
1326
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#isPerfectlyBalanced">isPerfectlyBalanced</a></p>
1366
1327
  <ul>
1367
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L529">src/data-structures/binary-tree/abstract-binary-tree.ts:529</a></li></ul></aside></li></ul></section>
1328
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L529">src/data-structures/binary-tree/abstract-binary-tree.ts:529</a></li></ul></aside></li></ul></section>
1368
1329
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="isSubtreeBST" class="tsd-anchor"></a>
1369
1330
  <h3 class="tsd-anchor-link"><span>is<wbr/>SubtreeBST</span><a href="#isSubtreeBST" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
1370
1331
  <ul class="tsd-signatures tsd-is-inherited">
@@ -1386,7 +1347,7 @@ tree or null if the tree is empty.</p>
1386
1347
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#isSubtreeBST">isSubtreeBST</a></p>
1387
1348
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#isSubtreeBST">isSubtreeBST</a></p>
1388
1349
  <ul>
1389
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L708">src/data-structures/binary-tree/abstract-binary-tree.ts:708</a></li></ul></aside></li></ul></section>
1350
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L745">src/data-structures/binary-tree/abstract-binary-tree.ts:745</a></li></ul></aside></li></ul></section>
1390
1351
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="lastKey" class="tsd-anchor"></a>
1391
1352
  <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>
1392
1353
  <ul class="tsd-signatures tsd-is-inherited">
@@ -1403,7 +1364,7 @@ equal, it returns the id of the rightmost node. If there are no nodes in the tre
1403
1364
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#lastKey">lastKey</a></p>
1404
1365
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#lastKey">lastKey</a></p>
1405
1366
  <ul>
1406
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/bst.ts#L229">src/data-structures/binary-tree/bst.ts:229</a></li></ul></aside></li></ul></section>
1367
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/bst.ts#L223">src/data-structures/binary-tree/bst.ts:223</a></li></ul></aside></li></ul></section>
1407
1368
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="lesserSum" class="tsd-anchor"></a>
1408
1369
  <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>
1409
1370
  <ul class="tsd-signatures tsd-is-inherited">
@@ -1433,315 +1394,277 @@ binary tree that have a lesser value than the specified <code>beginNode</code> b
1433
1394
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#lesserSum">lesserSum</a></p>
1434
1395
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#lesserSum">lesserSum</a></p>
1435
1396
  <ul>
1436
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/bst.ts#L299">src/data-structures/binary-tree/bst.ts:299</a></li></ul></aside></li></ul></section>
1397
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/bst.ts#L293">src/data-structures/binary-tree/bst.ts:293</a></li></ul></aside></li></ul></section>
1437
1398
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="levelIterative" class="tsd-anchor"></a>
1438
1399
  <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>
1439
1400
  <ul class="tsd-signatures tsd-is-inherited">
1440
1401
  <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>
1441
1402
  <li class="tsd-description">
1442
- <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
1443
- in an array, based on a specified property name.</p>
1403
+ <div class="tsd-comment tsd-typography"><p>Performs a level-order traversal on a binary tree starting from the specified node and accumulates properties of each node based on their &#39;id&#39; property.</p>
1444
1404
  </div>
1445
1405
  <div class="tsd-parameters">
1446
1406
  <h4 class="tsd-parameters-title">Parameters</h4>
1447
1407
  <ul class="tsd-parameter-list">
1448
1408
  <li>
1449
1409
  <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>
1450
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
1451
- node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
1452
- the tree is used as the starting node.</p>
1410
+ <div class="tsd-comment tsd-typography"><p>The starting node for the level order traversal. If null, the root node of the tree is used as the starting node.</p>
1453
1411
  </div>
1454
1412
  <div class="tsd-comment tsd-typography"></div></li></ul></div>
1455
- <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>
1413
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>An array of binary tree node IDs.</p>
1456
1414
 
1457
1415
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1458
1416
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#levelIterative">levelIterative</a></p>
1459
1417
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#levelIterative">levelIterative</a></p>
1460
1418
  <ul>
1461
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1035">src/data-structures/binary-tree/abstract-binary-tree.ts:1035</a></li></ul></aside></li>
1419
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L1130">src/data-structures/binary-tree/abstract-binary-tree.ts:1130</a></li></ul></aside></li>
1462
1420
  <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>
1463
1421
  <li class="tsd-description">
1464
- <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
1465
- in an array, based on a specified property name.</p>
1422
+ <div class="tsd-comment tsd-typography"><p>Performs a level-order traversal on a binary tree starting from the specified node and accumulates properties of each node based on the specified property name.</p>
1466
1423
  </div>
1467
1424
  <div class="tsd-parameters">
1468
1425
  <h4 class="tsd-parameters-title">Parameters</h4>
1469
1426
  <ul class="tsd-parameter-list">
1470
1427
  <li>
1471
1428
  <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>
1472
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
1473
- node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
1474
- the tree is used as the starting node.</p>
1429
+ <div class="tsd-comment tsd-typography"><p>The starting node for the level order traversal. If null, the root node of the tree is used as the starting node.</p>
1475
1430
  </div>
1476
1431
  <div class="tsd-comment tsd-typography"></div></li>
1477
1432
  <li>
1478
1433
  <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>
1479
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is an optional parameter that
1480
- 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
1481
- will accumulate results based on that property. If no property name is provided, the function will default to
1482
- accumulating results</p>
1434
+ <div class="tsd-comment tsd-typography"><p>The name of the property to accumulate.</p>
1483
1435
  </div>
1484
1436
  <div class="tsd-comment tsd-typography"></div></li></ul></div>
1485
- <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>
1437
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>An array of values corresponding to the specified property.</p>
1486
1438
 
1487
1439
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1488
1440
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#levelIterative">levelIterative</a></p>
1489
1441
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#levelIterative">levelIterative</a></p>
1490
1442
  <ul>
1491
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1037">src/data-structures/binary-tree/abstract-binary-tree.ts:1037</a></li></ul></aside></li>
1443
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L1138">src/data-structures/binary-tree/abstract-binary-tree.ts:1138</a></li></ul></aside></li>
1492
1444
  <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>
1493
1445
  <li class="tsd-description">
1494
- <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
1495
- in an array, based on a specified property name.</p>
1446
+ <div class="tsd-comment tsd-typography"><p>Performs a level-order traversal on a binary tree starting from the specified node and accumulates the &#39;val&#39; property of each node.</p>
1496
1447
  </div>
1497
1448
  <div class="tsd-parameters">
1498
1449
  <h4 class="tsd-parameters-title">Parameters</h4>
1499
1450
  <ul class="tsd-parameter-list">
1500
1451
  <li>
1501
1452
  <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>
1502
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
1503
- node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
1504
- the tree is used as the starting node.</p>
1453
+ <div class="tsd-comment tsd-typography"><p>The starting node for the level order traversal. If null, the root node of the tree is used as the starting node.</p>
1505
1454
  </div>
1506
1455
  <div class="tsd-comment tsd-typography"></div></li>
1507
1456
  <li>
1508
1457
  <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>
1509
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is an optional parameter that
1510
- 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
1511
- will accumulate results based on that property. If no property name is provided, the function will default to
1512
- accumulating results</p>
1458
+ <div class="tsd-comment tsd-typography"><p>The name of the property to accumulate.</p>
1513
1459
  </div>
1514
1460
  <div class="tsd-comment tsd-typography"></div></li></ul></div>
1515
- <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>
1461
+ <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 array of &#39;val&#39; properties from each node.</p>
1516
1462
 
1517
1463
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1518
1464
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#levelIterative">levelIterative</a></p>
1519
1465
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#levelIterative">levelIterative</a></p>
1520
1466
  <ul>
1521
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1039">src/data-structures/binary-tree/abstract-binary-tree.ts:1039</a></li></ul></aside></li>
1467
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L1146">src/data-structures/binary-tree/abstract-binary-tree.ts:1146</a></li></ul></aside></li>
1522
1468
  <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>
1523
1469
  <li class="tsd-description">
1524
- <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
1525
- in an array, based on a specified property name.</p>
1470
+ <div class="tsd-comment tsd-typography"><p>Performs a level-order traversal on a binary tree starting from the specified node and accumulates nodes themselves.</p>
1526
1471
  </div>
1527
1472
  <div class="tsd-parameters">
1528
1473
  <h4 class="tsd-parameters-title">Parameters</h4>
1529
1474
  <ul class="tsd-parameter-list">
1530
1475
  <li>
1531
1476
  <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>
1532
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
1533
- node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
1534
- the tree is used as the starting node.</p>
1477
+ <div class="tsd-comment tsd-typography"><p>The starting node for the level order traversal. If null, the root node of the tree is used as the starting node.</p>
1535
1478
  </div>
1536
1479
  <div class="tsd-comment tsd-typography"></div></li>
1537
1480
  <li>
1538
1481
  <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;node&quot;</span></h5>
1539
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is an optional parameter that
1540
- 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
1541
- will accumulate results based on that property. If no property name is provided, the function will default to
1542
- accumulating results</p>
1482
+ <div class="tsd-comment tsd-typography"><p>The name of the property to accumulate.</p>
1543
1483
  </div>
1544
1484
  <div class="tsd-comment tsd-typography"></div></li></ul></div>
1545
- <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>
1485
+ <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 binary tree nodes.</p>
1546
1486
 
1547
1487
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1548
1488
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#levelIterative">levelIterative</a></p>
1549
1489
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#levelIterative">levelIterative</a></p>
1550
1490
  <ul>
1551
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1041">src/data-structures/binary-tree/abstract-binary-tree.ts:1041</a></li></ul></aside></li></ul></section>
1491
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/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></ul></section>
1552
1492
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="listLevels" class="tsd-anchor"></a>
1553
1493
  <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>
1554
1494
  <ul class="tsd-signatures tsd-is-inherited">
1555
1495
  <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>
1556
1496
  <li class="tsd-description">
1557
- <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>
1497
+ <div class="tsd-comment tsd-typography"><p>Collects nodes from a binary tree by a specified property and organizes them into levels.</p>
1558
1498
  </div>
1559
1499
  <div class="tsd-parameters">
1560
1500
  <h4 class="tsd-parameters-title">Parameters</h4>
1561
1501
  <ul class="tsd-parameter-list">
1562
1502
  <li>
1563
1503
  <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>
1564
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
1565
- root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
1504
+ <div class="tsd-comment tsd-typography"><p>The root node of the binary tree or null. If null, the function will use the root node of the current binary tree instance.</p>
1566
1505
  </div>
1567
1506
  <div class="tsd-comment tsd-typography"></div></li></ul></div>
1568
- <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>
1507
+ <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>A 2D array of AbstractBinaryTreeNodeProperty<N> objects.</p>
1569
1508
 
1570
1509
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1571
1510
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#listLevels">listLevels</a></p>
1572
1511
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#listLevels">listLevels</a></p>
1573
1512
  <ul>
1574
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1079">src/data-structures/binary-tree/abstract-binary-tree.ts:1079</a></li></ul></aside></li>
1513
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L1197">src/data-structures/binary-tree/abstract-binary-tree.ts:1197</a></li></ul></aside></li>
1575
1514
  <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>
1576
1515
  <li class="tsd-description">
1577
- <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>
1516
+ <div class="tsd-comment tsd-typography"><p>Collects nodes from a binary tree by a specified property and organizes them into levels.</p>
1578
1517
  </div>
1579
1518
  <div class="tsd-parameters">
1580
1519
  <h4 class="tsd-parameters-title">Parameters</h4>
1581
1520
  <ul class="tsd-parameter-list">
1582
1521
  <li>
1583
1522
  <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>
1584
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
1585
- root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
1523
+ <div class="tsd-comment tsd-typography"><p>The root node of the binary tree or null. If null, the function will use the root node of the current binary tree instance.</p>
1586
1524
  </div>
1587
1525
  <div class="tsd-comment tsd-typography"></div></li>
1588
1526
  <li>
1589
- <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>
1590
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is an optional parameter that
1591
- specifies the property of the <code>BinaryTreeNode</code> object to collect at each level. It can be one of the following
1592
- values:</p>
1593
- </div>
1594
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1595
- <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>
1596
-
1527
+ <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></li></ul></div>
1528
+ <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>
1597
1529
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1598
1530
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#listLevels">listLevels</a></p>
1599
1531
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#listLevels">listLevels</a></p>
1600
1532
  <ul>
1601
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1081">src/data-structures/binary-tree/abstract-binary-tree.ts:1081</a></li></ul></aside></li>
1533
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L1205">src/data-structures/binary-tree/abstract-binary-tree.ts:1205</a></li></ul></aside></li>
1602
1534
  <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>
1603
1535
  <li class="tsd-description">
1604
- <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>
1536
+ <div class="tsd-comment tsd-typography"><p>Collects nodes from a binary tree by a specified property and organizes them into levels.</p>
1605
1537
  </div>
1606
1538
  <div class="tsd-parameters">
1607
1539
  <h4 class="tsd-parameters-title">Parameters</h4>
1608
1540
  <ul class="tsd-parameter-list">
1609
1541
  <li>
1610
1542
  <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>
1611
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
1612
- root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
1543
+ <div class="tsd-comment tsd-typography"><p>The root node of the binary tree or null. If null, the function will use the root node of the current binary tree instance.</p>
1613
1544
  </div>
1614
1545
  <div class="tsd-comment tsd-typography"></div></li>
1615
1546
  <li>
1616
1547
  <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>
1617
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is an optional parameter that
1618
- specifies the property of the <code>BinaryTreeNode</code> object to collect at each level. It can be one of the following
1619
- values:</p>
1548
+ <div class="tsd-comment tsd-typography"><p>The property of the BinaryTreeNode object to collect at each level.</p>
1620
1549
  </div>
1621
1550
  <div class="tsd-comment tsd-typography"></div></li></ul></div>
1622
- <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>
1551
+ <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>A 2D array of &#39;val&#39; properties from each node.</p>
1623
1552
 
1624
1553
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1625
1554
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#listLevels">listLevels</a></p>
1626
1555
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#listLevels">listLevels</a></p>
1627
1556
  <ul>
1628
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1083">src/data-structures/binary-tree/abstract-binary-tree.ts:1083</a></li></ul></aside></li>
1557
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L1213">src/data-structures/binary-tree/abstract-binary-tree.ts:1213</a></li></ul></aside></li>
1629
1558
  <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>
1630
1559
  <li class="tsd-description">
1631
- <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>
1560
+ <div class="tsd-comment tsd-typography"><p>Collects nodes from a binary tree by a specified property and organizes them into levels.</p>
1632
1561
  </div>
1633
1562
  <div class="tsd-parameters">
1634
1563
  <h4 class="tsd-parameters-title">Parameters</h4>
1635
1564
  <ul class="tsd-parameter-list">
1636
1565
  <li>
1637
1566
  <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>
1638
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
1639
- root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
1567
+ <div class="tsd-comment tsd-typography"><p>The root node of the binary tree or null. If null, the function will use the root node of the current binary tree instance.</p>
1640
1568
  </div>
1641
1569
  <div class="tsd-comment tsd-typography"></div></li>
1642
1570
  <li>
1643
1571
  <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>
1644
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is an optional parameter that
1645
- specifies the property of the <code>BinaryTreeNode</code> object to collect at each level. It can be one of the following
1646
- values:</p>
1572
+ <div class="tsd-comment tsd-typography"><p>The property of the BinaryTreeNode object to collect at each level.</p>
1647
1573
  </div>
1648
1574
  <div class="tsd-comment tsd-typography"></div></li></ul></div>
1649
- <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>
1575
+ <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>A 2D array of binary tree nodes.</p>
1650
1576
 
1651
1577
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1652
1578
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#listLevels">listLevels</a></p>
1653
1579
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#listLevels">listLevels</a></p>
1654
1580
  <ul>
1655
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1085">src/data-structures/binary-tree/abstract-binary-tree.ts:1085</a></li></ul></aside></li></ul></section>
1581
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L1221">src/data-structures/binary-tree/abstract-binary-tree.ts:1221</a></li></ul></aside></li></ul></section>
1656
1582
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="morris" class="tsd-anchor"></a>
1657
1583
  <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>
1658
1584
  <ul class="tsd-signatures tsd-is-inherited">
1659
1585
  <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>
1660
1586
  <li class="tsd-description">
1661
- <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
1662
- traversal algorithm.</p>
1587
+ <div class="tsd-comment tsd-typography"><p>Performs an in-order, pre-order, or post-order traversal on a binary tree using the Morris traversal algorithm.</p>
1663
1588
  </div>
1664
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an array of AbstractBinaryTreeNodeProperties<N> objects.</p>
1589
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>An array of binary tree node IDs.</p>
1665
1590
 
1666
1591
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1667
1592
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#morris">morris</a></p>
1668
1593
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#morris">morris</a></p>
1669
1594
  <ul>
1670
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1165">src/data-structures/binary-tree/abstract-binary-tree.ts:1165</a></li></ul></aside></li>
1595
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L1307">src/data-structures/binary-tree/abstract-binary-tree.ts:1307</a></li></ul></aside></li>
1671
1596
  <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>
1672
1597
  <li class="tsd-description">
1673
- <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
1674
- traversal algorithm.</p>
1598
+ <div class="tsd-comment tsd-typography"><p>Performs an in-order, pre-order, or post-order traversal on a binary tree using the Morris traversal algorithm and accumulates properties of each node based on the specified property name.</p>
1675
1599
  </div>
1676
1600
  <div class="tsd-parameters">
1677
1601
  <h4 class="tsd-parameters-title">Parameters</h4>
1678
1602
  <ul class="tsd-parameter-list">
1679
1603
  <li>
1680
1604
  <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>
1681
- <div class="tsd-comment tsd-typography"><p>The <code>pattern</code> parameter determines the traversal pattern for the binary
1682
- tree. It can have one of three values:</p>
1605
+ <div class="tsd-comment tsd-typography"><p>The traversal pattern: &#39;in&#39; (in-order), &#39;pre&#39; (pre-order), or &#39;post&#39; (post-order).</p>
1683
1606
  </div>
1684
1607
  <div class="tsd-comment tsd-typography"></div></li>
1685
1608
  <li>
1686
1609
  <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>
1687
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is used to specify the
1688
- property name of the nodes that you want to retrieve. It can be any valid property name of the nodes in the binary
1689
- tree.</p>
1610
+ <div class="tsd-comment tsd-typography"><p>The name of the property to accumulate.</p>
1690
1611
  </div>
1691
1612
  <div class="tsd-comment tsd-typography"></div></li></ul></div>
1692
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>an array of AbstractBinaryTreeNodeProperties<N> objects.</p>
1613
+ <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></h4><p>An array of values corresponding to the specified property.</p>
1693
1614
 
1694
1615
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1695
1616
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#morris">morris</a></p>
1696
1617
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#morris">morris</a></p>
1697
1618
  <ul>
1698
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1167">src/data-structures/binary-tree/abstract-binary-tree.ts:1167</a></li></ul></aside></li>
1619
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L1315">src/data-structures/binary-tree/abstract-binary-tree.ts:1315</a></li></ul></aside></li>
1699
1620
  <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>
1700
1621
  <li class="tsd-description">
1701
- <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
1702
- traversal algorithm.</p>
1622
+ <div class="tsd-comment tsd-typography"><p>Performs an in-order, pre-order, or post-order traversal on a binary tree using the Morris traversal algorithm and accumulates the &#39;val&#39; property of each node.</p>
1703
1623
  </div>
1704
1624
  <div class="tsd-parameters">
1705
1625
  <h4 class="tsd-parameters-title">Parameters</h4>
1706
1626
  <ul class="tsd-parameter-list">
1707
1627
  <li>
1708
1628
  <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>
1709
- <div class="tsd-comment tsd-typography"><p>The <code>pattern</code> parameter determines the traversal pattern for the binary
1710
- tree. It can have one of three values:</p>
1629
+ <div class="tsd-comment tsd-typography"><p>The traversal pattern: &#39;in&#39; (in-order), &#39;pre&#39; (pre-order), or &#39;post&#39; (post-order).</p>
1711
1630
  </div>
1712
1631
  <div class="tsd-comment tsd-typography"></div></li>
1713
1632
  <li>
1714
1633
  <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>
1715
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is used to specify the
1716
- property name of the nodes that you want to retrieve. It can be any valid property name of the nodes in the binary
1717
- tree.</p>
1634
+ <div class="tsd-comment tsd-typography"><p>The property of the BinaryTreeNode object to collect at each level.</p>
1718
1635
  </div>
1719
1636
  <div class="tsd-comment tsd-typography"></div></li></ul></div>
1720
- <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 AbstractBinaryTreeNodeProperties<N> objects.</p>
1637
+ <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 &#39;val&#39; properties from each node.</p>
1721
1638
 
1722
1639
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1723
1640
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#morris">morris</a></p>
1724
1641
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#morris">morris</a></p>
1725
1642
  <ul>
1726
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1169">src/data-structures/binary-tree/abstract-binary-tree.ts:1169</a></li></ul></aside></li>
1643
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L1323">src/data-structures/binary-tree/abstract-binary-tree.ts:1323</a></li></ul></aside></li>
1727
1644
  <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>
1728
1645
  <li class="tsd-description">
1729
- <div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
1730
- Space complexity of Iterative DFS equals to recursive DFS which is O(n) because of the stack</p>
1646
+ <div class="tsd-comment tsd-typography"><p>Performs an in-order, pre-order, or post-order traversal on a binary tree using the Morris traversal algorithm and accumulates nodes themselves.</p>
1731
1647
  </div>
1732
1648
  <div class="tsd-parameters">
1733
1649
  <h4 class="tsd-parameters-title">Parameters</h4>
1734
1650
  <ul class="tsd-parameter-list">
1735
1651
  <li>
1736
- <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></li>
1652
+ <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>
1653
+ <div class="tsd-comment tsd-typography"><p>The traversal pattern: &#39;in&#39; (in-order), &#39;pre&#39; (pre-order), or &#39;post&#39; (post-order).</p>
1654
+ </div>
1655
+ <div class="tsd-comment tsd-typography"></div></li>
1737
1656
  <li>
1738
- <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></li></ul></div>
1739
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4>
1657
+ <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>
1658
+ <div class="tsd-comment tsd-typography"><p>The property of the BinaryTreeNode object to collect at each level.</p>
1659
+ </div>
1660
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
1661
+ <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 binary tree nodes.</p>
1662
+
1740
1663
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1741
1664
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#morris">morris</a></p>
1742
1665
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#morris">morris</a></p>
1743
1666
  <ul>
1744
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L1176">src/data-structures/binary-tree/abstract-binary-tree.ts:1176</a></li></ul></aside></li></ul></section>
1667
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L1331">src/data-structures/binary-tree/abstract-binary-tree.ts:1331</a></li></ul></aside></li></ul></section>
1745
1668
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="perfectlyBalance" class="tsd-anchor"></a>
1746
1669
  <h3 class="tsd-anchor-link"><span>perfectly<wbr/>Balance</span><a href="#perfectlyBalance" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
1747
1670
  <ul class="tsd-signatures tsd-is-inherited">
@@ -1756,7 +1679,7 @@ constructs a balanced binary search tree using either a recursive or iterative a
1756
1679
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#perfectlyBalance">perfectlyBalance</a></p>
1757
1680
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#perfectlyBalance">perfectlyBalance</a></p>
1758
1681
  <ul>
1759
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/bst.ts#L440">src/data-structures/binary-tree/bst.ts:440</a></li></ul></aside></li></ul></section>
1682
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/bst.ts#L434">src/data-structures/binary-tree/bst.ts:434</a></li></ul></aside></li></ul></section>
1760
1683
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="remove" class="tsd-anchor"></a>
1761
1684
  <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>
1762
1685
  <ul class="tsd-signatures tsd-is-inherited">
@@ -1787,7 +1710,7 @@ determines whether to update the left sum of all nodes in the binary tree after
1787
1710
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#remove">remove</a></p>
1788
1711
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#remove">remove</a></p>
1789
1712
  <ul>
1790
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L360">src/data-structures/binary-tree/abstract-binary-tree.ts:360</a></li></ul></aside></li></ul></section>
1713
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L360">src/data-structures/binary-tree/abstract-binary-tree.ts:360</a></li></ul></aside></li></ul></section>
1791
1714
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="subTreeAdd" class="tsd-anchor"></a>
1792
1715
  <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>
1793
1716
  <ul class="tsd-signatures tsd-is-inherited">
@@ -1822,7 +1745,7 @@ specifies the property of the binary tree node that should be modified. If not p
1822
1745
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#subTreeAdd">subTreeAdd</a></p>
1823
1746
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#subTreeAdd">subTreeAdd</a></p>
1824
1747
  <ul>
1825
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L845">src/data-structures/binary-tree/abstract-binary-tree.ts:845</a></li></ul></aside></li></ul></section>
1748
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L882">src/data-structures/binary-tree/abstract-binary-tree.ts:882</a></li></ul></aside></li></ul></section>
1826
1749
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="subTreeSum" class="tsd-anchor"></a>
1827
1750
  <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>
1828
1751
  <ul class="tsd-signatures tsd-is-inherited">
@@ -1852,7 +1775,7 @@ not provided, it defaults to &#39;id&#39;.</p>
1852
1775
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#subTreeSum">subTreeSum</a></p>
1853
1776
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#subTreeSum">subTreeSum</a></p>
1854
1777
  <ul>
1855
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L789">src/data-structures/binary-tree/abstract-binary-tree.ts:789</a></li></ul></aside></li></ul></section>
1778
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L826">src/data-structures/binary-tree/abstract-binary-tree.ts:826</a></li></ul></aside></li></ul></section>
1856
1779
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="swapLocation" class="tsd-anchor"></a>
1857
1780
  <h3 class="tsd-anchor-link"><span>swap<wbr/>Location</span><a href="#swapLocation" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="#icon-anchor"></use></svg></a></h3>
1858
1781
  <ul class="tsd-signatures tsd-is-inherited">
@@ -1880,7 +1803,7 @@ be swapped to.</p>
1880
1803
  <p>Implementation of <a href="../interfaces/IRBTree.html">IRBTree</a>.<a href="../interfaces/IRBTree.html#swapLocation">swapLocation</a></p>
1881
1804
  <p>Inherited from <a href="BST.html">BST</a>.<a href="BST.html#swapLocation">swapLocation</a></p>
1882
1805
  <ul>
1883
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L205">src/data-structures/binary-tree/abstract-binary-tree.ts:205</a></li></ul></aside></li></ul></section></section></div>
1806
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L205">src/data-structures/binary-tree/abstract-binary-tree.ts:205</a></li></ul></aside></li></ul></section></section></div>
1884
1807
  <div class="col-sidebar">
1885
1808
  <div class="page-menu">
1886
1809
  <div class="tsd-navigation settings">