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
@@ -33,7 +33,7 @@
33
33
  <ul class="tsd-hierarchy">
34
34
  <li><a href="../types/IBinaryTree.html" class="tsd-signature-type tsd-kind-type-alias">IBinaryTree</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">
35
35
  <ul>
36
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/binary-tree.ts#L22">src/data-structures/binary-tree/binary-tree.ts:22</a></li></ul></aside>
36
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/binary-tree.ts#L22">src/data-structures/binary-tree/binary-tree.ts:22</a></li></ul></aside>
37
37
  <section class="tsd-panel-group tsd-index-group">
38
38
  <section class="tsd-panel tsd-index-panel">
39
39
  <details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
@@ -126,7 +126,7 @@ different configuration options.</p>
126
126
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
127
127
  <p>Overrides <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.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/binary-tree.ts#L32">src/data-structures/binary-tree/binary-tree.ts:32</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/binary-tree.ts#L32">src/data-structures/binary-tree/binary-tree.ts:32</a></li></ul></aside></li></ul></section></section>
130
130
  <section class="tsd-panel-group tsd-member-group">
131
131
  <h2>Accessors</h2>
132
132
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="loopType" class="tsd-anchor"></a>
@@ -138,7 +138,7 @@ different configuration options.</p>
138
138
  <p>Implementation of IBinaryTree.loopType</p>
139
139
  <p>Inherited from AbstractBinaryTree.loopType</p>
140
140
  <ul>
141
- <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>
141
+ <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>
142
142
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="root" class="tsd-anchor"></a>
143
143
  <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>
144
144
  <ul class="tsd-signatures tsd-is-inherited">
@@ -148,7 +148,7 @@ different configuration options.</p>
148
148
  <p>Implementation of IBinaryTree.root</p>
149
149
  <p>Inherited from AbstractBinaryTree.root</p>
150
150
  <ul>
151
- <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>
151
+ <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>
152
152
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="size" class="tsd-anchor"></a>
153
153
  <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>
154
154
  <ul class="tsd-signatures tsd-is-inherited">
@@ -158,7 +158,7 @@ different configuration options.</p>
158
158
  <p>Implementation of IBinaryTree.size</p>
159
159
  <p>Inherited from AbstractBinaryTree.size</p>
160
160
  <ul>
161
- <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>
161
+ <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>
162
162
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedId" class="tsd-anchor"></a>
163
163
  <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>
164
164
  <ul class="tsd-signatures tsd-is-inherited">
@@ -168,7 +168,7 @@ different configuration options.</p>
168
168
  <p>Implementation of IBinaryTree.visitedId</p>
169
169
  <p>Inherited from AbstractBinaryTree.visitedId</p>
170
170
  <ul>
171
- <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>
171
+ <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>
172
172
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedLeftSum" class="tsd-anchor"></a>
173
173
  <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>
174
174
  <ul class="tsd-signatures tsd-is-inherited">
@@ -178,7 +178,7 @@ different configuration options.</p>
178
178
  <p>Implementation of IBinaryTree.visitedLeftSum</p>
179
179
  <p>Inherited from AbstractBinaryTree.visitedLeftSum</p>
180
180
  <ul>
181
- <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>
181
+ <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>
182
182
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedNode" class="tsd-anchor"></a>
183
183
  <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>
184
184
  <ul class="tsd-signatures tsd-is-inherited">
@@ -188,7 +188,7 @@ different configuration options.</p>
188
188
  <p>Implementation of IBinaryTree.visitedNode</p>
189
189
  <p>Inherited from AbstractBinaryTree.visitedNode</p>
190
190
  <ul>
191
- <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>
191
+ <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>
192
192
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="visitedVal" class="tsd-anchor"></a>
193
193
  <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>
194
194
  <ul class="tsd-signatures tsd-is-inherited">
@@ -198,7 +198,7 @@ different configuration options.</p>
198
198
  <p>Implementation of IBinaryTree.visitedVal</p>
199
199
  <p>Inherited from AbstractBinaryTree.visitedVal</p>
200
200
  <ul>
201
- <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>
201
+ <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>
202
202
  <section class="tsd-panel-group tsd-member-group">
203
203
  <h2>Methods</h2>
204
204
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="BFS" class="tsd-anchor"></a>
@@ -206,290 +206,244 @@ different configuration options.</p>
206
206
  <ul class="tsd-signatures tsd-is-inherited">
207
207
  <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>
208
208
  <li class="tsd-description">
209
- <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
210
- specified property name.</p>
209
+ <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>
211
210
  </div>
212
- <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>
211
+ <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>
213
212
 
214
213
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
215
214
  <p>Implementation of IBinaryTree.BFS</p>
216
215
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#BFS">BFS</a></p>
217
216
  <ul>
218
- <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>
217
+ <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>
219
218
  <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>
220
219
  <li class="tsd-description">
221
- <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
222
- specified property name.</p>
220
+ <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>
223
221
  </div>
224
222
  <div class="tsd-parameters">
225
223
  <h4 class="tsd-parameters-title">Parameters</h4>
226
224
  <ul class="tsd-parameter-list">
227
225
  <li>
228
226
  <h5><span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;id&quot;</span></h5>
229
- <div class="tsd-comment tsd-typography"><p>The parameter <code>nodeOrPropertyName</code> is an optional parameter that
230
- represents either a node or a property name. If a node is provided, the breadth-first search (BFS) algorithm will be
231
- performed starting from that node. If a property name is provided, the BFS algorithm will be performed starting from
232
- the</p>
227
+ <div class="tsd-comment tsd-typography"><p>The name of the property to accumulate.</p>
233
228
  </div>
234
229
  <div class="tsd-comment tsd-typography"></div></li></ul></div>
235
- <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>
230
+ <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>
236
231
 
237
232
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
238
233
  <p>Implementation of IBinaryTree.BFS</p>
239
234
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#BFS">BFS</a></p>
240
235
  <ul>
241
- <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>
236
+ <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>
242
237
  <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>
243
238
  <li class="tsd-description">
244
- <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
245
- specified property name.</p>
239
+ <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>
246
240
  </div>
247
241
  <div class="tsd-parameters">
248
242
  <h4 class="tsd-parameters-title">Parameters</h4>
249
243
  <ul class="tsd-parameter-list">
250
244
  <li>
251
245
  <h5><span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;val&quot;</span></h5>
252
- <div class="tsd-comment tsd-typography"><p>The parameter <code>nodeOrPropertyName</code> is an optional parameter that
253
- represents either a node or a property name. If a node is provided, the breadth-first search (BFS) algorithm will be
254
- performed starting from that node. If a property name is provided, the BFS algorithm will be performed starting from
255
- the</p>
246
+ <div class="tsd-comment tsd-typography"><p>The name of the property to accumulate.</p>
256
247
  </div>
257
248
  <div class="tsd-comment tsd-typography"></div></li></ul></div>
258
- <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>
249
+ <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>
259
250
 
260
251
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
261
252
  <p>Implementation of IBinaryTree.BFS</p>
262
253
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#BFS">BFS</a></p>
263
254
  <ul>
264
- <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>
255
+ <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>
265
256
  <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>
266
257
  <li class="tsd-description">
267
- <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
268
- specified property name.</p>
258
+ <div class="tsd-comment tsd-typography"><p>Performs a breadth-first search (BFS) on a binary tree, accumulating nodes themselves.</p>
269
259
  </div>
270
260
  <div class="tsd-parameters">
271
261
  <h4 class="tsd-parameters-title">Parameters</h4>
272
262
  <ul class="tsd-parameter-list">
273
263
  <li>
274
264
  <h5><span class="tsd-kind-parameter">nodeOrPropertyName</span>: <span class="tsd-signature-type">&quot;node&quot;</span></h5>
275
- <div class="tsd-comment tsd-typography"><p>The parameter <code>nodeOrPropertyName</code> is an optional parameter that
276
- represents either a node or a property name. If a node is provided, the breadth-first search (BFS) algorithm will be
277
- performed starting from that node. If a property name is provided, the BFS algorithm will be performed starting from
278
- the</p>
265
+ <div class="tsd-comment tsd-typography"><p>The name of the property to accumulate.</p>
279
266
  </div>
280
267
  <div class="tsd-comment tsd-typography"></div></li></ul></div>
281
- <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>
268
+ <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>
282
269
 
283
270
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
284
271
  <p>Implementation of IBinaryTree.BFS</p>
285
272
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#BFS">BFS</a></p>
286
273
  <ul>
287
- <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>
274
+ <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>
288
275
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="DFS" class="tsd-anchor"></a>
289
276
  <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>
290
277
  <ul class="tsd-signatures tsd-is-inherited">
291
278
  <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>
292
279
  <li class="tsd-description">
293
- <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
294
- each node based on the specified pattern and property name.</p>
280
+ <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>
295
281
  </div>
296
- <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
297
- binary tree nodes based on the specified pattern and node or property name.</p>
282
+ <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>
298
283
 
299
284
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
300
285
  <p>Implementation of IBinaryTree.DFS</p>
301
286
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#DFS">DFS</a></p>
302
287
  <ul>
303
- <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>
288
+ <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>
304
289
  <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>
305
290
  <li class="tsd-description">
306
- <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
307
- each node based on the specified pattern and property name.</p>
291
+ <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>
308
292
  </div>
309
293
  <div class="tsd-parameters">
310
294
  <h4 class="tsd-parameters-title">Parameters</h4>
311
295
  <ul class="tsd-parameter-list">
312
296
  <li>
313
297
  <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>
314
- <div class="tsd-comment tsd-typography"><p>The &quot;pattern&quot; parameter is used to specify the traversal order of the
315
- binary tree. It can have three possible values:</p>
298
+ <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>
316
299
  </div>
317
300
  <div class="tsd-comment tsd-typography"></div></li>
318
301
  <li>
319
302
  <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>
320
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is a string that represents
321
- the name of a property of the nodes in the binary tree. This property will be used to accumulate values during the
322
- depth-first search traversal. If no <code>nodeOrPropertyName</code> is provided, the default value is <code>&#39;id&#39;</code>.</p>
303
+ <div class="tsd-comment tsd-typography"><p>The name of the property to accumulate.</p>
323
304
  </div>
324
305
  <div class="tsd-comment tsd-typography"></div></li></ul></div>
325
- <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
326
- binary tree nodes based on the specified pattern and node or property name.</p>
306
+ <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>
327
307
 
328
308
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
329
309
  <p>Implementation of IBinaryTree.DFS</p>
330
310
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#DFS">DFS</a></p>
331
311
  <ul>
332
- <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>
312
+ <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>
333
313
  <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>
334
314
  <li class="tsd-description">
335
- <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
336
- each node based on the specified pattern and property name.</p>
315
+ <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>
337
316
  </div>
338
317
  <div class="tsd-parameters">
339
318
  <h4 class="tsd-parameters-title">Parameters</h4>
340
319
  <ul class="tsd-parameter-list">
341
320
  <li>
342
321
  <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>
343
- <div class="tsd-comment tsd-typography"><p>The &quot;pattern&quot; parameter is used to specify the traversal order of the
344
- binary tree. It can have three possible values:</p>
322
+ <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>
345
323
  </div>
346
324
  <div class="tsd-comment tsd-typography"></div></li>
347
325
  <li>
348
326
  <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>
349
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is a string that represents
350
- the name of a property of the nodes in the binary tree. This property will be used to accumulate values during the
351
- depth-first search traversal. If no <code>nodeOrPropertyName</code> is provided, the default value is <code>&#39;id&#39;</code>.</p>
327
+ <div class="tsd-comment tsd-typography"><p>The name of the property to accumulate.</p>
352
328
  </div>
353
329
  <div class="tsd-comment tsd-typography"></div></li></ul></div>
354
- <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
355
- binary tree nodes based on the specified pattern and node or property name.</p>
330
+ <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>
356
331
 
357
332
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
358
333
  <p>Implementation of IBinaryTree.DFS</p>
359
334
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#DFS">DFS</a></p>
360
335
  <ul>
361
- <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>
336
+ <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>
362
337
  <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>
363
338
  <li class="tsd-description">
364
- <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
365
- each node based on the specified pattern and property name.</p>
339
+ <div class="tsd-comment tsd-typography"><p>Performs a depth-first search (DFS) traversal on a binary tree and accumulates nodes themselves.</p>
366
340
  </div>
367
341
  <div class="tsd-parameters">
368
342
  <h4 class="tsd-parameters-title">Parameters</h4>
369
343
  <ul class="tsd-parameter-list">
370
344
  <li>
371
345
  <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>
372
- <div class="tsd-comment tsd-typography"><p>The &quot;pattern&quot; parameter is used to specify the traversal order of the
373
- binary tree. It can have three possible values:</p>
346
+ <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>
374
347
  </div>
375
348
  <div class="tsd-comment tsd-typography"></div></li>
376
349
  <li>
377
350
  <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>
378
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is a string that represents
379
- the name of a property of the nodes in the binary tree. This property will be used to accumulate values during the
380
- depth-first search traversal. If no <code>nodeOrPropertyName</code> is provided, the default value is <code>&#39;id&#39;</code>.</p>
351
+ <div class="tsd-comment tsd-typography"><p>The name of the property to accumulate.</p>
381
352
  </div>
382
353
  <div class="tsd-comment tsd-typography"></div></li></ul></div>
383
- <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
384
- binary tree nodes based on the specified pattern and node or property name.</p>
354
+ <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>
385
355
 
386
356
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
387
357
  <p>Implementation of IBinaryTree.DFS</p>
388
358
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#DFS">DFS</a></p>
389
359
  <ul>
390
- <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>
360
+ <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>
391
361
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="DFSIterative" class="tsd-anchor"></a>
392
362
  <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>
393
363
  <ul class="tsd-signatures tsd-is-inherited">
394
364
  <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>
395
365
  <li class="tsd-description">
396
- <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
397
- specify the traversal pattern and the property name to accumulate results by.</p>
366
+ <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>
398
367
  </div>
399
- <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>
368
+ <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>
400
369
 
401
370
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
402
371
  <p>Implementation of IBinaryTree.DFSIterative</p>
403
372
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#DFSIterative">DFSIterative</a></p>
404
373
  <ul>
405
- <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>
374
+ <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>
406
375
  <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>
407
376
  <li class="tsd-description">
408
- <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
409
- specify the traversal pattern and the property name to accumulate results by.</p>
377
+ <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>
410
378
  </div>
411
379
  <div class="tsd-parameters">
412
380
  <h4 class="tsd-parameters-title">Parameters</h4>
413
381
  <ul class="tsd-parameter-list">
414
382
  <li>
415
383
  <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>
416
- <div class="tsd-comment tsd-typography"><p>The &quot;pattern&quot; parameter determines the order in which the nodes of the
417
- binary tree are visited during the depth-first search. It can have one of the following values:</p>
384
+ <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>
418
385
  </div>
419
386
  <div class="tsd-comment tsd-typography"></div></li>
420
387
  <li>
421
388
  <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>
422
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is used to specify the
423
- property of the nodes that you want to retrieve or perform operations on during the depth-first search traversal. By
424
- 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
425
- the</p>
389
+ <div class="tsd-comment tsd-typography"><p>The name of the property to accumulate.</p>
426
390
  </div>
427
391
  <div class="tsd-comment tsd-typography"></div></li></ul></div>
428
- <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>
392
+ <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>
429
393
 
430
394
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
431
395
  <p>Implementation of IBinaryTree.DFSIterative</p>
432
396
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#DFSIterative">DFSIterative</a></p>
433
397
  <ul>
434
- <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>
398
+ <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>
435
399
  <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>
436
400
  <li class="tsd-description">
437
- <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
438
- specify the traversal pattern and the property name to accumulate results by.</p>
401
+ <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>
439
402
  </div>
440
403
  <div class="tsd-parameters">
441
404
  <h4 class="tsd-parameters-title">Parameters</h4>
442
405
  <ul class="tsd-parameter-list">
443
406
  <li>
444
407
  <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>
445
- <div class="tsd-comment tsd-typography"><p>The &quot;pattern&quot; parameter determines the order in which the nodes of the
446
- binary tree are visited during the depth-first search. It can have one of the following values:</p>
408
+ <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>
447
409
  </div>
448
410
  <div class="tsd-comment tsd-typography"></div></li>
449
411
  <li>
450
412
  <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>
451
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is used to specify the
452
- property of the nodes that you want to retrieve or perform operations on during the depth-first search traversal. By
453
- 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
454
- the</p>
413
+ <div class="tsd-comment tsd-typography"><p>The name of the property to accumulate.</p>
455
414
  </div>
456
415
  <div class="tsd-comment tsd-typography"></div></li></ul></div>
457
- <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>
416
+ <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>
458
417
 
459
418
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
460
419
  <p>Implementation of IBinaryTree.DFSIterative</p>
461
420
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#DFSIterative">DFSIterative</a></p>
462
421
  <ul>
463
- <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>
422
+ <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>
464
423
  <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>
465
424
  <li class="tsd-description">
466
- <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
467
- specify the traversal pattern and the property name to accumulate results by.</p>
425
+ <div class="tsd-comment tsd-typography"><p>Performs an iterative depth-first search (DFS) traversal on a binary tree and accumulates nodes themselves.</p>
468
426
  </div>
469
427
  <div class="tsd-parameters">
470
428
  <h4 class="tsd-parameters-title">Parameters</h4>
471
429
  <ul class="tsd-parameter-list">
472
430
  <li>
473
431
  <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>
474
- <div class="tsd-comment tsd-typography"><p>The &quot;pattern&quot; parameter determines the order in which the nodes of the
475
- binary tree are visited during the depth-first search. It can have one of the following values:</p>
432
+ <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>
476
433
  </div>
477
434
  <div class="tsd-comment tsd-typography"></div></li>
478
435
  <li>
479
436
  <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>
480
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is used to specify the
481
- property of the nodes that you want to retrieve or perform operations on during the depth-first search traversal. By
482
- 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
483
- the</p>
437
+ <div class="tsd-comment tsd-typography"><p>The name of the property to accumulate.</p>
484
438
  </div>
485
439
  <div class="tsd-comment tsd-typography"></div></li></ul></div>
486
- <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>
440
+ <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>
487
441
 
488
442
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
489
443
  <p>Implementation of IBinaryTree.DFSIterative</p>
490
444
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#DFSIterative">DFSIterative</a></p>
491
445
  <ul>
492
- <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>
446
+ <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>
493
447
  <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_accumulatedByPropertyName" class="tsd-anchor"></a>
494
448
  <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>
495
449
  <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
@@ -516,7 +470,7 @@ specifies the property name to be used for accumulating values. If it is a <code
516
470
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
517
471
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#_accumulatedByPropertyName">_accumulatedByPropertyName</a></p>
518
472
  <ul>
519
- <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>
473
+ <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>
520
474
  <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_addTo" class="tsd-anchor"></a>
521
475
  <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>
522
476
  <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
@@ -546,7 +500,7 @@ undefined.</p>
546
500
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
547
501
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#_addTo">_addTo</a></p>
548
502
  <ul>
549
- <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>
503
+ <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>
550
504
  <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_clearResults" class="tsd-anchor"></a>
551
505
  <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>
552
506
  <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
@@ -559,7 +513,7 @@ properties.</p>
559
513
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
560
514
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#_clearResults">_clearResults</a></p>
561
515
  <ul>
562
- <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>
516
+ <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>
563
517
  <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_getResultByPropertyName" class="tsd-anchor"></a>
564
518
  <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>
565
519
  <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
@@ -582,7 +536,7 @@ can accept either a <code>NodeOrPropertyName</code> type or be undefined.</p>
582
536
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
583
537
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#_getResultByPropertyName">_getResultByPropertyName</a></p>
584
538
  <ul>
585
- <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>
539
+ <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>
586
540
  <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_pushByPropertyNameStopOrNot" class="tsd-anchor"></a>
587
541
  <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>
588
542
  <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
@@ -629,7 +583,7 @@ stop after finding the first matching node or continue searching for all matchin
629
583
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
630
584
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#_pushByPropertyNameStopOrNot">_pushByPropertyNameStopOrNot</a></p>
631
585
  <ul>
632
- <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>
586
+ <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>
633
587
  <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setLoopType" class="tsd-anchor"></a>
634
588
  <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>
635
589
  <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
@@ -649,7 +603,7 @@ stop after finding the first matching node or continue searching for all matchin
649
603
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
650
604
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#_setLoopType">_setLoopType</a></p>
651
605
  <ul>
652
- <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>
606
+ <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>
653
607
  <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setRoot" class="tsd-anchor"></a>
654
608
  <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>
655
609
  <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
@@ -670,7 +624,7 @@ parent property of the value to undefined.</p>
670
624
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
671
625
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#_setRoot">_setRoot</a></p>
672
626
  <ul>
673
- <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>
627
+ <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>
674
628
  <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setSize" class="tsd-anchor"></a>
675
629
  <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>
676
630
  <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
@@ -690,7 +644,7 @@ parent property of the value to undefined.</p>
690
644
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
691
645
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#_setSize">_setSize</a></p>
692
646
  <ul>
693
- <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>
647
+ <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>
694
648
  <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setVisitedId" class="tsd-anchor"></a>
695
649
  <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>
696
650
  <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
@@ -710,7 +664,7 @@ parent property of the value to undefined.</p>
710
664
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
711
665
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#_setVisitedId">_setVisitedId</a></p>
712
666
  <ul>
713
- <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>
667
+ <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>
714
668
  <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setVisitedLeftSum" class="tsd-anchor"></a>
715
669
  <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>
716
670
  <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
@@ -730,7 +684,7 @@ parent property of the value to undefined.</p>
730
684
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
731
685
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#_setVisitedLeftSum">_setVisitedLeftSum</a></p>
732
686
  <ul>
733
- <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>
687
+ <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>
734
688
  <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setVisitedNode" class="tsd-anchor"></a>
735
689
  <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>
736
690
  <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
@@ -750,7 +704,7 @@ parent property of the value to undefined.</p>
750
704
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
751
705
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#_setVisitedNode">_setVisitedNode</a></p>
752
706
  <ul>
753
- <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>
707
+ <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>
754
708
  <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="_setVisitedVal" class="tsd-anchor"></a>
755
709
  <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>
756
710
  <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
@@ -770,7 +724,7 @@ parent property of the value to undefined.</p>
770
724
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
771
725
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#_setVisitedVal">_setVisitedVal</a></p>
772
726
  <ul>
773
- <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>
727
+ <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>
774
728
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="add" class="tsd-anchor"></a>
775
729
  <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>
776
730
  <ul class="tsd-signatures tsd-is-inherited">
@@ -800,7 +754,7 @@ being added to the binary tree.</p>
800
754
  <p>Implementation of IBinaryTree.add</p>
801
755
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#add">add</a></p>
802
756
  <ul>
803
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L255">src/data-structures/binary-tree/abstract-binary-tree.ts:255</a></li></ul></aside></li></ul></section>
757
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L255">src/data-structures/binary-tree/abstract-binary-tree.ts:255</a></li></ul></aside></li></ul></section>
804
758
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="addMany" class="tsd-anchor"></a>
805
759
  <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>
806
760
  <ul class="tsd-signatures tsd-is-inherited">
@@ -831,7 +785,7 @@ the value of the nodes will be <code>undefined</code>.</p>
831
785
  <p>Implementation of IBinaryTree.addMany</p>
832
786
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#addMany">addMany</a></p>
833
787
  <ul>
834
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L314">src/data-structures/binary-tree/abstract-binary-tree.ts:314</a></li></ul></aside></li></ul></section>
788
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L314">src/data-structures/binary-tree/abstract-binary-tree.ts:314</a></li></ul></aside></li></ul></section>
835
789
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="clear" class="tsd-anchor"></a>
836
790
  <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>
837
791
  <ul class="tsd-signatures tsd-is-inherited">
@@ -844,7 +798,7 @@ the value of the nodes will be <code>undefined</code>.</p>
844
798
  <p>Implementation of IBinaryTree.clear</p>
845
799
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#clear">clear</a></p>
846
800
  <ul>
847
- <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>
801
+ <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>
848
802
  <section class="tsd-panel tsd-member"><a id="createNode" class="tsd-anchor"></a>
849
803
  <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>
850
804
  <ul class="tsd-signatures">
@@ -873,7 +827,7 @@ stored in the node.</p>
873
827
  <p>Implementation of IBinaryTree.createNode</p>
874
828
  <p>Overrides <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#createNode">createNode</a></p>
875
829
  <ul>
876
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/binary-tree.ts#L44">src/data-structures/binary-tree/binary-tree.ts:44</a></li></ul></aside></li></ul></section>
830
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/binary-tree.ts#L44">src/data-structures/binary-tree/binary-tree.ts:44</a></li></ul></aside></li></ul></section>
877
831
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="fill" class="tsd-anchor"></a>
878
832
  <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>
879
833
  <ul class="tsd-signatures tsd-is-inherited">
@@ -903,7 +857,7 @@ array. Each value in the <code>data</code> array will be assigned to the</p>
903
857
  <p>Implementation of IBinaryTree.fill</p>
904
858
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#fill">fill</a></p>
905
859
  <ul>
906
- <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>
860
+ <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>
907
861
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="get" class="tsd-anchor"></a>
908
862
  <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>
909
863
  <ul class="tsd-signatures tsd-is-inherited">
@@ -935,7 +889,7 @@ If no matching node is found, it returns null.</p>
935
889
  <p>Implementation of IBinaryTree.get</p>
936
890
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#get">get</a></p>
937
891
  <ul>
938
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L599">src/data-structures/binary-tree/abstract-binary-tree.ts:599</a></li></ul></aside></li></ul></section>
892
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L599">src/data-structures/binary-tree/abstract-binary-tree.ts:599</a></li></ul></aside></li></ul></section>
939
893
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getDepth" class="tsd-anchor"></a>
940
894
  <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>
941
895
  <ul class="tsd-signatures tsd-is-inherited">
@@ -957,7 +911,7 @@ If no matching node is found, it returns null.</p>
957
911
  <p>Implementation of IBinaryTree.getDepth</p>
958
912
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#getDepth">getDepth</a></p>
959
913
  <ul>
960
- <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>
914
+ <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>
961
915
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getHeight" class="tsd-anchor"></a>
962
916
  <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>
963
917
  <ul class="tsd-signatures tsd-is-inherited">
@@ -981,43 +935,52 @@ node), or <code>null</code>.</p>
981
935
  <p>Implementation of IBinaryTree.getHeight</p>
982
936
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#getHeight">getHeight</a></p>
983
937
  <ul>
984
- <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>
938
+ <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>
985
939
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getLeftMost" class="tsd-anchor"></a>
986
940
  <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>
987
941
  <ul class="tsd-signatures tsd-is-inherited">
988
942
  <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>
989
943
  <li class="tsd-description">
990
- <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
991
- no node is specified.</p>
944
+ <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
945
+ no node is specified.
946
+ generic type representing a node in a binary tree), <code>BinaryTreeNodeId</code> (a type representing the ID of a binary tree
947
+ node), or <code>null</code>.</p>
992
948
  </div>
993
949
  <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
994
- provided, it starts the traversal from that node. If <code>beginRoot</code> is not provided or is <code>null</code>, it starts the
995
- traversal from the root of the binary tree. If there are no nodes in the binary tree, it returns <code>null</code>.</p>
950
+ provided, it starts the traversal from that node. If <code>beginRoot</code> is not provided or is <code>null</code>, it starts the traversal
951
+ from the root of the binary tree. The function returns the leftmost node found during the traversal. If no leftmost
952
+ node is found (</p>
996
953
 
997
954
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
998
955
  <p>Implementation of IBinaryTree.getLeftMost</p>
999
956
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#getLeftMost">getLeftMost</a></p>
1000
957
  <ul>
1001
- <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>
1002
- <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>
958
+ <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>
959
+ <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>
1003
960
  <li class="tsd-description">
1004
- <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
961
+ <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
1005
962
  no node is specified.</p>
1006
963
  </div>
1007
964
  <div class="tsd-parameters">
1008
965
  <h4 class="tsd-parameters-title">Parameters</h4>
1009
966
  <ul class="tsd-parameter-list">
1010
967
  <li>
1011
- <h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5></li></ul></div>
968
+ <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>
969
+ <div class="tsd-comment tsd-typography"><p>The <code>beginRoot</code> parameter is optional and can be of type <code>N</code> (a
970
+ generic type representing a node in a binary tree), <code>BinaryTreeNodeId</code> (a type representing the ID of a binary tree
971
+ node).</p>
972
+ </div>
973
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
1012
974
  <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
1013
- provided, it starts the traversal from that node. If <code>beginRoot</code> is not provided or is <code>null</code>, it starts the
1014
- traversal from the root of the binary tree. If there are no nodes in the binary tree, it returns <code>null</code>.</p>
975
+ provided, it starts the traversal from that node. If <code>beginRoot</code> is not provided or is <code>null</code>, it starts the traversal
976
+ from the root of the binary tree. The function returns the leftmost node found during the traversal. If no leftmost
977
+ node is found (</p>
1015
978
 
1016
979
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1017
980
  <p>Implementation of IBinaryTree.getLeftMost</p>
1018
981
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#getLeftMost">getLeftMost</a></p>
1019
982
  <ul>
1020
- <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>
983
+ <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>
1021
984
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getMinHeight" class="tsd-anchor"></a>
1022
985
  <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>
1023
986
  <ul class="tsd-signatures tsd-is-inherited">
@@ -1042,7 +1005,7 @@ for <code>beginRoot</code>, the <code>this.root</code> property is used as the d
1042
1005
  <p>Implementation of IBinaryTree.getMinHeight</p>
1043
1006
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#getMinHeight">getMinHeight</a></p>
1044
1007
  <ul>
1045
- <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>
1008
+ <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>
1046
1009
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getNodes" class="tsd-anchor"></a>
1047
1010
  <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>
1048
1011
  <ul class="tsd-signatures tsd-is-inherited">
@@ -1078,7 +1041,7 @@ function will stop traversing the tree and return the first matching node. If `o
1078
1041
  <p>Implementation of IBinaryTree.getNodes</p>
1079
1042
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#getNodes">getNodes</a></p>
1080
1043
  <ul>
1081
- <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/83d3f8d/src/data-structures/binary-tree/abstract-binary-tree.ts#L544">src/data-structures/binary-tree/abstract-binary-tree.ts:544</a></li></ul></aside></li></ul></section>
1044
+ <li>Defined in <a href="https://github.com/zrwusa/data-structure-typed/blob/474f431/src/data-structures/binary-tree/abstract-binary-tree.ts#L544">src/data-structures/binary-tree/abstract-binary-tree.ts:544</a></li></ul></aside></li></ul></section>
1082
1045
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getPathToRoot" class="tsd-anchor"></a>
1083
1046
  <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>
1084
1047
  <ul class="tsd-signatures tsd-is-inherited">
@@ -1109,7 +1072,7 @@ path should be reversed or not. If <code>isReverse</code> is set to <code>true</
1109
1072
  <p>Implementation of IBinaryTree.getPathToRoot</p>
1110
1073
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#getPathToRoot">getPathToRoot</a></p>
1111
1074
  <ul>
1112
- <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>
1075
+ <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>
1113
1076
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getPredecessor" class="tsd-anchor"></a>
1114
1077
  <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>
1115
1078
  <ul class="tsd-signatures tsd-is-inherited">
@@ -1131,48 +1094,46 @@ path should be reversed or not. If <code>isReverse</code> is set to <code>true</
1131
1094
  <p>Implementation of IBinaryTree.getPredecessor</p>
1132
1095
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#getPredecessor">getPredecessor</a></p>
1133
1096
  <ul>
1134
- <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>
1097
+ <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>
1135
1098
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getRightMost" class="tsd-anchor"></a>
1136
1099
  <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>
1137
1100
  <ul class="tsd-signatures tsd-is-inherited">
1138
1101
  <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>
1139
1102
  <li class="tsd-description">
1140
- <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
1141
- tail recursion optimization.</p>
1103
+ <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
1104
+ recursion optimization.</p>
1142
1105
  </div>
1143
- <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
1144
- 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
1145
- function returns <code>null</code>.</p>
1106
+ <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
1107
+ rightmost node starting from the root of the binary tree.</p>
1146
1108
 
1147
1109
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1148
1110
  <p>Implementation of IBinaryTree.getRightMost</p>
1149
1111
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#getRightMost">getRightMost</a></p>
1150
1112
  <ul>
1151
- <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>
1152
- <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>
1113
+ <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>
1114
+ <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>
1153
1115
  <li class="tsd-description">
1154
- <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
1155
- tail recursion optimization.</p>
1116
+ <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
1117
+ recursion optimization.</p>
1156
1118
  </div>
1157
1119
  <div class="tsd-parameters">
1158
1120
  <h4 class="tsd-parameters-title">Parameters</h4>
1159
1121
  <ul class="tsd-parameter-list">
1160
1122
  <li>
1161
- <h5><span class="tsd-kind-parameter">node</span>: <span class="tsd-signature-type tsd-kind-type-parameter">N</span></h5>
1123
+ <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>
1162
1124
  <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
1163
- starting node from which we want to find the rightmost node. If no node is provided, the <code>node</code> parameter defaults
1164
- to <code>this.root</code>, which is the root node of the data structure</p>
1125
+ starting node from which we want to find the rightmost node. If no node is provided, the function will default to
1126
+ using the root node of the data structure.</p>
1165
1127
  </div>
1166
1128
  <div class="tsd-comment tsd-typography"></div></li></ul></div>
1167
- <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
1168
- 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
1169
- function returns <code>null</code>.</p>
1129
+ <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
1130
+ starting from that node.</p>
1170
1131
 
1171
1132
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1172
1133
  <p>Implementation of IBinaryTree.getRightMost</p>
1173
1134
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#getRightMost">getRightMost</a></p>
1174
1135
  <ul>
1175
- <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>
1136
+ <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>
1176
1137
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="getSubTreeSize" class="tsd-anchor"></a>
1177
1138
  <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>
1178
1139
  <ul class="tsd-signatures tsd-is-inherited">
@@ -1195,7 +1156,7 @@ binary tree.</p>
1195
1156
  <p>Implementation of IBinaryTree.getSubTreeSize</p>
1196
1157
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#getSubTreeSize">getSubTreeSize</a></p>
1197
1158
  <ul>
1198
- <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>
1159
+ <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>
1199
1160
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="has" class="tsd-anchor"></a>
1200
1161
  <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>
1201
1162
  <ul class="tsd-signatures tsd-is-inherited">
@@ -1224,7 +1185,7 @@ specifies the name of the property to be checked in the nodes. If not provided,
1224
1185
  <p>Implementation of IBinaryTree.has</p>
1225
1186
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#has">has</a></p>
1226
1187
  <ul>
1227
- <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>
1188
+ <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>
1228
1189
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="isBST" class="tsd-anchor"></a>
1229
1190
  <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>
1230
1191
  <ul class="tsd-signatures tsd-is-inherited">
@@ -1238,7 +1199,7 @@ specifies the name of the property to be checked in the nodes. If not provided,
1238
1199
  <p>Implementation of IBinaryTree.isBST</p>
1239
1200
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#isBST">isBST</a></p>
1240
1201
  <ul>
1241
- <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>
1202
+ <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>
1242
1203
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="isEmpty" class="tsd-anchor"></a>
1243
1204
  <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>
1244
1205
  <ul class="tsd-signatures tsd-is-inherited">
@@ -1252,7 +1213,7 @@ specifies the name of the property to be checked in the nodes. If not provided,
1252
1213
  <p>Implementation of IBinaryTree.isEmpty</p>
1253
1214
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#isEmpty">isEmpty</a></p>
1254
1215
  <ul>
1255
- <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>
1216
+ <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>
1256
1217
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="isPerfectlyBalanced" class="tsd-anchor"></a>
1257
1218
  <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>
1258
1219
  <ul class="tsd-signatures tsd-is-inherited">
@@ -1276,7 +1237,7 @@ tree or null if the tree is empty.</p>
1276
1237
  <p>Implementation of IBinaryTree.isPerfectlyBalanced</p>
1277
1238
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#isPerfectlyBalanced">isPerfectlyBalanced</a></p>
1278
1239
  <ul>
1279
- <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>
1240
+ <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>
1280
1241
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="isSubtreeBST" class="tsd-anchor"></a>
1281
1242
  <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>
1282
1243
  <ul class="tsd-signatures tsd-is-inherited">
@@ -1298,315 +1259,277 @@ tree or null if the tree is empty.</p>
1298
1259
  <p>Implementation of IBinaryTree.isSubtreeBST</p>
1299
1260
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#isSubtreeBST">isSubtreeBST</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#L708">src/data-structures/binary-tree/abstract-binary-tree.ts:708</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#L745">src/data-structures/binary-tree/abstract-binary-tree.ts:745</a></li></ul></aside></li></ul></section>
1302
1263
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="levelIterative" class="tsd-anchor"></a>
1303
1264
  <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>
1304
1265
  <ul class="tsd-signatures tsd-is-inherited">
1305
1266
  <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>
1306
1267
  <li class="tsd-description">
1307
- <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
1308
- in an array, based on a specified property name.</p>
1268
+ <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>
1309
1269
  </div>
1310
1270
  <div class="tsd-parameters">
1311
1271
  <h4 class="tsd-parameters-title">Parameters</h4>
1312
1272
  <ul class="tsd-parameter-list">
1313
1273
  <li>
1314
1274
  <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>
1315
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
1316
- node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
1317
- the tree is used as the starting node.</p>
1275
+ <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>
1318
1276
  </div>
1319
1277
  <div class="tsd-comment tsd-typography"></div></li></ul></div>
1320
- <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>
1278
+ <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>
1321
1279
 
1322
1280
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1323
1281
  <p>Implementation of IBinaryTree.levelIterative</p>
1324
1282
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#levelIterative">levelIterative</a></p>
1325
1283
  <ul>
1326
- <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>
1284
+ <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>
1327
1285
  <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>
1328
1286
  <li class="tsd-description">
1329
- <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
1330
- in an array, based on a specified property name.</p>
1287
+ <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>
1331
1288
  </div>
1332
1289
  <div class="tsd-parameters">
1333
1290
  <h4 class="tsd-parameters-title">Parameters</h4>
1334
1291
  <ul class="tsd-parameter-list">
1335
1292
  <li>
1336
1293
  <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>
1337
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
1338
- node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
1339
- the tree is used as the starting node.</p>
1294
+ <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>
1340
1295
  </div>
1341
1296
  <div class="tsd-comment tsd-typography"></div></li>
1342
1297
  <li>
1343
1298
  <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>
1344
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is an optional parameter that
1345
- 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
1346
- will accumulate results based on that property. If no property name is provided, the function will default to
1347
- accumulating results</p>
1299
+ <div class="tsd-comment tsd-typography"><p>The name of the property to accumulate.</p>
1348
1300
  </div>
1349
1301
  <div class="tsd-comment tsd-typography"></div></li></ul></div>
1350
- <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>
1302
+ <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>
1351
1303
 
1352
1304
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1353
1305
  <p>Implementation of IBinaryTree.levelIterative</p>
1354
1306
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#levelIterative">levelIterative</a></p>
1355
1307
  <ul>
1356
- <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>
1308
+ <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>
1357
1309
  <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>
1358
1310
  <li class="tsd-description">
1359
- <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
1360
- in an array, based on a specified property name.</p>
1311
+ <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>
1361
1312
  </div>
1362
1313
  <div class="tsd-parameters">
1363
1314
  <h4 class="tsd-parameters-title">Parameters</h4>
1364
1315
  <ul class="tsd-parameter-list">
1365
1316
  <li>
1366
1317
  <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>
1367
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
1368
- node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
1369
- the tree is used as the starting node.</p>
1318
+ <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>
1370
1319
  </div>
1371
1320
  <div class="tsd-comment tsd-typography"></div></li>
1372
1321
  <li>
1373
1322
  <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>
1374
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is an optional parameter that
1375
- 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
1376
- will accumulate results based on that property. If no property name is provided, the function will default to
1377
- accumulating results</p>
1323
+ <div class="tsd-comment tsd-typography"><p>The name of the property to accumulate.</p>
1378
1324
  </div>
1379
1325
  <div class="tsd-comment tsd-typography"></div></li></ul></div>
1380
- <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>
1326
+ <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>
1381
1327
 
1382
1328
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1383
1329
  <p>Implementation of IBinaryTree.levelIterative</p>
1384
1330
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#levelIterative">levelIterative</a></p>
1385
1331
  <ul>
1386
- <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>
1332
+ <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>
1387
1333
  <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>
1388
1334
  <li class="tsd-description">
1389
- <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
1390
- in an array, based on a specified property name.</p>
1335
+ <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>
1391
1336
  </div>
1392
1337
  <div class="tsd-parameters">
1393
1338
  <h4 class="tsd-parameters-title">Parameters</h4>
1394
1339
  <ul class="tsd-parameter-list">
1395
1340
  <li>
1396
1341
  <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>
1397
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object representing the starting
1398
- node for the level order traversal. It can be null if no specific node is provided, in which case the root node of
1399
- the tree is used as the starting node.</p>
1342
+ <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>
1400
1343
  </div>
1401
1344
  <div class="tsd-comment tsd-typography"></div></li>
1402
1345
  <li>
1403
1346
  <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>
1404
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is an optional parameter that
1405
- 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
1406
- will accumulate results based on that property. If no property name is provided, the function will default to
1407
- accumulating results</p>
1347
+ <div class="tsd-comment tsd-typography"><p>The name of the property to accumulate.</p>
1408
1348
  </div>
1409
1349
  <div class="tsd-comment tsd-typography"></div></li></ul></div>
1410
- <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>
1350
+ <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>
1411
1351
 
1412
1352
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1413
1353
  <p>Implementation of IBinaryTree.levelIterative</p>
1414
1354
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#levelIterative">levelIterative</a></p>
1415
1355
  <ul>
1416
- <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>
1356
+ <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>
1417
1357
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="listLevels" class="tsd-anchor"></a>
1418
1358
  <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>
1419
1359
  <ul class="tsd-signatures tsd-is-inherited">
1420
1360
  <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>
1421
1361
  <li class="tsd-description">
1422
- <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>
1362
+ <div class="tsd-comment tsd-typography"><p>Collects nodes from a binary tree by a specified property and organizes them into levels.</p>
1423
1363
  </div>
1424
1364
  <div class="tsd-parameters">
1425
1365
  <h4 class="tsd-parameters-title">Parameters</h4>
1426
1366
  <ul class="tsd-parameter-list">
1427
1367
  <li>
1428
1368
  <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>
1429
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
1430
- root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
1369
+ <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>
1431
1370
  </div>
1432
1371
  <div class="tsd-comment tsd-typography"></div></li></ul></div>
1433
- <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>
1372
+ <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>
1434
1373
 
1435
1374
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1436
1375
  <p>Implementation of IBinaryTree.listLevels</p>
1437
1376
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#listLevels">listLevels</a></p>
1438
1377
  <ul>
1439
- <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>
1378
+ <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>
1440
1379
  <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>
1441
1380
  <li class="tsd-description">
1442
- <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>
1381
+ <div class="tsd-comment tsd-typography"><p>Collects nodes from a binary tree by a specified property and organizes them into levels.</p>
1443
1382
  </div>
1444
1383
  <div class="tsd-parameters">
1445
1384
  <h4 class="tsd-parameters-title">Parameters</h4>
1446
1385
  <ul class="tsd-parameter-list">
1447
1386
  <li>
1448
1387
  <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>
1449
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
1450
- root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
1388
+ <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>
1451
1389
  </div>
1452
1390
  <div class="tsd-comment tsd-typography"></div></li>
1453
1391
  <li>
1454
- <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>
1455
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is an optional parameter that
1456
- specifies the property of the <code>BinaryTreeNode</code> object to collect at each level. It can be one of the following
1457
- values:</p>
1458
- </div>
1459
- <div class="tsd-comment tsd-typography"></div></li></ul></div>
1460
- <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>
1461
-
1392
+ <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>
1393
+ <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>
1462
1394
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1463
1395
  <p>Implementation of IBinaryTree.listLevels</p>
1464
1396
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#listLevels">listLevels</a></p>
1465
1397
  <ul>
1466
- <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>
1398
+ <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>
1467
1399
  <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>
1468
1400
  <li class="tsd-description">
1469
- <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>
1401
+ <div class="tsd-comment tsd-typography"><p>Collects nodes from a binary tree by a specified property and organizes them into levels.</p>
1470
1402
  </div>
1471
1403
  <div class="tsd-parameters">
1472
1404
  <h4 class="tsd-parameters-title">Parameters</h4>
1473
1405
  <ul class="tsd-parameter-list">
1474
1406
  <li>
1475
1407
  <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>
1476
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
1477
- root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
1408
+ <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>
1478
1409
  </div>
1479
1410
  <div class="tsd-comment tsd-typography"></div></li>
1480
1411
  <li>
1481
1412
  <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>
1482
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is an optional parameter that
1483
- specifies the property of the <code>BinaryTreeNode</code> object to collect at each level. It can be one of the following
1484
- values:</p>
1413
+ <div class="tsd-comment tsd-typography"><p>The property of the BinaryTreeNode object to collect at each level.</p>
1485
1414
  </div>
1486
1415
  <div class="tsd-comment tsd-typography"></div></li></ul></div>
1487
- <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>
1416
+ <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>
1488
1417
 
1489
1418
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1490
1419
  <p>Implementation of IBinaryTree.listLevels</p>
1491
1420
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#listLevels">listLevels</a></p>
1492
1421
  <ul>
1493
- <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>
1422
+ <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>
1494
1423
  <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>
1495
1424
  <li class="tsd-description">
1496
- <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>
1425
+ <div class="tsd-comment tsd-typography"><p>Collects nodes from a binary tree by a specified property and organizes them into levels.</p>
1497
1426
  </div>
1498
1427
  <div class="tsd-parameters">
1499
1428
  <h4 class="tsd-parameters-title">Parameters</h4>
1500
1429
  <ul class="tsd-parameter-list">
1501
1430
  <li>
1502
1431
  <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>
1503
- <div class="tsd-comment tsd-typography"><p>The <code>node</code> parameter is a BinaryTreeNode object or null. It represents the
1504
- root node of a binary tree. If it is null, the function will use the root node of the current binary tree instance.</p>
1432
+ <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>
1505
1433
  </div>
1506
1434
  <div class="tsd-comment tsd-typography"></div></li>
1507
1435
  <li>
1508
1436
  <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>
1509
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is an optional parameter that
1510
- specifies the property of the <code>BinaryTreeNode</code> object to collect at each level. It can be one of the following
1511
- values:</p>
1437
+ <div class="tsd-comment tsd-typography"><p>The property of the BinaryTreeNode object to collect at each level.</p>
1512
1438
  </div>
1513
1439
  <div class="tsd-comment tsd-typography"></div></li></ul></div>
1514
- <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>
1440
+ <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>
1515
1441
 
1516
1442
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1517
1443
  <p>Implementation of IBinaryTree.listLevels</p>
1518
1444
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#listLevels">listLevels</a></p>
1519
1445
  <ul>
1520
- <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>
1446
+ <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>
1521
1447
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="morris" class="tsd-anchor"></a>
1522
1448
  <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>
1523
1449
  <ul class="tsd-signatures tsd-is-inherited">
1524
1450
  <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>
1525
1451
  <li class="tsd-description">
1526
- <div class="tsd-comment tsd-typography"><p>The <code>morris</code> function performs an in-order, pre-order, or post-order traversal on a binary tree using the Morris
1527
- traversal algorithm.</p>
1452
+ <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>
1528
1453
  </div>
1529
- <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>
1454
+ <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>
1530
1455
 
1531
1456
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1532
1457
  <p>Implementation of IBinaryTree.morris</p>
1533
1458
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#morris">morris</a></p>
1534
1459
  <ul>
1535
- <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>
1460
+ <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>
1536
1461
  <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>
1537
1462
  <li class="tsd-description">
1538
- <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
1539
- traversal algorithm.</p>
1463
+ <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>
1540
1464
  </div>
1541
1465
  <div class="tsd-parameters">
1542
1466
  <h4 class="tsd-parameters-title">Parameters</h4>
1543
1467
  <ul class="tsd-parameter-list">
1544
1468
  <li>
1545
1469
  <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>
1546
- <div class="tsd-comment tsd-typography"><p>The <code>pattern</code> parameter determines the traversal pattern for the binary
1547
- tree. It can have one of three values:</p>
1470
+ <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>
1548
1471
  </div>
1549
1472
  <div class="tsd-comment tsd-typography"></div></li>
1550
1473
  <li>
1551
1474
  <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>
1552
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is used to specify the
1553
- property name of the nodes that you want to retrieve. It can be any valid property name of the nodes in the binary
1554
- tree.</p>
1475
+ <div class="tsd-comment tsd-typography"><p>The name of the property to accumulate.</p>
1555
1476
  </div>
1556
1477
  <div class="tsd-comment tsd-typography"></div></li></ul></div>
1557
- <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>
1478
+ <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>
1558
1479
 
1559
1480
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1560
1481
  <p>Implementation of IBinaryTree.morris</p>
1561
1482
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#morris">morris</a></p>
1562
1483
  <ul>
1563
- <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>
1484
+ <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>
1564
1485
  <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>
1565
1486
  <li class="tsd-description">
1566
- <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
1567
- traversal algorithm.</p>
1487
+ <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>
1568
1488
  </div>
1569
1489
  <div class="tsd-parameters">
1570
1490
  <h4 class="tsd-parameters-title">Parameters</h4>
1571
1491
  <ul class="tsd-parameter-list">
1572
1492
  <li>
1573
1493
  <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>
1574
- <div class="tsd-comment tsd-typography"><p>The <code>pattern</code> parameter determines the traversal pattern for the binary
1575
- tree. It can have one of three values:</p>
1494
+ <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>
1576
1495
  </div>
1577
1496
  <div class="tsd-comment tsd-typography"></div></li>
1578
1497
  <li>
1579
1498
  <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>
1580
- <div class="tsd-comment tsd-typography"><p>The <code>nodeOrPropertyName</code> parameter is used to specify the
1581
- property name of the nodes that you want to retrieve. It can be any valid property name of the nodes in the binary
1582
- tree.</p>
1499
+ <div class="tsd-comment tsd-typography"><p>The property of the BinaryTreeNode object to collect at each level.</p>
1583
1500
  </div>
1584
1501
  <div class="tsd-comment tsd-typography"></div></li></ul></div>
1585
- <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>
1502
+ <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>
1586
1503
 
1587
1504
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1588
1505
  <p>Implementation of IBinaryTree.morris</p>
1589
1506
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#morris">morris</a></p>
1590
1507
  <ul>
1591
- <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>
1508
+ <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>
1592
1509
  <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>
1593
1510
  <li class="tsd-description">
1594
- <div class="tsd-comment tsd-typography"><p>Time complexity is O(n)
1595
- Space complexity of Iterative DFS equals to recursive DFS which is O(n) because of the stack</p>
1511
+ <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>
1596
1512
  </div>
1597
1513
  <div class="tsd-parameters">
1598
1514
  <h4 class="tsd-parameters-title">Parameters</h4>
1599
1515
  <ul class="tsd-parameter-list">
1600
1516
  <li>
1601
- <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>
1517
+ <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>
1518
+ <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>
1519
+ </div>
1520
+ <div class="tsd-comment tsd-typography"></div></li>
1602
1521
  <li>
1603
- <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>
1604
- <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">N</span><span class="tsd-signature-symbol">[]</span></h4>
1522
+ <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>
1523
+ <div class="tsd-comment tsd-typography"><p>The property of the BinaryTreeNode object to collect at each level.</p>
1524
+ </div>
1525
+ <div class="tsd-comment tsd-typography"></div></li></ul></div>
1526
+ <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>
1527
+
1605
1528
  <div class="tsd-comment tsd-typography"></div><aside class="tsd-sources">
1606
1529
  <p>Implementation of IBinaryTree.morris</p>
1607
1530
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#morris">morris</a></p>
1608
1531
  <ul>
1609
- <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>
1532
+ <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>
1610
1533
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="remove" class="tsd-anchor"></a>
1611
1534
  <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>
1612
1535
  <ul class="tsd-signatures tsd-is-inherited">
@@ -1637,7 +1560,7 @@ determines whether to update the left sum of all nodes in the binary tree after
1637
1560
  <p>Implementation of IBinaryTree.remove</p>
1638
1561
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#remove">remove</a></p>
1639
1562
  <ul>
1640
- <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>
1563
+ <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>
1641
1564
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="subTreeAdd" class="tsd-anchor"></a>
1642
1565
  <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>
1643
1566
  <ul class="tsd-signatures tsd-is-inherited">
@@ -1672,7 +1595,7 @@ specifies the property of the binary tree node that should be modified. If not p
1672
1595
  <p>Implementation of IBinaryTree.subTreeAdd</p>
1673
1596
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#subTreeAdd">subTreeAdd</a></p>
1674
1597
  <ul>
1675
- <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>
1598
+ <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>
1676
1599
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="subTreeSum" class="tsd-anchor"></a>
1677
1600
  <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>
1678
1601
  <ul class="tsd-signatures tsd-is-inherited">
@@ -1702,7 +1625,7 @@ not provided, it defaults to &#39;id&#39;.</p>
1702
1625
  <p>Implementation of IBinaryTree.subTreeSum</p>
1703
1626
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#subTreeSum">subTreeSum</a></p>
1704
1627
  <ul>
1705
- <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>
1628
+ <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>
1706
1629
  <section class="tsd-panel tsd-member tsd-is-inherited"><a id="swapLocation" class="tsd-anchor"></a>
1707
1630
  <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>
1708
1631
  <ul class="tsd-signatures tsd-is-inherited">
@@ -1730,7 +1653,7 @@ be swapped to.</p>
1730
1653
  <p>Implementation of IBinaryTree.swapLocation</p>
1731
1654
  <p>Inherited from <a href="AbstractBinaryTree.html">AbstractBinaryTree</a>.<a href="AbstractBinaryTree.html#swapLocation">swapLocation</a></p>
1732
1655
  <ul>
1733
- <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>
1656
+ <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>
1734
1657
  <div class="col-sidebar">
1735
1658
  <div class="page-menu">
1736
1659
  <div class="tsd-navigation settings">