data-structure-typed 1.32.1 → 1.32.9

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 (342) hide show
  1. package/.idea/data-structure-typed.iml +19 -0
  2. package/.idea/inspectionProfiles/Project_Default.xml +6 -0
  3. package/.idea/misc.xml +6 -0
  4. package/.idea/modules.xml +8 -0
  5. package/.idea/vcs.xml +6 -0
  6. package/CHANGELOG.md +1 -1
  7. package/README.md +415 -255
  8. package/coverage/coverage-final.json +4 -4
  9. package/docs/index.html +268 -21
  10. package/package.json +48 -16
  11. package/test/unit/data-structures/binary-tree/tree-multiset.test.ts +46 -1
  12. package/.auto-changelog-template.hbs +0 -36
  13. package/coverage/clover.xml +0 -3393
  14. package/coverage/lcov-report/base.css +0 -224
  15. package/coverage/lcov-report/block-navigation.js +0 -87
  16. package/coverage/lcov-report/favicon.png +0 -0
  17. package/coverage/lcov-report/index.html +0 -386
  18. package/coverage/lcov-report/prettify.css +0 -1
  19. package/coverage/lcov-report/prettify.js +0 -2
  20. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  21. package/coverage/lcov-report/sorter.js +0 -196
  22. package/coverage/lcov-report/src/data-structures/binary-tree/aa-tree.ts.html +0 -88
  23. package/coverage/lcov-report/src/data-structures/binary-tree/abstract-binary-tree.ts.html +0 -4978
  24. package/coverage/lcov-report/src/data-structures/binary-tree/avl-tree.ts.html +0 -1015
  25. package/coverage/lcov-report/src/data-structures/binary-tree/b-tree.ts.html +0 -88
  26. package/coverage/lcov-report/src/data-structures/binary-tree/binary-indexed-tree.ts.html +0 -313
  27. package/coverage/lcov-report/src/data-structures/binary-tree/binary-tree.ts.html +0 -226
  28. package/coverage/lcov-report/src/data-structures/binary-tree/bst.ts.html +0 -1696
  29. package/coverage/lcov-report/src/data-structures/binary-tree/index.html +0 -296
  30. package/coverage/lcov-report/src/data-structures/binary-tree/index.ts.html +0 -121
  31. package/coverage/lcov-report/src/data-structures/binary-tree/rb-tree.ts.html +0 -388
  32. package/coverage/lcov-report/src/data-structures/binary-tree/segment-tree.ts.html +0 -811
  33. package/coverage/lcov-report/src/data-structures/binary-tree/splay-tree.ts.html +0 -88
  34. package/coverage/lcov-report/src/data-structures/binary-tree/tree-multiset.ts.html +0 -2185
  35. package/coverage/lcov-report/src/data-structures/binary-tree/two-three-tree.ts.html +0 -88
  36. package/coverage/lcov-report/src/data-structures/graph/abstract-graph.ts.html +0 -3205
  37. package/coverage/lcov-report/src/data-structures/graph/directed-graph.ts.html +0 -1495
  38. package/coverage/lcov-report/src/data-structures/graph/index.html +0 -176
  39. package/coverage/lcov-report/src/data-structures/graph/index.ts.html +0 -97
  40. package/coverage/lcov-report/src/data-structures/graph/map-graph.ts.html +0 -472
  41. package/coverage/lcov-report/src/data-structures/graph/undirected-graph.ts.html +0 -907
  42. package/coverage/lcov-report/src/data-structures/hash/coordinate-map.ts.html +0 -286
  43. package/coverage/lcov-report/src/data-structures/hash/coordinate-set.ts.html +0 -253
  44. package/coverage/lcov-report/src/data-structures/hash/hash-table.ts.html +0 -88
  45. package/coverage/lcov-report/src/data-structures/hash/index.html +0 -206
  46. package/coverage/lcov-report/src/data-structures/hash/index.ts.html +0 -103
  47. package/coverage/lcov-report/src/data-structures/hash/pair.ts.html +0 -88
  48. package/coverage/lcov-report/src/data-structures/hash/tree-map.ts.html +0 -88
  49. package/coverage/lcov-report/src/data-structures/hash/tree-set.ts.html +0 -88
  50. package/coverage/lcov-report/src/data-structures/heap/heap.ts.html +0 -721
  51. package/coverage/lcov-report/src/data-structures/heap/index.html +0 -161
  52. package/coverage/lcov-report/src/data-structures/heap/index.ts.html +0 -94
  53. package/coverage/lcov-report/src/data-structures/heap/max-heap.ts.html +0 -178
  54. package/coverage/lcov-report/src/data-structures/heap/min-heap.ts.html +0 -181
  55. package/coverage/lcov-report/src/data-structures/index.html +0 -116
  56. package/coverage/lcov-report/src/data-structures/index.ts.html +0 -118
  57. package/coverage/lcov-report/src/data-structures/linked-list/doubly-linked-list.ts.html +0 -1804
  58. package/coverage/lcov-report/src/data-structures/linked-list/index.html +0 -161
  59. package/coverage/lcov-report/src/data-structures/linked-list/index.ts.html +0 -94
  60. package/coverage/lcov-report/src/data-structures/linked-list/singly-linked-list.ts.html +0 -1588
  61. package/coverage/lcov-report/src/data-structures/linked-list/skip-linked-list.ts.html +0 -88
  62. package/coverage/lcov-report/src/data-structures/matrix/index.html +0 -176
  63. package/coverage/lcov-report/src/data-structures/matrix/index.ts.html +0 -97
  64. package/coverage/lcov-report/src/data-structures/matrix/matrix.ts.html +0 -166
  65. package/coverage/lcov-report/src/data-structures/matrix/matrix2d.ts.html +0 -721
  66. package/coverage/lcov-report/src/data-structures/matrix/navigator.ts.html +0 -448
  67. package/coverage/lcov-report/src/data-structures/matrix/vector2d.ts.html +0 -1033
  68. package/coverage/lcov-report/src/data-structures/priority-queue/index.html +0 -161
  69. package/coverage/lcov-report/src/data-structures/priority-queue/index.ts.html +0 -94
  70. package/coverage/lcov-report/src/data-structures/priority-queue/max-priority-queue.ts.html +0 -253
  71. package/coverage/lcov-report/src/data-structures/priority-queue/min-priority-queue.ts.html +0 -256
  72. package/coverage/lcov-report/src/data-structures/priority-queue/priority-queue.ts.html +0 -1162
  73. package/coverage/lcov-report/src/data-structures/queue/deque.ts.html +0 -976
  74. package/coverage/lcov-report/src/data-structures/queue/index.html +0 -146
  75. package/coverage/lcov-report/src/data-structures/queue/index.ts.html +0 -91
  76. package/coverage/lcov-report/src/data-structures/queue/queue.ts.html +0 -658
  77. package/coverage/lcov-report/src/data-structures/stack/index.html +0 -131
  78. package/coverage/lcov-report/src/data-structures/stack/index.ts.html +0 -88
  79. package/coverage/lcov-report/src/data-structures/stack/stack.ts.html +0 -379
  80. package/coverage/lcov-report/src/data-structures/tree/index.html +0 -131
  81. package/coverage/lcov-report/src/data-structures/tree/index.ts.html +0 -88
  82. package/coverage/lcov-report/src/data-structures/tree/tree.ts.html +0 -292
  83. package/coverage/lcov-report/src/data-structures/trie/index.html +0 -131
  84. package/coverage/lcov-report/src/data-structures/trie/index.ts.html +0 -88
  85. package/coverage/lcov-report/src/data-structures/trie/trie.ts.html +0 -760
  86. package/coverage/lcov-report/src/index.html +0 -116
  87. package/coverage/lcov-report/src/index.ts.html +0 -97
  88. package/coverage/lcov-report/src/interfaces/index.html +0 -116
  89. package/coverage/lcov-report/src/interfaces/index.ts.html +0 -130
  90. package/coverage/lcov-report/src/types/data-structures/abstract-binary-tree.ts.html +0 -235
  91. package/coverage/lcov-report/src/types/data-structures/bst.ts.html +0 -124
  92. package/coverage/lcov-report/src/types/data-structures/directed-graph.ts.html +0 -109
  93. package/coverage/lcov-report/src/types/data-structures/index.html +0 -176
  94. package/coverage/lcov-report/src/types/data-structures/index.ts.html +0 -130
  95. package/coverage/lcov-report/src/types/data-structures/rb-tree.ts.html +0 -106
  96. package/coverage/lcov-report/src/types/index.html +0 -116
  97. package/coverage/lcov-report/src/types/index.ts.html +0 -94
  98. package/coverage/lcov-report/src/types/utils/index.html +0 -116
  99. package/coverage/lcov-report/src/types/utils/index.ts.html +0 -91
  100. package/coverage/lcov-report/src/utils/index.html +0 -131
  101. package/coverage/lcov-report/src/utils/index.ts.html +0 -88
  102. package/coverage/lcov-report/src/utils/utils.ts.html +0 -322
  103. package/coverage/lcov-report/test/utils/index.html +0 -146
  104. package/coverage/lcov-report/test/utils/index.ts.html +0 -91
  105. package/coverage/lcov-report/test/utils/magnitude.ts.html +0 -148
  106. package/coverage/lcov-report/test/utils/number.ts.html +0 -94
  107. package/coverage/lcov.info +0 -6676
  108. package/docs/assets/highlight.css +0 -127
  109. package/docs/assets/main.js +0 -58
  110. package/docs/assets/search.js +0 -1
  111. package/docs/assets/style.css +0 -1367
  112. package/docs/classes/AVLTree.html +0 -2182
  113. package/docs/classes/AVLTreeNode.html +0 -399
  114. package/docs/classes/AaTree.html +0 -202
  115. package/docs/classes/AbstractBinaryTree.html +0 -1836
  116. package/docs/classes/AbstractBinaryTreeNode.html +0 -441
  117. package/docs/classes/AbstractEdge.html +0 -345
  118. package/docs/classes/AbstractGraph.html +0 -1105
  119. package/docs/classes/AbstractVertex.html +0 -299
  120. package/docs/classes/ArrayDeque.html +0 -469
  121. package/docs/classes/BST.html +0 -2026
  122. package/docs/classes/BSTNode.html +0 -400
  123. package/docs/classes/BTree.html +0 -202
  124. package/docs/classes/BinaryIndexedTree.html +0 -371
  125. package/docs/classes/BinaryTree.html +0 -1867
  126. package/docs/classes/BinaryTreeNode.html +0 -399
  127. package/docs/classes/Character.html +0 -250
  128. package/docs/classes/CoordinateMap.html +0 -513
  129. package/docs/classes/CoordinateSet.html +0 -474
  130. package/docs/classes/Deque.html +0 -1005
  131. package/docs/classes/DirectedEdge.html +0 -404
  132. package/docs/classes/DirectedGraph.html +0 -1530
  133. package/docs/classes/DirectedVertex.html +0 -286
  134. package/docs/classes/DoublyLinkedList.html +0 -998
  135. package/docs/classes/DoublyLinkedListNode.html +0 -327
  136. package/docs/classes/HashTable.html +0 -202
  137. package/docs/classes/Heap.html +0 -647
  138. package/docs/classes/HeapItem.html +0 -296
  139. package/docs/classes/LinkedListQueue.html +0 -884
  140. package/docs/classes/MapEdge.html +0 -391
  141. package/docs/classes/MapGraph.html +0 -1583
  142. package/docs/classes/MapVertex.html +0 -356
  143. package/docs/classes/Matrix2D.html +0 -532
  144. package/docs/classes/MatrixNTI2D.html +0 -270
  145. package/docs/classes/MaxHeap.html +0 -671
  146. package/docs/classes/MaxPriorityQueue.html +0 -866
  147. package/docs/classes/MinHeap.html +0 -672
  148. package/docs/classes/MinPriorityQueue.html +0 -868
  149. package/docs/classes/Navigator.html +0 -343
  150. package/docs/classes/ObjectDeque.html +0 -527
  151. package/docs/classes/Pair.html +0 -202
  152. package/docs/classes/PriorityQueue.html +0 -790
  153. package/docs/classes/Queue.html +0 -521
  154. package/docs/classes/RBTree.html +0 -2024
  155. package/docs/classes/RBTreeNode.html +0 -431
  156. package/docs/classes/SegmentTree.html +0 -464
  157. package/docs/classes/SegmentTreeNode.html +0 -387
  158. package/docs/classes/SinglyLinkedList.html +0 -830
  159. package/docs/classes/SinglyLinkedListNode.html +0 -300
  160. package/docs/classes/SkipLinkedList.html +0 -202
  161. package/docs/classes/SplayTree.html +0 -202
  162. package/docs/classes/Stack.html +0 -398
  163. package/docs/classes/TreeMap.html +0 -202
  164. package/docs/classes/TreeMultiset.html +0 -2510
  165. package/docs/classes/TreeMultisetNode.html +0 -447
  166. package/docs/classes/TreeNode.html +0 -344
  167. package/docs/classes/TreeSet.html +0 -202
  168. package/docs/classes/Trie.html +0 -402
  169. package/docs/classes/TrieNode.html +0 -310
  170. package/docs/classes/TwoThreeTree.html +0 -202
  171. package/docs/classes/UndirectedEdge.html +0 -374
  172. package/docs/classes/UndirectedGraph.html +0 -1285
  173. package/docs/classes/UndirectedVertex.html +0 -284
  174. package/docs/classes/Vector2D.html +0 -835
  175. package/docs/enums/CP.html +0 -211
  176. package/docs/enums/FamilyPosition.html +0 -239
  177. package/docs/enums/LoopType.html +0 -212
  178. package/docs/enums/RBColor.html +0 -204
  179. package/docs/enums/TopologicalProperty.html +0 -211
  180. package/docs/functions/arrayRemove.html +0 -208
  181. package/docs/functions/isThunk.html +0 -186
  182. package/docs/functions/toThunk.html +0 -186
  183. package/docs/functions/trampoline.html +0 -186
  184. package/docs/functions/trampolineAsync.html +0 -186
  185. package/docs/functions/uuidV4.html +0 -181
  186. package/docs/interfaces/IAVLTree.html +0 -1245
  187. package/docs/interfaces/IAbstractBinaryTree.html +0 -1101
  188. package/docs/interfaces/IAbstractBinaryTreeNode.html +0 -335
  189. package/docs/interfaces/IAbstractGraph.html +0 -433
  190. package/docs/interfaces/IBST.html +0 -1245
  191. package/docs/interfaces/IDirectedGraph.html +0 -570
  192. package/docs/interfaces/IRBTree.html +0 -1247
  193. package/docs/interfaces/IUNDirectedGraph.html +0 -463
  194. package/docs/types/AVLTreeNodeNested.html +0 -182
  195. package/docs/types/AVLTreeOptions.html +0 -180
  196. package/docs/types/AbstractBinaryTreeNodeNested.html +0 -182
  197. package/docs/types/AbstractBinaryTreeNodeProperties.html +0 -182
  198. package/docs/types/AbstractBinaryTreeNodeProperty.html +0 -182
  199. package/docs/types/AbstractBinaryTreeOptions.html +0 -182
  200. package/docs/types/BSTComparator.html +0 -192
  201. package/docs/types/BSTNodeNested.html +0 -182
  202. package/docs/types/BSTOptions.html +0 -182
  203. package/docs/types/BinaryTreeDeletedResult.html +0 -189
  204. package/docs/types/BinaryTreeNodeId.html +0 -177
  205. package/docs/types/BinaryTreeNodeNested.html +0 -182
  206. package/docs/types/BinaryTreeNodePropertyName.html +0 -177
  207. package/docs/types/BinaryTreeOptions.html +0 -180
  208. package/docs/types/DFSOrderPattern.html +0 -177
  209. package/docs/types/DijkstraResult.html +0 -199
  210. package/docs/types/Direction.html +0 -177
  211. package/docs/types/DummyAny.html +0 -190
  212. package/docs/types/EdgeId.html +0 -177
  213. package/docs/types/HeapOptions.html +0 -198
  214. package/docs/types/IAVLTreeNode.html +0 -184
  215. package/docs/types/IBSTNode.html +0 -184
  216. package/docs/types/IBinaryTree.html +0 -182
  217. package/docs/types/IBinaryTreeNode.html +0 -184
  218. package/docs/types/IRBTreeNode.html +0 -184
  219. package/docs/types/ITreeMultiset.html +0 -182
  220. package/docs/types/ITreeMultisetNode.html +0 -184
  221. package/docs/types/KeyValueObject.html +0 -182
  222. package/docs/types/KeyValueObjectWithId.html +0 -184
  223. package/docs/types/MapGraphCoordinate.html +0 -177
  224. package/docs/types/NavigatorParams.html +0 -211
  225. package/docs/types/NodeOrPropertyName.html +0 -177
  226. package/docs/types/NonNumberNonObjectButDefined.html +0 -177
  227. package/docs/types/ObjectWithNonNumberId.html +0 -184
  228. package/docs/types/ObjectWithNumberId.html +0 -184
  229. package/docs/types/ObjectWithoutId.html +0 -177
  230. package/docs/types/PriorityQueueComparator.html +0 -197
  231. package/docs/types/PriorityQueueDFSOrderPattern.html +0 -177
  232. package/docs/types/PriorityQueueOptions.html +0 -191
  233. package/docs/types/RBTreeNodeNested.html +0 -182
  234. package/docs/types/RBTreeOptions.html +0 -180
  235. package/docs/types/RestrictValById.html +0 -177
  236. package/docs/types/SegmentTreeNodeVal.html +0 -177
  237. package/docs/types/SpecifyOptional.html +0 -184
  238. package/docs/types/Thunk.html +0 -185
  239. package/docs/types/ToThunkFn.html +0 -185
  240. package/docs/types/TopologicalStatus.html +0 -177
  241. package/docs/types/TreeMultisetNodeNested.html +0 -182
  242. package/docs/types/TreeMultisetOptions.html +0 -180
  243. package/docs/types/TrlAsyncFn.html +0 -190
  244. package/docs/types/TrlFn.html +0 -190
  245. package/docs/types/Turning.html +0 -177
  246. package/docs/types/VertexId.html +0 -177
  247. package/docs/variables/THUNK_SYMBOL.html +0 -177
  248. package/rename_clear_files.sh +0 -29
  249. package/src/data-structures/binary-tree/aa-tree.ts +0 -1
  250. package/src/data-structures/binary-tree/abstract-binary-tree.ts +0 -1631
  251. package/src/data-structures/binary-tree/avl-tree.ts +0 -310
  252. package/src/data-structures/binary-tree/b-tree.ts +0 -1
  253. package/src/data-structures/binary-tree/binary-indexed-tree.ts +0 -76
  254. package/src/data-structures/binary-tree/binary-tree.ts +0 -47
  255. package/src/data-structures/binary-tree/bst.ts +0 -537
  256. package/src/data-structures/binary-tree/index.ts +0 -12
  257. package/src/data-structures/binary-tree/rb-tree.ts +0 -101
  258. package/src/data-structures/binary-tree/segment-tree.ts +0 -242
  259. package/src/data-structures/binary-tree/splay-tree.ts +0 -1
  260. package/src/data-structures/binary-tree/tree-multiset.ts +0 -700
  261. package/src/data-structures/binary-tree/two-three-tree.ts +0 -1
  262. package/src/data-structures/diagrams/README.md +0 -5
  263. package/src/data-structures/graph/abstract-graph.ts +0 -1040
  264. package/src/data-structures/graph/directed-graph.ts +0 -470
  265. package/src/data-structures/graph/index.ts +0 -4
  266. package/src/data-structures/graph/map-graph.ts +0 -129
  267. package/src/data-structures/graph/undirected-graph.ts +0 -274
  268. package/src/data-structures/hash/coordinate-map.ts +0 -67
  269. package/src/data-structures/hash/coordinate-set.ts +0 -56
  270. package/src/data-structures/hash/hash-table.ts +0 -1
  271. package/src/data-structures/hash/index.ts +0 -6
  272. package/src/data-structures/hash/pair.ts +0 -1
  273. package/src/data-structures/hash/tree-map.ts +0 -1
  274. package/src/data-structures/hash/tree-set.ts +0 -1
  275. package/src/data-structures/heap/heap.ts +0 -212
  276. package/src/data-structures/heap/index.ts +0 -3
  277. package/src/data-structures/heap/max-heap.ts +0 -31
  278. package/src/data-structures/heap/min-heap.ts +0 -32
  279. package/src/data-structures/index.ts +0 -11
  280. package/src/data-structures/linked-list/doubly-linked-list.ts +0 -573
  281. package/src/data-structures/linked-list/index.ts +0 -3
  282. package/src/data-structures/linked-list/singly-linked-list.ts +0 -501
  283. package/src/data-structures/linked-list/skip-linked-list.ts +0 -1
  284. package/src/data-structures/matrix/index.ts +0 -4
  285. package/src/data-structures/matrix/matrix.ts +0 -27
  286. package/src/data-structures/matrix/matrix2d.ts +0 -212
  287. package/src/data-structures/matrix/navigator.ts +0 -121
  288. package/src/data-structures/matrix/vector2d.ts +0 -316
  289. package/src/data-structures/priority-queue/index.ts +0 -3
  290. package/src/data-structures/priority-queue/max-priority-queue.ts +0 -56
  291. package/src/data-structures/priority-queue/min-priority-queue.ts +0 -57
  292. package/src/data-structures/priority-queue/priority-queue.ts +0 -359
  293. package/src/data-structures/queue/deque.ts +0 -297
  294. package/src/data-structures/queue/index.ts +0 -2
  295. package/src/data-structures/queue/queue.ts +0 -191
  296. package/src/data-structures/stack/index.ts +0 -1
  297. package/src/data-structures/stack/stack.ts +0 -98
  298. package/src/data-structures/tree/index.ts +0 -1
  299. package/src/data-structures/tree/tree.ts +0 -69
  300. package/src/data-structures/trie/index.ts +0 -1
  301. package/src/data-structures/trie/trie.ts +0 -225
  302. package/src/index.ts +0 -4
  303. package/src/interfaces/abstract-binary-tree.ts +0 -191
  304. package/src/interfaces/abstract-graph.ts +0 -31
  305. package/src/interfaces/avl-tree.ts +0 -25
  306. package/src/interfaces/binary-tree.ts +0 -6
  307. package/src/interfaces/bst.ts +0 -31
  308. package/src/interfaces/directed-graph.ts +0 -20
  309. package/src/interfaces/doubly-linked-list.ts +0 -1
  310. package/src/interfaces/heap.ts +0 -1
  311. package/src/interfaces/index.ts +0 -15
  312. package/src/interfaces/navigator.ts +0 -1
  313. package/src/interfaces/priority-queue.ts +0 -1
  314. package/src/interfaces/rb-tree.ts +0 -9
  315. package/src/interfaces/segment-tree.ts +0 -1
  316. package/src/interfaces/singly-linked-list.ts +0 -1
  317. package/src/interfaces/tree-multiset.ts +0 -7
  318. package/src/interfaces/undirected-graph.ts +0 -6
  319. package/src/types/data-structures/abstract-binary-tree.ts +0 -50
  320. package/src/types/data-structures/abstract-graph.ts +0 -11
  321. package/src/types/data-structures/avl-tree.ts +0 -5
  322. package/src/types/data-structures/binary-tree.ts +0 -5
  323. package/src/types/data-structures/bst.ts +0 -13
  324. package/src/types/data-structures/directed-graph.ts +0 -8
  325. package/src/types/data-structures/doubly-linked-list.ts +0 -1
  326. package/src/types/data-structures/heap.ts +0 -5
  327. package/src/types/data-structures/index.ts +0 -15
  328. package/src/types/data-structures/map-graph.ts +0 -1
  329. package/src/types/data-structures/navigator.ts +0 -13
  330. package/src/types/data-structures/priority-queue.ts +0 -9
  331. package/src/types/data-structures/rb-tree.ts +0 -8
  332. package/src/types/data-structures/segment-tree.ts +0 -1
  333. package/src/types/data-structures/singly-linked-list.ts +0 -1
  334. package/src/types/data-structures/tree-multiset.ts +0 -6
  335. package/src/types/helpers.ts +0 -1
  336. package/src/types/index.ts +0 -3
  337. package/src/types/utils/index.ts +0 -2
  338. package/src/types/utils/utils.ts +0 -6
  339. package/src/types/utils/validate-type.ts +0 -35
  340. package/src/utils/index.ts +0 -1
  341. package/src/utils/utils.ts +0 -79
  342. package/tsconfig.build.json +0 -33
@@ -1,225 +0,0 @@
1
- /**
2
- * data-structure-typed
3
- *
4
- * @author Tyler Zeng
5
- * @copyright Copyright (c) 2022 Tyler Zeng <zrwusa@gmail.com>
6
- * @license MIT License
7
- */
8
- export class TrieNode {
9
- constructor(v: string) {
10
- this._val = v;
11
- this._isEnd = false;
12
- this._children = new Map<string, TrieNode>();
13
- }
14
-
15
- private _val;
16
-
17
- get val(): string {
18
- return this._val;
19
- }
20
-
21
- set val(v: string) {
22
- this._val = v;
23
- }
24
-
25
- protected _children: Map<string, TrieNode>;
26
-
27
- get children(): Map<string, TrieNode> {
28
- return this._children;
29
- }
30
-
31
- set children(v: Map<string, TrieNode>) {
32
- this._children = v;
33
- }
34
-
35
- protected _isEnd: boolean;
36
-
37
- get isEnd(): boolean {
38
- return this._isEnd;
39
- }
40
-
41
- set isEnd(v: boolean) {
42
- this._isEnd = v;
43
- }
44
- }
45
-
46
- export class Trie {
47
- constructor(words?: string[]) {
48
- this._root = new TrieNode('');
49
- if (words) {
50
- for (const i of words) {
51
- this.add(i);
52
- }
53
- }
54
- }
55
-
56
- protected _root: TrieNode;
57
-
58
- get root() {
59
- return this._root;
60
- }
61
-
62
- set root(v: TrieNode) {
63
- this._root = v;
64
- }
65
-
66
- add(word: string): boolean {
67
- let cur = this._root;
68
- for (const c of word) {
69
- let nodeC = cur.children.get(c);
70
- if (!nodeC) {
71
- nodeC = new TrieNode(c);
72
- cur.children.set(c, nodeC);
73
- }
74
- cur = nodeC;
75
- }
76
- cur.isEnd = true;
77
- return true;
78
- }
79
-
80
- has(input: string): boolean {
81
- let cur = this._root;
82
- for (const c of input) {
83
- const nodeC = cur.children.get(c);
84
- if (!nodeC) return false;
85
- cur = nodeC;
86
- }
87
- return cur.isEnd;
88
- }
89
-
90
- remove(word: string) {
91
- let isDeleted = false;
92
- const dfs = (cur: TrieNode, i: number): boolean => {
93
- const char = word[i];
94
- const child = cur.children.get(char);
95
- if (child) {
96
- if (i === word.length - 1) {
97
- if (child.isEnd) {
98
- if (child.children.size > 0) {
99
- child.isEnd = false;
100
- } else {
101
- cur.children.delete(char);
102
- }
103
- isDeleted = true;
104
- return true;
105
- }
106
- return false;
107
- }
108
- const res = dfs(child, i + 1);
109
- if (res && !cur.isEnd && child.children.size === 0) {
110
- cur.children.delete(char);
111
- return true;
112
- }
113
- return false;
114
- }
115
- return false;
116
- };
117
-
118
- dfs(this.root, 0);
119
- return isDeleted;
120
- }
121
-
122
- // --- start additional methods ---
123
- /**
124
- * The function checks if a given input string has an absolute prefix in a tree data structure.Only can present as a prefix, not a word
125
- * @param {string} input - The input parameter is a string that represents the input value for the function.
126
- * @returns a boolean value.
127
- */
128
- isAbsPrefix(input: string): boolean {
129
- let cur = this._root;
130
- for (const c of input) {
131
- const nodeC = cur.children.get(c);
132
- if (!nodeC) return false;
133
- cur = nodeC;
134
- }
135
- return !cur.isEnd;
136
- }
137
-
138
- /**
139
- * The function checks if a given input string is a prefix of any existing string in a tree structure.Can present as a abs prefix or word
140
- * @param {string} input - The input parameter is a string that represents the prefix we want to check.
141
- * @returns a boolean value.
142
- */
143
- isPrefix(input: string): boolean {
144
- let cur = this._root;
145
- for (const c of input) {
146
- const nodeC = cur.children.get(c);
147
- if (!nodeC) return false;
148
- cur = nodeC;
149
- }
150
- return true;
151
- }
152
-
153
- /**
154
- * The function checks if the input string is a common prefix in a Trie data structure.Check if the input string is the common prefix of all the words
155
- * @param {string} input - The input parameter is a string that represents the common prefix that we want to check for
156
- * in the Trie data structure.
157
- * @returns a boolean value indicating whether the input string is a common prefix in the Trie data structure.
158
- */
159
- isCommonPrefix(input: string): boolean {
160
- let commonPre = '';
161
- const dfs = (cur: TrieNode) => {
162
- commonPre += cur.val;
163
- if (commonPre === input) return;
164
- if (cur.isEnd) return;
165
- if (cur && cur.children && cur.children.size === 1) dfs(Array.from(cur.children.values())[0]);
166
- else return;
167
- };
168
- dfs(this._root);
169
- return commonPre === input;
170
- }
171
-
172
- /**
173
- * The function `getLongestCommonPrefix` returns the longest common prefix among all the words stored in a Trie data
174
- * structure.
175
- * @returns The function `getLongestCommonPrefix` returns a string, which is the longest common prefix found in the
176
- * Trie.
177
- */
178
- getLongestCommonPrefix(): string {
179
- let commonPre = '';
180
- const dfs = (cur: TrieNode) => {
181
- commonPre += cur.val;
182
- if (cur.isEnd) return;
183
- if (cur && cur.children && cur.children.size === 1) dfs(Array.from(cur.children.values())[0]);
184
- else return;
185
- };
186
- dfs(this._root);
187
- return commonPre;
188
- }
189
-
190
- /**
191
- * The `getAll` function returns an array of all words in a Trie data structure that start with a given prefix.
192
- * @param [prefix] - The `prefix` parameter is a string that represents the prefix that we want to search for in the
193
- * trie. It is an optional parameter, so if no prefix is provided, it will default to an empty string.
194
- * @returns an array of strings.
195
- */
196
- getAll(prefix = ''): string[] {
197
- const words: string[] = [];
198
-
199
- function dfs(node: TrieNode, word: string) {
200
- for (const char of node.children.keys()) {
201
- const charNode = node.children.get(char);
202
- if (charNode !== undefined) {
203
- dfs(charNode, word.concat(char));
204
- }
205
- }
206
- if (node.isEnd) {
207
- words.push(word);
208
- }
209
- }
210
-
211
- let startNode = this._root;
212
-
213
- if (prefix) {
214
- for (const c of prefix) {
215
- const nodeC = startNode.children.get(c);
216
- if (nodeC) startNode = nodeC;
217
- }
218
- }
219
-
220
- dfs(startNode, prefix);
221
- return words;
222
- }
223
-
224
- // --- end additional methods ---
225
- }
package/src/index.ts DELETED
@@ -1,4 +0,0 @@
1
- export * from './data-structures';
2
- export * from './utils';
3
- export * from './interfaces';
4
- export * from './types';
@@ -1,191 +0,0 @@
1
- import {
2
- AbstractBinaryTreeNodeProperties,
3
- AbstractBinaryTreeNodeProperty,
4
- BinaryTreeDeletedResult,
5
- BinaryTreeNodeId,
6
- BinaryTreeNodePropertyName,
7
- DFSOrderPattern,
8
- FamilyPosition,
9
- LoopType,
10
- NodeOrPropertyName
11
- } from '../types';
12
- import {AbstractBinaryTreeNode} from '../data-structures';
13
-
14
- export interface IAbstractBinaryTreeNode<T, NEIGHBOR extends IAbstractBinaryTreeNode<T, NEIGHBOR>> {
15
- get id(): BinaryTreeNodeId;
16
-
17
- set id(v: BinaryTreeNodeId);
18
-
19
- get val(): T | undefined;
20
-
21
- set val(v: T | undefined);
22
-
23
- get left(): NEIGHBOR | null | undefined;
24
-
25
- set left(v: NEIGHBOR | null | undefined);
26
-
27
- get right(): NEIGHBOR | null | undefined;
28
-
29
- set right(v: NEIGHBOR | null | undefined);
30
-
31
- get parent(): NEIGHBOR | null | undefined;
32
-
33
- set parent(v: NEIGHBOR | null | undefined);
34
-
35
- get familyPosition(): FamilyPosition;
36
-
37
- get height(): number;
38
-
39
- set height(v: number);
40
- }
41
-
42
- export interface IAbstractBinaryTree<N extends AbstractBinaryTreeNode<N['val'], N>> {
43
- createNode(id: BinaryTreeNodeId, val?: N['val'], count?: number): N | null;
44
-
45
- get loopType(): LoopType;
46
-
47
- get visitedId(): BinaryTreeNodeId[];
48
-
49
- get visitedVal(): Array<N['val']>;
50
-
51
- get visitedNode(): N[];
52
-
53
- get visitedLeftSum(): number[];
54
-
55
- get root(): N | null;
56
-
57
- get size(): number;
58
-
59
- swapLocation(srcNode: N, destNode: N): N;
60
-
61
- clear(): void;
62
-
63
- isEmpty(): boolean;
64
-
65
- add(id: BinaryTreeNodeId | N, val?: N['val']): N | null | undefined;
66
-
67
- addMany(idsOrNodes: (BinaryTreeNodeId | N | null)[], data?: N['val'][]): (N | null | undefined)[];
68
-
69
- fill(idsOrNodes: (BinaryTreeNodeId | N | null)[], data?: N[] | Array<N['val']>): boolean;
70
-
71
- remove(id: BinaryTreeNodeId, ignoreCount?: boolean): BinaryTreeDeletedResult<N>[];
72
-
73
- getDepth(node: N): number;
74
-
75
- getHeight(beginRoot?: N | null): number;
76
-
77
- getMinHeight(beginRoot?: N | null): number;
78
-
79
- isPerfectlyBalanced(beginRoot?: N | null): boolean;
80
-
81
- getNodes(nodeProperty: BinaryTreeNodeId | N, propertyName?: BinaryTreeNodePropertyName, onlyOne?: boolean): N[];
82
-
83
- has(nodeProperty: BinaryTreeNodeId | N, propertyName?: BinaryTreeNodePropertyName): boolean;
84
-
85
- get(nodeProperty: BinaryTreeNodeId | N, propertyName?: BinaryTreeNodePropertyName): N | null;
86
-
87
- getPathToRoot(node: N): N[];
88
-
89
- getLeftMost(): N | null;
90
-
91
- getLeftMost(node: N): N;
92
-
93
- getLeftMost(node?: N | null): N | null;
94
-
95
- getRightMost(): N | null;
96
-
97
- getRightMost(node: N): N;
98
-
99
- getRightMost(node?: N | null): N | null;
100
-
101
- isSubtreeBST(node: N | null): boolean;
102
-
103
- isBST(): boolean;
104
-
105
- getSubTreeSize(subTreeRoot: N | null | undefined): number;
106
-
107
- // --- start additional methods ---
108
-
109
- subTreeSum(subTreeRoot: N, propertyName?: BinaryTreeNodePropertyName): number;
110
-
111
- subTreeAdd(subTreeRoot: N, delta: number, propertyName?: BinaryTreeNodePropertyName): boolean;
112
-
113
- BFS(): BinaryTreeNodeId[];
114
-
115
- BFS(nodeOrPropertyName: 'id'): BinaryTreeNodeId[];
116
-
117
- BFS(nodeOrPropertyName: 'val'): N['val'][];
118
-
119
- BFS(nodeOrPropertyName: 'node'): N[];
120
-
121
- BFS(nodeOrPropertyName: 'count'): number[];
122
-
123
- BFS(nodeOrPropertyName?: NodeOrPropertyName): AbstractBinaryTreeNodeProperties<N>;
124
-
125
- DFS(): BinaryTreeNodeId[];
126
-
127
- DFS(pattern?: DFSOrderPattern, nodeOrPropertyName?: 'id'): BinaryTreeNodeId[];
128
-
129
- DFS(pattern?: DFSOrderPattern, nodeOrPropertyName?: 'val'): N[];
130
-
131
- DFS(pattern?: DFSOrderPattern, nodeOrPropertyName?: 'node'): N[];
132
-
133
- DFS(pattern?: DFSOrderPattern, nodeOrPropertyName?: 'count'): number[];
134
-
135
- DFS(pattern?: 'in' | 'pre' | 'post', nodeOrPropertyName?: NodeOrPropertyName): AbstractBinaryTreeNodeProperties<N>;
136
-
137
- DFSIterative(): BinaryTreeNodeId[];
138
-
139
- DFSIterative(pattern?: DFSOrderPattern, nodeOrPropertyName?: 'id'): BinaryTreeNodeId[];
140
-
141
- DFSIterative(pattern?: DFSOrderPattern, nodeOrPropertyName?: 'val'): N[];
142
-
143
- DFSIterative(pattern?: DFSOrderPattern, nodeOrPropertyName?: 'node'): N[];
144
-
145
- DFSIterative(pattern?: DFSOrderPattern, nodeOrPropertyName?: 'count'): number[];
146
-
147
- DFSIterative(
148
- pattern?: 'in' | 'pre' | 'post',
149
- nodeOrPropertyName?: NodeOrPropertyName
150
- ): AbstractBinaryTreeNodeProperties<N>;
151
-
152
- levelIterative(node: N | null): BinaryTreeNodeId[];
153
-
154
- levelIterative(node: N | null, nodeOrPropertyName?: 'id'): BinaryTreeNodeId[];
155
-
156
- levelIterative(node: N | null, nodeOrPropertyName?: 'val'): N['val'][];
157
-
158
- levelIterative(node: N | null, nodeOrPropertyName?: 'node'): N[];
159
-
160
- levelIterative(node: N | null, nodeOrPropertyName?: 'count'): number[];
161
-
162
- levelIterative(node: N | null, nodeOrPropertyName?: NodeOrPropertyName): AbstractBinaryTreeNodeProperties<N>;
163
-
164
- listLevels(node: N | null): BinaryTreeNodeId[][];
165
-
166
- listLevels(node: N | null, nodeOrPropertyName?: 'id'): BinaryTreeNodeId[][];
167
-
168
- listLevels(node: N | null, nodeOrPropertyName?: 'val'): N['val'][][];
169
-
170
- listLevels(node: N | null, nodeOrPropertyName?: 'node'): N[][];
171
-
172
- listLevels(node: N | null, nodeOrPropertyName?: 'count'): number[][];
173
-
174
- listLevels(node: N | null, nodeOrPropertyName?: NodeOrPropertyName): AbstractBinaryTreeNodeProperty<N>[][];
175
-
176
- getPredecessor(node: N): N;
177
-
178
- morris(): BinaryTreeNodeId[];
179
-
180
- morris(pattern?: DFSOrderPattern, nodeOrPropertyName?: 'id'): BinaryTreeNodeId[];
181
-
182
- morris(pattern?: DFSOrderPattern, nodeOrPropertyName?: 'val'): N[];
183
-
184
- morris(pattern?: DFSOrderPattern, nodeOrPropertyName?: 'node'): N[];
185
-
186
- morris(pattern?: DFSOrderPattern, nodeOrPropertyName?: 'count'): number[];
187
-
188
- morris(pattern?: 'in' | 'pre' | 'post', nodeOrPropertyName?: NodeOrPropertyName): AbstractBinaryTreeNodeProperties<N>;
189
-
190
- // --- end additional methods ---
191
- }
@@ -1,31 +0,0 @@
1
- import {VertexId} from '../types';
2
-
3
- export interface IAbstractGraph<V, E> {
4
- hasVertex(vertexOrId: V | VertexId): boolean;
5
-
6
- addVertex(id: VertexId, val?: V): boolean;
7
-
8
- removeVertex(vertexOrId: V | VertexId): boolean;
9
-
10
- removeAllVertices(vertices: V[] | VertexId[]): boolean;
11
-
12
- degreeOf(vertexOrId: V | VertexId): number;
13
-
14
- edgesOf(vertexOrId: V | VertexId): E[];
15
-
16
- hasEdge(src: V | VertexId, dest: V | VertexId): boolean;
17
-
18
- getEdge(srcOrId: V | VertexId, destOrId: V | VertexId): E | null;
19
-
20
- edgeSet(): E[];
21
-
22
- addEdge(src: V | VertexId, dest: V | VertexId, weight: number, val: E): boolean;
23
-
24
- removeEdge(edge: E): E | null;
25
-
26
- setEdgeWeight(srcOrId: V | VertexId, destOrId: V | VertexId, weight: number): boolean;
27
-
28
- getMinPathBetween(v1: V | VertexId, v2: V | VertexId, isWeight?: boolean): V[] | null;
29
-
30
- getNeighbors(vertexOrId: V | VertexId): V[];
31
- }
@@ -1,25 +0,0 @@
1
- import {AVLTreeNode} from '../data-structures';
2
- import {IBST, IBSTNode} from './bst';
3
- import {BinaryTreeDeletedResult, BinaryTreeNodeId} from '../types';
4
-
5
- export type IAVLTreeNode<T, NEIGHBOR extends IAVLTreeNode<T, NEIGHBOR>> = IBSTNode<T, NEIGHBOR>;
6
-
7
- export interface IAVLTree<N extends AVLTreeNode<N['val'], N>> extends IBST<N> {
8
- add(id: BinaryTreeNodeId, val?: N['val'] | null): N | null | undefined;
9
-
10
- remove(id: BinaryTreeNodeId, isUpdateAllLeftSum?: boolean): BinaryTreeDeletedResult<N>[];
11
-
12
- // _balanceFactor(node: N): number
13
- //
14
- // _updateHeight(node: N): void
15
- //
16
- // _balancePath(node: N): void
17
- //
18
- // _balanceLL(A: N): void
19
- //
20
- // _balanceLR(A: N): void
21
- //
22
- // _balanceRR(A: N): void
23
- //
24
- // _balanceRL(A: N): void
25
- }
@@ -1,6 +0,0 @@
1
- import {BinaryTreeNode} from '../data-structures';
2
- import {IAbstractBinaryTree, IAbstractBinaryTreeNode} from './abstract-binary-tree';
3
-
4
- export type IBinaryTreeNode<T, NEIGHBOR extends IBinaryTreeNode<T, NEIGHBOR>> = IAbstractBinaryTreeNode<T, NEIGHBOR>;
5
-
6
- export type IBinaryTree<N extends BinaryTreeNode<N['val'], N>> = IAbstractBinaryTree<N>;
@@ -1,31 +0,0 @@
1
- import {BSTNode} from '../data-structures';
2
- import {IBinaryTree, IBinaryTreeNode} from './binary-tree';
3
- import {BinaryTreeDeletedResult, BinaryTreeNodeId, BinaryTreeNodePropertyName} from '../types';
4
-
5
- export type IBSTNode<T, NEIGHBOR extends IBSTNode<T, NEIGHBOR>> = IBinaryTreeNode<T, NEIGHBOR>;
6
-
7
- export interface IBST<N extends BSTNode<N['val'], N>> extends IBinaryTree<N> {
8
- createNode(id: BinaryTreeNodeId, val?: N['val'], count?: number): N;
9
-
10
- add(id: BinaryTreeNodeId, val?: N['val'] | null, count?: number): N | null | undefined;
11
-
12
- get(nodeProperty: BinaryTreeNodeId | N, propertyName?: BinaryTreeNodePropertyName): N | null;
13
-
14
- lastKey(): BinaryTreeNodeId;
15
-
16
- remove(id: BinaryTreeNodeId, ignoreCount?: boolean): BinaryTreeDeletedResult<N>[];
17
-
18
- getNodes(nodeProperty: BinaryTreeNodeId | N, propertyName?: BinaryTreeNodePropertyName, onlyOne?: boolean): N[];
19
-
20
- // --- start additional functions
21
-
22
- lesserSum(id: BinaryTreeNodeId, propertyName?: BinaryTreeNodePropertyName): number;
23
-
24
- allGreaterNodesAdd(node: N, delta: number, propertyName?: BinaryTreeNodePropertyName): boolean;
25
-
26
- perfectlyBalance(): boolean;
27
-
28
- isAVLBalanced(): boolean;
29
-
30
- // --- end additional functions
31
- }
@@ -1,20 +0,0 @@
1
- import {VertexId} from '../types';
2
- import {IAbstractGraph} from './abstract-graph';
3
-
4
- export interface IDirectedGraph<V, E> extends IAbstractGraph<V, E> {
5
- incomingEdgesOf(vertex: V): E[];
6
-
7
- outgoingEdgesOf(vertex: V): E[];
8
-
9
- inDegreeOf(vertexOrId: V | VertexId): number;
10
-
11
- outDegreeOf(vertexOrId: V | VertexId): number;
12
-
13
- getEdgeSrc(e: E): V | null;
14
-
15
- getEdgeDest(e: E): V | null;
16
-
17
- removeEdgeSrcToDest(srcOrId: V | VertexId, destOrId: V | VertexId): E | null;
18
-
19
- removeEdgesBetween(v1: V | VertexId, v2: V | VertexId): E[];
20
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,15 +0,0 @@
1
- export * from './abstract-binary-tree';
2
- export * from './abstract-graph';
3
- export * from './avl-tree';
4
- export * from './binary-tree';
5
- export * from './bst';
6
- export * from './directed-graph';
7
- export * from './doubly-linked-list';
8
- export * from './heap';
9
- export * from './navigator';
10
- export * from './priority-queue';
11
- export * from './rb-tree';
12
- export * from './segment-tree';
13
- export * from './singly-linked-list';
14
- export * from './tree-multiset';
15
- export * from './undirected-graph';
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,9 +0,0 @@
1
- import {RBTreeNode} from '../data-structures';
2
- import {IBST, IBSTNode} from './bst';
3
- import {BinaryTreeNodeId} from '../types';
4
-
5
- export type IRBTreeNode<T, NEIGHBOR extends IRBTreeNode<T, NEIGHBOR>> = IBSTNode<T, NEIGHBOR>;
6
-
7
- export interface IRBTree<N extends RBTreeNode<N['val'], N>> extends IBST<N> {
8
- createNode(id: BinaryTreeNodeId, val?: N['val'], count?: number): N;
9
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,7 +0,0 @@
1
- import {TreeMultisetNode} from '../data-structures';
2
- import {IBSTNode} from './bst';
3
- import {IAVLTree} from './avl-tree';
4
-
5
- export type ITreeMultisetNode<T, NEIGHBOR extends ITreeMultisetNode<T, NEIGHBOR>> = IBSTNode<T, NEIGHBOR>;
6
-
7
- export type ITreeMultiset<N extends TreeMultisetNode<N['val'], N>> = IAVLTree<N>;
@@ -1,6 +0,0 @@
1
- import {VertexId} from '../types';
2
- import {IAbstractGraph} from './abstract-graph';
3
-
4
- export interface IUNDirectedGraph<V, E> extends IAbstractGraph<V, E> {
5
- removeEdgeBetween(v1: V | VertexId, v2: V | VertexId): E | null;
6
- }
@@ -1,50 +0,0 @@
1
- import {AbstractBinaryTreeNode} from '../../data-structures';
2
-
3
- /**
4
- * Enum representing different loop types.
5
- *
6
- * - `iterative`: Indicates the iterative loop type (with loops that use iterations).
7
- * - `recursive`: Indicates the recursive loop type (with loops that call themselves).
8
- */
9
-
10
- export enum LoopType {
11
- ITERATIVE = 'ITERATIVE',
12
- RECURSIVE = 'RECURSIVE'
13
- }
14
-
15
- /* This enumeration defines the position of a node within a family tree composed of three associated nodes, where 'root' represents the root node of the family tree, 'left' represents the left child node, and 'right' represents the right child node. */
16
- export enum FamilyPosition {
17
- ROOT = 'ROOT',
18
- LEFT = 'LEFT',
19
- RIGHT = 'RIGHT',
20
- ROOT_LEFT = 'ROOT_LEFT',
21
- ROOT_RIGHT = 'ROOT_RIGHT',
22
- ISOLATED = 'ISOLATED',
23
- MAL_NODE = 'MAL_NODE'
24
- }
25
-
26
- export type BinaryTreeNodePropertyName = 'id' | 'val';
27
-
28
- export type NodeOrPropertyName = 'node' | BinaryTreeNodePropertyName;
29
-
30
- export type DFSOrderPattern = 'in' | 'pre' | 'post';
31
-
32
- export type BinaryTreeNodeId = number;
33
-
34
- export type BinaryTreeDeletedResult<N> = { deleted: N | null | undefined; needBalanced: N | null };
35
-
36
- export type AbstractBinaryTreeNodeProperty<N extends AbstractBinaryTreeNode<N['val'], N>> =
37
- | N['val']
38
- | N
39
- | number
40
- | BinaryTreeNodeId;
41
-
42
-
43
- export type AbstractBinaryTreeNodeProperties<N extends AbstractBinaryTreeNode<N['val'], N>> =
44
- AbstractBinaryTreeNodeProperty<N>[];
45
-
46
- export type AbstractBinaryTreeNodeNested<T> = AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, AbstractBinaryTreeNode<T, any>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>;
47
-
48
- export type AbstractBinaryTreeOptions = {
49
- loopType?: LoopType
50
- };
@@ -1,11 +0,0 @@
1
- export type VertexId = string | number;
2
- export type EdgeId = string;
3
- export type DijkstraResult<V> = {
4
- distMap: Map<V, number>;
5
- distPaths?: Map<V, V[]>;
6
- preMap: Map<V, V | null>;
7
- seen: Set<V>;
8
- paths: V[][];
9
- minDist: number;
10
- minPath: V[];
11
- } | null;
@@ -1,5 +0,0 @@
1
- import {AVLTreeNode} from '../../data-structures';
2
- import {BSTOptions} from './bst';
3
-
4
- export type AVLTreeNodeNested<T> = AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, AVLTreeNode<T, any>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
5
- export type AVLTreeOptions = BSTOptions & {};