data-structure-typed 2.0.5 → 2.1.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 (785) hide show
  1. package/CHANGELOG.md +5 -1
  2. package/COMMANDS.md +27 -0
  3. package/README.md +5 -34
  4. package/benchmark/report.html +13 -77
  5. package/benchmark/report.json +152 -184
  6. package/dist/cjs/index.cjs +13062 -0
  7. package/dist/cjs/index.cjs.map +1 -0
  8. package/dist/esm/index.mjs +12984 -0
  9. package/dist/esm/index.mjs.map +1 -0
  10. package/dist/index.cjs +13091 -0
  11. package/dist/index.cjs.map +1 -0
  12. package/dist/index.js +13013 -0
  13. package/dist/index.js.map +1 -0
  14. package/dist/types/data-structures/base/iterable-element-base.d.ts +219 -0
  15. package/dist/types/data-structures/base/iterable-entry-base.d.ts +144 -0
  16. package/dist/types/data-structures/base/linear-base.d.ts +335 -0
  17. package/dist/types/data-structures/binary-tree/avl-tree-counter.d.ts +182 -0
  18. package/dist/types/data-structures/binary-tree/avl-tree-multi-map.d.ts +135 -0
  19. package/dist/types/data-structures/binary-tree/avl-tree.d.ts +291 -0
  20. package/dist/types/data-structures/binary-tree/binary-tree.d.ts +754 -0
  21. package/dist/types/data-structures/binary-tree/bst.d.ts +413 -0
  22. package/dist/types/data-structures/binary-tree/red-black-tree.d.ts +208 -0
  23. package/dist/types/data-structures/binary-tree/tree-counter.d.ts +190 -0
  24. package/dist/{esm → types}/data-structures/binary-tree/tree-multi-map.d.ts +72 -69
  25. package/dist/types/data-structures/graph/abstract-graph.d.ts +340 -0
  26. package/dist/types/data-structures/graph/directed-graph.d.ts +207 -0
  27. package/dist/types/data-structures/graph/map-graph.d.ts +78 -0
  28. package/dist/types/data-structures/graph/undirected-graph.d.ts +188 -0
  29. package/dist/types/data-structures/hash/hash-map.d.ts +345 -0
  30. package/dist/types/data-structures/heap/heap.d.ts +503 -0
  31. package/dist/types/data-structures/heap/max-heap.d.ts +32 -0
  32. package/dist/types/data-structures/heap/min-heap.d.ts +33 -0
  33. package/dist/types/data-structures/linked-list/doubly-linked-list.d.ts +769 -0
  34. package/dist/types/data-structures/linked-list/singly-linked-list.d.ts +451 -0
  35. package/dist/types/data-structures/linked-list/skip-linked-list.d.ts +27 -0
  36. package/dist/types/data-structures/priority-queue/max-priority-queue.d.ts +27 -0
  37. package/dist/types/data-structures/priority-queue/min-priority-queue.d.ts +26 -0
  38. package/dist/types/data-structures/priority-queue/priority-queue.d.ts +15 -0
  39. package/dist/types/data-structures/queue/deque.d.ts +431 -0
  40. package/dist/types/data-structures/queue/queue.d.ts +308 -0
  41. package/dist/{cjs → types}/data-structures/stack/stack.d.ts +124 -102
  42. package/dist/types/data-structures/trie/trie.d.ts +350 -0
  43. package/dist/types/interfaces/binary-tree.d.ts +59 -0
  44. package/dist/types/interfaces/graph.d.ts +21 -0
  45. package/dist/{cjs → types}/types/data-structures/base/base.d.ts +1 -1
  46. package/dist/{esm → types}/types/data-structures/graph/abstract-graph.d.ts +4 -0
  47. package/dist/{cjs → types}/types/utils/utils.d.ts +1 -0
  48. package/dist/{esm → types}/utils/utils.d.ts +1 -1
  49. package/dist/umd/data-structure-typed.js +4693 -6484
  50. package/dist/umd/data-structure-typed.js.map +1 -0
  51. package/dist/umd/data-structure-typed.min.js +8 -6
  52. package/dist/umd/data-structure-typed.min.js.map +1 -1
  53. package/jest.integration.config.js +3 -0
  54. package/package.json +13 -12
  55. package/src/data-structures/base/iterable-element-base.ts +238 -115
  56. package/src/data-structures/base/iterable-entry-base.ts +96 -120
  57. package/src/data-structures/base/linear-base.ts +271 -277
  58. package/src/data-structures/binary-tree/avl-tree-counter.ts +196 -217
  59. package/src/data-structures/binary-tree/avl-tree-multi-map.ts +188 -102
  60. package/src/data-structures/binary-tree/avl-tree.ts +237 -206
  61. package/src/data-structures/binary-tree/binary-tree.ts +665 -896
  62. package/src/data-structures/binary-tree/bst.ts +565 -572
  63. package/src/data-structures/binary-tree/red-black-tree.ts +157 -223
  64. package/src/data-structures/binary-tree/tree-counter.ts +195 -219
  65. package/src/data-structures/binary-tree/tree-multi-map.ts +127 -98
  66. package/src/data-structures/graph/abstract-graph.ts +339 -264
  67. package/src/data-structures/graph/directed-graph.ts +146 -236
  68. package/src/data-structures/graph/map-graph.ts +63 -60
  69. package/src/data-structures/graph/undirected-graph.ts +129 -152
  70. package/src/data-structures/hash/hash-map.ts +274 -496
  71. package/src/data-structures/heap/heap.ts +389 -402
  72. package/src/data-structures/heap/max-heap.ts +12 -76
  73. package/src/data-structures/heap/min-heap.ts +13 -76
  74. package/src/data-structures/linked-list/doubly-linked-list.ts +426 -530
  75. package/src/data-structures/linked-list/singly-linked-list.ts +495 -517
  76. package/src/data-structures/linked-list/skip-linked-list.ts +1 -108
  77. package/src/data-structures/priority-queue/max-priority-queue.ts +12 -87
  78. package/src/data-structures/priority-queue/min-priority-queue.ts +11 -88
  79. package/src/data-structures/priority-queue/priority-queue.ts +3 -92
  80. package/src/data-structures/queue/deque.ts +381 -357
  81. package/src/data-structures/queue/queue.ts +310 -264
  82. package/src/data-structures/stack/stack.ts +217 -131
  83. package/src/data-structures/trie/trie.ts +240 -175
  84. package/src/interfaces/binary-tree.ts +240 -6
  85. package/src/interfaces/graph.ts +37 -0
  86. package/src/types/data-structures/base/base.ts +5 -5
  87. package/src/types/data-structures/graph/abstract-graph.ts +5 -0
  88. package/src/types/utils/utils.ts +2 -0
  89. package/src/utils/utils.ts +9 -14
  90. package/test/integration/all-in-one.test.ts +1 -1
  91. package/test/integration/index.html +1 -1
  92. package/test/performance/benchmark-runner.ts +528 -0
  93. package/test/performance/data-structures/comparison/comparison.test.ts +27 -57
  94. package/test/performance/reportor.mjs +43 -43
  95. package/test/performance/runner-config.json +39 -0
  96. package/test/performance/single-suite-runner.ts +69 -0
  97. package/test/unit/data-structures/binary-tree/avl-tree-counter.test.ts +3 -3
  98. package/test/unit/data-structures/binary-tree/avl-tree-multi-map.test.ts +5 -5
  99. package/test/unit/data-structures/binary-tree/avl-tree.test.ts +4 -4
  100. package/test/unit/data-structures/binary-tree/binary-tree.test.ts +350 -90
  101. package/test/unit/data-structures/binary-tree/bst.test.ts +12 -9
  102. package/test/unit/data-structures/binary-tree/red-black-tree.test.ts +2 -2
  103. package/test/unit/data-structures/binary-tree/tree-counter.test.ts +25 -24
  104. package/test/unit/data-structures/binary-tree/tree-multi-map.test.ts +112 -4
  105. package/test/unit/data-structures/graph/abstract-graph.test.ts +0 -4
  106. package/test/unit/data-structures/graph/directed-graph.test.ts +1 -1
  107. package/test/unit/data-structures/heap/heap.test.ts +14 -21
  108. package/test/unit/data-structures/heap/max-heap.test.ts +5 -9
  109. package/test/unit/data-structures/heap/min-heap.test.ts +1 -4
  110. package/test/unit/data-structures/linked-list/doubly-linked-list.test.ts +14 -14
  111. package/test/unit/data-structures/linked-list/singly-linked-list.test.ts +0 -7
  112. package/test/unit/data-structures/priority-queue/max-priority-queue.test.ts +8 -11
  113. package/test/unit/data-structures/priority-queue/min-priority-queue.test.ts +1 -4
  114. package/test/unit/data-structures/priority-queue/priority-queue.test.ts +1 -4
  115. package/test/unit/data-structures/queue/queue.test.ts +4 -5
  116. package/test/unit/utils/utils.test.ts +0 -1
  117. package/tsconfig-base.json +20 -20
  118. package/tsconfig-types.json +17 -0
  119. package/tsconfig.test.json +8 -0
  120. package/tsup.config.js +11 -22
  121. package/tsup.node.config.ts +37 -0
  122. package/dist/cjs/common/index.js +0 -29
  123. package/dist/cjs/common/index.js.map +0 -1
  124. package/dist/cjs/data-structures/base/index.js +0 -19
  125. package/dist/cjs/data-structures/base/index.js.map +0 -1
  126. package/dist/cjs/data-structures/base/iterable-element-base.d.ts +0 -116
  127. package/dist/cjs/data-structures/base/iterable-element-base.js +0 -202
  128. package/dist/cjs/data-structures/base/iterable-element-base.js.map +0 -1
  129. package/dist/cjs/data-structures/base/iterable-entry-base.d.ts +0 -168
  130. package/dist/cjs/data-structures/base/iterable-entry-base.js +0 -241
  131. package/dist/cjs/data-structures/base/iterable-entry-base.js.map +0 -1
  132. package/dist/cjs/data-structures/base/linear-base.d.ts +0 -277
  133. package/dist/cjs/data-structures/base/linear-base.js +0 -553
  134. package/dist/cjs/data-structures/base/linear-base.js.map +0 -1
  135. package/dist/cjs/data-structures/binary-tree/avl-tree-counter.d.ts +0 -214
  136. package/dist/cjs/data-structures/binary-tree/avl-tree-counter.js +0 -409
  137. package/dist/cjs/data-structures/binary-tree/avl-tree-counter.js.map +0 -1
  138. package/dist/cjs/data-structures/binary-tree/avl-tree-multi-map.d.ts +0 -104
  139. package/dist/cjs/data-structures/binary-tree/avl-tree-multi-map.js +0 -203
  140. package/dist/cjs/data-structures/binary-tree/avl-tree-multi-map.js.map +0 -1
  141. package/dist/cjs/data-structures/binary-tree/avl-tree.d.ts +0 -302
  142. package/dist/cjs/data-structures/binary-tree/avl-tree.js +0 -599
  143. package/dist/cjs/data-structures/binary-tree/avl-tree.js.map +0 -1
  144. package/dist/cjs/data-structures/binary-tree/binary-indexed-tree.js +0 -295
  145. package/dist/cjs/data-structures/binary-tree/binary-indexed-tree.js.map +0 -1
  146. package/dist/cjs/data-structures/binary-tree/binary-tree.d.ts +0 -910
  147. package/dist/cjs/data-structures/binary-tree/binary-tree.js +0 -2197
  148. package/dist/cjs/data-structures/binary-tree/binary-tree.js.map +0 -1
  149. package/dist/cjs/data-structures/binary-tree/bst.d.ts +0 -461
  150. package/dist/cjs/data-structures/binary-tree/bst.js +0 -880
  151. package/dist/cjs/data-structures/binary-tree/bst.js.map +0 -1
  152. package/dist/cjs/data-structures/binary-tree/index.js +0 -27
  153. package/dist/cjs/data-structures/binary-tree/index.js.map +0 -1
  154. package/dist/cjs/data-structures/binary-tree/red-black-tree.d.ts +0 -280
  155. package/dist/cjs/data-structures/binary-tree/red-black-tree.js +0 -642
  156. package/dist/cjs/data-structures/binary-tree/red-black-tree.js.map +0 -1
  157. package/dist/cjs/data-structures/binary-tree/segment-tree.js +0 -298
  158. package/dist/cjs/data-structures/binary-tree/segment-tree.js.map +0 -1
  159. package/dist/cjs/data-structures/binary-tree/tree-counter.d.ts +0 -212
  160. package/dist/cjs/data-structures/binary-tree/tree-counter.js +0 -445
  161. package/dist/cjs/data-structures/binary-tree/tree-counter.js.map +0 -1
  162. package/dist/cjs/data-structures/binary-tree/tree-multi-map.d.ts +0 -267
  163. package/dist/cjs/data-structures/binary-tree/tree-multi-map.js +0 -365
  164. package/dist/cjs/data-structures/binary-tree/tree-multi-map.js.map +0 -1
  165. package/dist/cjs/data-structures/graph/abstract-graph.d.ts +0 -335
  166. package/dist/cjs/data-structures/graph/abstract-graph.js +0 -867
  167. package/dist/cjs/data-structures/graph/abstract-graph.js.map +0 -1
  168. package/dist/cjs/data-structures/graph/directed-graph.d.ts +0 -323
  169. package/dist/cjs/data-structures/graph/directed-graph.js +0 -613
  170. package/dist/cjs/data-structures/graph/directed-graph.js.map +0 -1
  171. package/dist/cjs/data-structures/graph/index.js +0 -21
  172. package/dist/cjs/data-structures/graph/index.js.map +0 -1
  173. package/dist/cjs/data-structures/graph/map-graph.d.ts +0 -84
  174. package/dist/cjs/data-structures/graph/map-graph.js +0 -111
  175. package/dist/cjs/data-structures/graph/map-graph.js.map +0 -1
  176. package/dist/cjs/data-structures/graph/undirected-graph.d.ts +0 -231
  177. package/dist/cjs/data-structures/graph/undirected-graph.js +0 -445
  178. package/dist/cjs/data-structures/graph/undirected-graph.js.map +0 -1
  179. package/dist/cjs/data-structures/hash/hash-map.d.ts +0 -519
  180. package/dist/cjs/data-structures/hash/hash-map.js +0 -880
  181. package/dist/cjs/data-structures/hash/hash-map.js.map +0 -1
  182. package/dist/cjs/data-structures/hash/index.js +0 -18
  183. package/dist/cjs/data-structures/hash/index.js.map +0 -1
  184. package/dist/cjs/data-structures/heap/heap.d.ts +0 -578
  185. package/dist/cjs/data-structures/heap/heap.js +0 -911
  186. package/dist/cjs/data-structures/heap/heap.js.map +0 -1
  187. package/dist/cjs/data-structures/heap/index.js +0 -20
  188. package/dist/cjs/data-structures/heap/index.js.map +0 -1
  189. package/dist/cjs/data-structures/heap/max-heap.d.ts +0 -68
  190. package/dist/cjs/data-structures/heap/max-heap.js +0 -96
  191. package/dist/cjs/data-structures/heap/max-heap.js.map +0 -1
  192. package/dist/cjs/data-structures/heap/min-heap.d.ts +0 -68
  193. package/dist/cjs/data-structures/heap/min-heap.js +0 -87
  194. package/dist/cjs/data-structures/heap/min-heap.js.map +0 -1
  195. package/dist/cjs/data-structures/index.js +0 -29
  196. package/dist/cjs/data-structures/index.js.map +0 -1
  197. package/dist/cjs/data-structures/linked-list/doubly-linked-list.d.ts +0 -885
  198. package/dist/cjs/data-structures/linked-list/doubly-linked-list.js +0 -1238
  199. package/dist/cjs/data-structures/linked-list/doubly-linked-list.js.map +0 -1
  200. package/dist/cjs/data-structures/linked-list/index.js +0 -20
  201. package/dist/cjs/data-structures/linked-list/index.js.map +0 -1
  202. package/dist/cjs/data-structures/linked-list/singly-linked-list.d.ts +0 -500
  203. package/dist/cjs/data-structures/linked-list/singly-linked-list.js +0 -870
  204. package/dist/cjs/data-structures/linked-list/singly-linked-list.js.map +0 -1
  205. package/dist/cjs/data-structures/linked-list/skip-linked-list.d.ts +0 -134
  206. package/dist/cjs/data-structures/linked-list/skip-linked-list.js +0 -245
  207. package/dist/cjs/data-structures/linked-list/skip-linked-list.js.map +0 -1
  208. package/dist/cjs/data-structures/matrix/index.js +0 -19
  209. package/dist/cjs/data-structures/matrix/index.js.map +0 -1
  210. package/dist/cjs/data-structures/matrix/matrix.js +0 -449
  211. package/dist/cjs/data-structures/matrix/matrix.js.map +0 -1
  212. package/dist/cjs/data-structures/matrix/navigator.js +0 -112
  213. package/dist/cjs/data-structures/matrix/navigator.js.map +0 -1
  214. package/dist/cjs/data-structures/priority-queue/index.js +0 -20
  215. package/dist/cjs/data-structures/priority-queue/index.js.map +0 -1
  216. package/dist/cjs/data-structures/priority-queue/max-priority-queue.d.ts +0 -71
  217. package/dist/cjs/data-structures/priority-queue/max-priority-queue.js +0 -102
  218. package/dist/cjs/data-structures/priority-queue/max-priority-queue.js.map +0 -1
  219. package/dist/cjs/data-structures/priority-queue/min-priority-queue.d.ts +0 -72
  220. package/dist/cjs/data-structures/priority-queue/min-priority-queue.js +0 -94
  221. package/dist/cjs/data-structures/priority-queue/min-priority-queue.js.map +0 -1
  222. package/dist/cjs/data-structures/priority-queue/priority-queue.d.ts +0 -74
  223. package/dist/cjs/data-structures/priority-queue/priority-queue.js +0 -96
  224. package/dist/cjs/data-structures/priority-queue/priority-queue.js.map +0 -1
  225. package/dist/cjs/data-structures/queue/deque.d.ts +0 -458
  226. package/dist/cjs/data-structures/queue/deque.js +0 -919
  227. package/dist/cjs/data-structures/queue/deque.js.map +0 -1
  228. package/dist/cjs/data-structures/queue/index.js +0 -19
  229. package/dist/cjs/data-structures/queue/index.js.map +0 -1
  230. package/dist/cjs/data-structures/queue/queue.d.ts +0 -329
  231. package/dist/cjs/data-structures/queue/queue.js +0 -457
  232. package/dist/cjs/data-structures/queue/queue.js.map +0 -1
  233. package/dist/cjs/data-structures/stack/index.js +0 -18
  234. package/dist/cjs/data-structures/stack/index.js.map +0 -1
  235. package/dist/cjs/data-structures/stack/stack.js +0 -346
  236. package/dist/cjs/data-structures/stack/stack.js.map +0 -1
  237. package/dist/cjs/data-structures/tree/index.js +0 -18
  238. package/dist/cjs/data-structures/tree/index.js.map +0 -1
  239. package/dist/cjs/data-structures/tree/tree.js +0 -108
  240. package/dist/cjs/data-structures/tree/tree.js.map +0 -1
  241. package/dist/cjs/data-structures/trie/index.js +0 -18
  242. package/dist/cjs/data-structures/trie/index.js.map +0 -1
  243. package/dist/cjs/data-structures/trie/trie.d.ts +0 -351
  244. package/dist/cjs/data-structures/trie/trie.js +0 -594
  245. package/dist/cjs/data-structures/trie/trie.js.map +0 -1
  246. package/dist/cjs/index.js +0 -22
  247. package/dist/cjs/index.js.map +0 -1
  248. package/dist/cjs/interfaces/binary-tree.d.ts +0 -9
  249. package/dist/cjs/interfaces/binary-tree.js +0 -3
  250. package/dist/cjs/interfaces/binary-tree.js.map +0 -1
  251. package/dist/cjs/interfaces/doubly-linked-list.js +0 -3
  252. package/dist/cjs/interfaces/doubly-linked-list.js.map +0 -1
  253. package/dist/cjs/interfaces/graph.d.ts +0 -5
  254. package/dist/cjs/interfaces/graph.js +0 -3
  255. package/dist/cjs/interfaces/graph.js.map +0 -1
  256. package/dist/cjs/interfaces/heap.js +0 -3
  257. package/dist/cjs/interfaces/heap.js.map +0 -1
  258. package/dist/cjs/interfaces/index.js +0 -25
  259. package/dist/cjs/interfaces/index.js.map +0 -1
  260. package/dist/cjs/interfaces/navigator.js +0 -3
  261. package/dist/cjs/interfaces/navigator.js.map +0 -1
  262. package/dist/cjs/interfaces/priority-queue.js +0 -3
  263. package/dist/cjs/interfaces/priority-queue.js.map +0 -1
  264. package/dist/cjs/interfaces/segment-tree.js +0 -3
  265. package/dist/cjs/interfaces/segment-tree.js.map +0 -1
  266. package/dist/cjs/interfaces/singly-linked-list.js +0 -3
  267. package/dist/cjs/interfaces/singly-linked-list.js.map +0 -1
  268. package/dist/cjs/types/common.js +0 -3
  269. package/dist/cjs/types/common.js.map +0 -1
  270. package/dist/cjs/types/data-structures/base/base.js +0 -3
  271. package/dist/cjs/types/data-structures/base/base.js.map +0 -1
  272. package/dist/cjs/types/data-structures/base/index.js +0 -18
  273. package/dist/cjs/types/data-structures/base/index.js.map +0 -1
  274. package/dist/cjs/types/data-structures/binary-tree/avl-tree-counter.js +0 -3
  275. package/dist/cjs/types/data-structures/binary-tree/avl-tree-counter.js.map +0 -1
  276. package/dist/cjs/types/data-structures/binary-tree/avl-tree-multi-map.js +0 -3
  277. package/dist/cjs/types/data-structures/binary-tree/avl-tree-multi-map.js.map +0 -1
  278. package/dist/cjs/types/data-structures/binary-tree/avl-tree.js +0 -3
  279. package/dist/cjs/types/data-structures/binary-tree/avl-tree.js.map +0 -1
  280. package/dist/cjs/types/data-structures/binary-tree/binary-indexed-tree.js +0 -3
  281. package/dist/cjs/types/data-structures/binary-tree/binary-indexed-tree.js.map +0 -1
  282. package/dist/cjs/types/data-structures/binary-tree/binary-tree.js +0 -3
  283. package/dist/cjs/types/data-structures/binary-tree/binary-tree.js.map +0 -1
  284. package/dist/cjs/types/data-structures/binary-tree/bst.js +0 -3
  285. package/dist/cjs/types/data-structures/binary-tree/bst.js.map +0 -1
  286. package/dist/cjs/types/data-structures/binary-tree/index.js +0 -26
  287. package/dist/cjs/types/data-structures/binary-tree/index.js.map +0 -1
  288. package/dist/cjs/types/data-structures/binary-tree/red-black-tree.js +0 -3
  289. package/dist/cjs/types/data-structures/binary-tree/red-black-tree.js.map +0 -1
  290. package/dist/cjs/types/data-structures/binary-tree/segment-tree.js +0 -3
  291. package/dist/cjs/types/data-structures/binary-tree/segment-tree.js.map +0 -1
  292. package/dist/cjs/types/data-structures/binary-tree/tree-counter.js +0 -3
  293. package/dist/cjs/types/data-structures/binary-tree/tree-counter.js.map +0 -1
  294. package/dist/cjs/types/data-structures/binary-tree/tree-multi-map.js +0 -3
  295. package/dist/cjs/types/data-structures/binary-tree/tree-multi-map.js.map +0 -1
  296. package/dist/cjs/types/data-structures/graph/abstract-graph.d.ts +0 -10
  297. package/dist/cjs/types/data-structures/graph/abstract-graph.js +0 -3
  298. package/dist/cjs/types/data-structures/graph/abstract-graph.js.map +0 -1
  299. package/dist/cjs/types/data-structures/graph/directed-graph.js +0 -3
  300. package/dist/cjs/types/data-structures/graph/directed-graph.js.map +0 -1
  301. package/dist/cjs/types/data-structures/graph/index.js +0 -20
  302. package/dist/cjs/types/data-structures/graph/index.js.map +0 -1
  303. package/dist/cjs/types/data-structures/graph/map-graph.js +0 -3
  304. package/dist/cjs/types/data-structures/graph/map-graph.js.map +0 -1
  305. package/dist/cjs/types/data-structures/graph/undirected-graph.js +0 -3
  306. package/dist/cjs/types/data-structures/graph/undirected-graph.js.map +0 -1
  307. package/dist/cjs/types/data-structures/hash/hash-map.js +0 -3
  308. package/dist/cjs/types/data-structures/hash/hash-map.js.map +0 -1
  309. package/dist/cjs/types/data-structures/hash/index.js +0 -18
  310. package/dist/cjs/types/data-structures/hash/index.js.map +0 -1
  311. package/dist/cjs/types/data-structures/heap/heap.js +0 -3
  312. package/dist/cjs/types/data-structures/heap/heap.js.map +0 -1
  313. package/dist/cjs/types/data-structures/heap/index.js +0 -18
  314. package/dist/cjs/types/data-structures/heap/index.js.map +0 -1
  315. package/dist/cjs/types/data-structures/heap/max-heap.js +0 -3
  316. package/dist/cjs/types/data-structures/heap/max-heap.js.map +0 -1
  317. package/dist/cjs/types/data-structures/heap/min-heap.js +0 -3
  318. package/dist/cjs/types/data-structures/heap/min-heap.js.map +0 -1
  319. package/dist/cjs/types/data-structures/index.js +0 -29
  320. package/dist/cjs/types/data-structures/index.js.map +0 -1
  321. package/dist/cjs/types/data-structures/linked-list/doubly-linked-list.js +0 -3
  322. package/dist/cjs/types/data-structures/linked-list/doubly-linked-list.js.map +0 -1
  323. package/dist/cjs/types/data-structures/linked-list/index.js +0 -20
  324. package/dist/cjs/types/data-structures/linked-list/index.js.map +0 -1
  325. package/dist/cjs/types/data-structures/linked-list/singly-linked-list.js +0 -3
  326. package/dist/cjs/types/data-structures/linked-list/singly-linked-list.js.map +0 -1
  327. package/dist/cjs/types/data-structures/linked-list/skip-linked-list.js +0 -3
  328. package/dist/cjs/types/data-structures/linked-list/skip-linked-list.js.map +0 -1
  329. package/dist/cjs/types/data-structures/matrix/index.js +0 -19
  330. package/dist/cjs/types/data-structures/matrix/index.js.map +0 -1
  331. package/dist/cjs/types/data-structures/matrix/matrix.js +0 -3
  332. package/dist/cjs/types/data-structures/matrix/matrix.js.map +0 -1
  333. package/dist/cjs/types/data-structures/matrix/navigator.js +0 -3
  334. package/dist/cjs/types/data-structures/matrix/navigator.js.map +0 -1
  335. package/dist/cjs/types/data-structures/priority-queue/index.js +0 -20
  336. package/dist/cjs/types/data-structures/priority-queue/index.js.map +0 -1
  337. package/dist/cjs/types/data-structures/priority-queue/max-priority-queue.js +0 -3
  338. package/dist/cjs/types/data-structures/priority-queue/max-priority-queue.js.map +0 -1
  339. package/dist/cjs/types/data-structures/priority-queue/min-priority-queue.js +0 -3
  340. package/dist/cjs/types/data-structures/priority-queue/min-priority-queue.js.map +0 -1
  341. package/dist/cjs/types/data-structures/priority-queue/priority-queue.js +0 -3
  342. package/dist/cjs/types/data-structures/priority-queue/priority-queue.js.map +0 -1
  343. package/dist/cjs/types/data-structures/queue/deque.js +0 -3
  344. package/dist/cjs/types/data-structures/queue/deque.js.map +0 -1
  345. package/dist/cjs/types/data-structures/queue/index.js +0 -19
  346. package/dist/cjs/types/data-structures/queue/index.js.map +0 -1
  347. package/dist/cjs/types/data-structures/queue/queue.js +0 -3
  348. package/dist/cjs/types/data-structures/queue/queue.js.map +0 -1
  349. package/dist/cjs/types/data-structures/stack/index.js +0 -18
  350. package/dist/cjs/types/data-structures/stack/index.js.map +0 -1
  351. package/dist/cjs/types/data-structures/stack/stack.js +0 -3
  352. package/dist/cjs/types/data-structures/stack/stack.js.map +0 -1
  353. package/dist/cjs/types/data-structures/tree/index.js +0 -18
  354. package/dist/cjs/types/data-structures/tree/index.js.map +0 -1
  355. package/dist/cjs/types/data-structures/tree/tree.js +0 -3
  356. package/dist/cjs/types/data-structures/tree/tree.js.map +0 -1
  357. package/dist/cjs/types/data-structures/trie/index.js +0 -18
  358. package/dist/cjs/types/data-structures/trie/index.js.map +0 -1
  359. package/dist/cjs/types/data-structures/trie/trie.js +0 -3
  360. package/dist/cjs/types/data-structures/trie/trie.js.map +0 -1
  361. package/dist/cjs/types/index.js +0 -20
  362. package/dist/cjs/types/index.js.map +0 -1
  363. package/dist/cjs/types/utils/index.js +0 -19
  364. package/dist/cjs/types/utils/index.js.map +0 -1
  365. package/dist/cjs/types/utils/utils.js +0 -3
  366. package/dist/cjs/types/utils/utils.js.map +0 -1
  367. package/dist/cjs/types/utils/validate-type.js +0 -3
  368. package/dist/cjs/types/utils/validate-type.js.map +0 -1
  369. package/dist/cjs/utils/index.js +0 -19
  370. package/dist/cjs/utils/index.js.map +0 -1
  371. package/dist/cjs/utils/number.js +0 -24
  372. package/dist/cjs/utils/number.js.map +0 -1
  373. package/dist/cjs/utils/utils.d.ts +0 -209
  374. package/dist/cjs/utils/utils.js +0 -353
  375. package/dist/cjs/utils/utils.js.map +0 -1
  376. package/dist/esm/common/index.d.ts +0 -12
  377. package/dist/esm/common/index.js +0 -29
  378. package/dist/esm/common/index.js.map +0 -1
  379. package/dist/esm/data-structures/base/index.d.ts +0 -2
  380. package/dist/esm/data-structures/base/index.js +0 -3
  381. package/dist/esm/data-structures/base/index.js.map +0 -1
  382. package/dist/esm/data-structures/base/iterable-element-base.d.ts +0 -116
  383. package/dist/esm/data-structures/base/iterable-element-base.js +0 -199
  384. package/dist/esm/data-structures/base/iterable-element-base.js.map +0 -1
  385. package/dist/esm/data-structures/base/iterable-entry-base.d.ts +0 -168
  386. package/dist/esm/data-structures/base/iterable-entry-base.js +0 -237
  387. package/dist/esm/data-structures/base/iterable-entry-base.js.map +0 -1
  388. package/dist/esm/data-structures/base/linear-base.d.ts +0 -277
  389. package/dist/esm/data-structures/base/linear-base.js +0 -549
  390. package/dist/esm/data-structures/base/linear-base.js.map +0 -1
  391. package/dist/esm/data-structures/binary-tree/avl-tree-counter.d.ts +0 -214
  392. package/dist/esm/data-structures/binary-tree/avl-tree-counter.js +0 -410
  393. package/dist/esm/data-structures/binary-tree/avl-tree-counter.js.map +0 -1
  394. package/dist/esm/data-structures/binary-tree/avl-tree-multi-map.d.ts +0 -104
  395. package/dist/esm/data-structures/binary-tree/avl-tree-multi-map.js +0 -205
  396. package/dist/esm/data-structures/binary-tree/avl-tree-multi-map.js.map +0 -1
  397. package/dist/esm/data-structures/binary-tree/avl-tree.d.ts +0 -302
  398. package/dist/esm/data-structures/binary-tree/avl-tree.js +0 -601
  399. package/dist/esm/data-structures/binary-tree/avl-tree.js.map +0 -1
  400. package/dist/esm/data-structures/binary-tree/binary-indexed-tree.d.ts +0 -174
  401. package/dist/esm/data-structures/binary-tree/binary-indexed-tree.js +0 -296
  402. package/dist/esm/data-structures/binary-tree/binary-indexed-tree.js.map +0 -1
  403. package/dist/esm/data-structures/binary-tree/binary-tree.d.ts +0 -910
  404. package/dist/esm/data-structures/binary-tree/binary-tree.js +0 -2198
  405. package/dist/esm/data-structures/binary-tree/binary-tree.js.map +0 -1
  406. package/dist/esm/data-structures/binary-tree/bst.d.ts +0 -461
  407. package/dist/esm/data-structures/binary-tree/bst.js +0 -881
  408. package/dist/esm/data-structures/binary-tree/bst.js.map +0 -1
  409. package/dist/esm/data-structures/binary-tree/index.d.ts +0 -10
  410. package/dist/esm/data-structures/binary-tree/index.js +0 -11
  411. package/dist/esm/data-structures/binary-tree/index.js.map +0 -1
  412. package/dist/esm/data-structures/binary-tree/red-black-tree.d.ts +0 -280
  413. package/dist/esm/data-structures/binary-tree/red-black-tree.js +0 -641
  414. package/dist/esm/data-structures/binary-tree/red-black-tree.js.map +0 -1
  415. package/dist/esm/data-structures/binary-tree/segment-tree.d.ts +0 -160
  416. package/dist/esm/data-structures/binary-tree/segment-tree.js +0 -295
  417. package/dist/esm/data-structures/binary-tree/segment-tree.js.map +0 -1
  418. package/dist/esm/data-structures/binary-tree/tree-counter.d.ts +0 -212
  419. package/dist/esm/data-structures/binary-tree/tree-counter.js +0 -446
  420. package/dist/esm/data-structures/binary-tree/tree-counter.js.map +0 -1
  421. package/dist/esm/data-structures/binary-tree/tree-multi-map.js +0 -367
  422. package/dist/esm/data-structures/binary-tree/tree-multi-map.js.map +0 -1
  423. package/dist/esm/data-structures/graph/abstract-graph.d.ts +0 -335
  424. package/dist/esm/data-structures/graph/abstract-graph.js +0 -862
  425. package/dist/esm/data-structures/graph/abstract-graph.js.map +0 -1
  426. package/dist/esm/data-structures/graph/directed-graph.d.ts +0 -323
  427. package/dist/esm/data-structures/graph/directed-graph.js +0 -609
  428. package/dist/esm/data-structures/graph/directed-graph.js.map +0 -1
  429. package/dist/esm/data-structures/graph/index.d.ts +0 -4
  430. package/dist/esm/data-structures/graph/index.js +0 -5
  431. package/dist/esm/data-structures/graph/index.js.map +0 -1
  432. package/dist/esm/data-structures/graph/map-graph.d.ts +0 -84
  433. package/dist/esm/data-structures/graph/map-graph.js +0 -108
  434. package/dist/esm/data-structures/graph/map-graph.js.map +0 -1
  435. package/dist/esm/data-structures/graph/undirected-graph.d.ts +0 -231
  436. package/dist/esm/data-structures/graph/undirected-graph.js +0 -439
  437. package/dist/esm/data-structures/graph/undirected-graph.js.map +0 -1
  438. package/dist/esm/data-structures/hash/hash-map.d.ts +0 -519
  439. package/dist/esm/data-structures/hash/hash-map.js +0 -878
  440. package/dist/esm/data-structures/hash/hash-map.js.map +0 -1
  441. package/dist/esm/data-structures/hash/index.d.ts +0 -1
  442. package/dist/esm/data-structures/hash/index.js +0 -2
  443. package/dist/esm/data-structures/hash/index.js.map +0 -1
  444. package/dist/esm/data-structures/heap/heap.d.ts +0 -578
  445. package/dist/esm/data-structures/heap/heap.js +0 -914
  446. package/dist/esm/data-structures/heap/heap.js.map +0 -1
  447. package/dist/esm/data-structures/heap/index.d.ts +0 -3
  448. package/dist/esm/data-structures/heap/index.js +0 -4
  449. package/dist/esm/data-structures/heap/index.js.map +0 -1
  450. package/dist/esm/data-structures/heap/max-heap.d.ts +0 -68
  451. package/dist/esm/data-structures/heap/max-heap.js +0 -95
  452. package/dist/esm/data-structures/heap/max-heap.js.map +0 -1
  453. package/dist/esm/data-structures/heap/min-heap.d.ts +0 -68
  454. package/dist/esm/data-structures/heap/min-heap.js +0 -83
  455. package/dist/esm/data-structures/heap/min-heap.js.map +0 -1
  456. package/dist/esm/data-structures/index.d.ts +0 -12
  457. package/dist/esm/data-structures/index.js +0 -13
  458. package/dist/esm/data-structures/index.js.map +0 -1
  459. package/dist/esm/data-structures/linked-list/doubly-linked-list.d.ts +0 -885
  460. package/dist/esm/data-structures/linked-list/doubly-linked-list.js +0 -1236
  461. package/dist/esm/data-structures/linked-list/doubly-linked-list.js.map +0 -1
  462. package/dist/esm/data-structures/linked-list/index.d.ts +0 -3
  463. package/dist/esm/data-structures/linked-list/index.js +0 -4
  464. package/dist/esm/data-structures/linked-list/index.js.map +0 -1
  465. package/dist/esm/data-structures/linked-list/singly-linked-list.d.ts +0 -500
  466. package/dist/esm/data-structures/linked-list/singly-linked-list.js +0 -866
  467. package/dist/esm/data-structures/linked-list/singly-linked-list.js.map +0 -1
  468. package/dist/esm/data-structures/linked-list/skip-linked-list.d.ts +0 -134
  469. package/dist/esm/data-structures/linked-list/skip-linked-list.js +0 -243
  470. package/dist/esm/data-structures/linked-list/skip-linked-list.js.map +0 -1
  471. package/dist/esm/data-structures/matrix/index.d.ts +0 -2
  472. package/dist/esm/data-structures/matrix/index.js +0 -3
  473. package/dist/esm/data-structures/matrix/index.js.map +0 -1
  474. package/dist/esm/data-structures/matrix/matrix.d.ts +0 -168
  475. package/dist/esm/data-structures/matrix/matrix.js +0 -444
  476. package/dist/esm/data-structures/matrix/matrix.js.map +0 -1
  477. package/dist/esm/data-structures/matrix/navigator.d.ts +0 -55
  478. package/dist/esm/data-structures/matrix/navigator.js +0 -114
  479. package/dist/esm/data-structures/matrix/navigator.js.map +0 -1
  480. package/dist/esm/data-structures/priority-queue/index.d.ts +0 -3
  481. package/dist/esm/data-structures/priority-queue/index.js +0 -4
  482. package/dist/esm/data-structures/priority-queue/index.js.map +0 -1
  483. package/dist/esm/data-structures/priority-queue/max-priority-queue.d.ts +0 -71
  484. package/dist/esm/data-structures/priority-queue/max-priority-queue.js +0 -101
  485. package/dist/esm/data-structures/priority-queue/max-priority-queue.js.map +0 -1
  486. package/dist/esm/data-structures/priority-queue/min-priority-queue.d.ts +0 -72
  487. package/dist/esm/data-structures/priority-queue/min-priority-queue.js +0 -90
  488. package/dist/esm/data-structures/priority-queue/min-priority-queue.js.map +0 -1
  489. package/dist/esm/data-structures/priority-queue/priority-queue.d.ts +0 -74
  490. package/dist/esm/data-structures/priority-queue/priority-queue.js +0 -92
  491. package/dist/esm/data-structures/priority-queue/priority-queue.js.map +0 -1
  492. package/dist/esm/data-structures/queue/deque.d.ts +0 -458
  493. package/dist/esm/data-structures/queue/deque.js +0 -915
  494. package/dist/esm/data-structures/queue/deque.js.map +0 -1
  495. package/dist/esm/data-structures/queue/index.d.ts +0 -2
  496. package/dist/esm/data-structures/queue/index.js +0 -3
  497. package/dist/esm/data-structures/queue/index.js.map +0 -1
  498. package/dist/esm/data-structures/queue/queue.d.ts +0 -329
  499. package/dist/esm/data-structures/queue/queue.js +0 -452
  500. package/dist/esm/data-structures/queue/queue.js.map +0 -1
  501. package/dist/esm/data-structures/stack/index.d.ts +0 -1
  502. package/dist/esm/data-structures/stack/index.js +0 -2
  503. package/dist/esm/data-structures/stack/index.js.map +0 -1
  504. package/dist/esm/data-structures/stack/stack.d.ts +0 -284
  505. package/dist/esm/data-structures/stack/stack.js +0 -342
  506. package/dist/esm/data-structures/stack/stack.js.map +0 -1
  507. package/dist/esm/data-structures/tree/index.d.ts +0 -1
  508. package/dist/esm/data-structures/tree/index.js +0 -2
  509. package/dist/esm/data-structures/tree/index.js.map +0 -1
  510. package/dist/esm/data-structures/tree/tree.d.ts +0 -62
  511. package/dist/esm/data-structures/tree/tree.js +0 -107
  512. package/dist/esm/data-structures/tree/tree.js.map +0 -1
  513. package/dist/esm/data-structures/trie/index.d.ts +0 -1
  514. package/dist/esm/data-structures/trie/index.js +0 -2
  515. package/dist/esm/data-structures/trie/index.js.map +0 -1
  516. package/dist/esm/data-structures/trie/trie.d.ts +0 -351
  517. package/dist/esm/data-structures/trie/trie.js +0 -592
  518. package/dist/esm/data-structures/trie/trie.js.map +0 -1
  519. package/dist/esm/index.d.ts +0 -5
  520. package/dist/esm/index.js +0 -6
  521. package/dist/esm/index.js.map +0 -1
  522. package/dist/esm/interfaces/binary-tree.d.ts +0 -9
  523. package/dist/esm/interfaces/binary-tree.js +0 -2
  524. package/dist/esm/interfaces/binary-tree.js.map +0 -1
  525. package/dist/esm/interfaces/doubly-linked-list.d.ts +0 -1
  526. package/dist/esm/interfaces/doubly-linked-list.js +0 -2
  527. package/dist/esm/interfaces/doubly-linked-list.js.map +0 -1
  528. package/dist/esm/interfaces/graph.d.ts +0 -5
  529. package/dist/esm/interfaces/graph.js +0 -2
  530. package/dist/esm/interfaces/graph.js.map +0 -1
  531. package/dist/esm/interfaces/heap.d.ts +0 -1
  532. package/dist/esm/interfaces/heap.js +0 -2
  533. package/dist/esm/interfaces/heap.js.map +0 -1
  534. package/dist/esm/interfaces/index.d.ts +0 -8
  535. package/dist/esm/interfaces/index.js +0 -9
  536. package/dist/esm/interfaces/index.js.map +0 -1
  537. package/dist/esm/interfaces/navigator.d.ts +0 -1
  538. package/dist/esm/interfaces/navigator.js +0 -2
  539. package/dist/esm/interfaces/navigator.js.map +0 -1
  540. package/dist/esm/interfaces/priority-queue.d.ts +0 -1
  541. package/dist/esm/interfaces/priority-queue.js +0 -2
  542. package/dist/esm/interfaces/priority-queue.js.map +0 -1
  543. package/dist/esm/interfaces/segment-tree.d.ts +0 -1
  544. package/dist/esm/interfaces/segment-tree.js +0 -2
  545. package/dist/esm/interfaces/segment-tree.js.map +0 -1
  546. package/dist/esm/interfaces/singly-linked-list.d.ts +0 -1
  547. package/dist/esm/interfaces/singly-linked-list.js +0 -2
  548. package/dist/esm/interfaces/singly-linked-list.js.map +0 -1
  549. package/dist/esm/types/common.d.ts +0 -15
  550. package/dist/esm/types/common.js +0 -2
  551. package/dist/esm/types/common.js.map +0 -1
  552. package/dist/esm/types/data-structures/base/base.d.ts +0 -13
  553. package/dist/esm/types/data-structures/base/base.js +0 -2
  554. package/dist/esm/types/data-structures/base/base.js.map +0 -1
  555. package/dist/esm/types/data-structures/base/index.d.ts +0 -1
  556. package/dist/esm/types/data-structures/base/index.js +0 -2
  557. package/dist/esm/types/data-structures/base/index.js.map +0 -1
  558. package/dist/esm/types/data-structures/binary-tree/avl-tree-counter.d.ts +0 -2
  559. package/dist/esm/types/data-structures/binary-tree/avl-tree-counter.js +0 -2
  560. package/dist/esm/types/data-structures/binary-tree/avl-tree-counter.js.map +0 -1
  561. package/dist/esm/types/data-structures/binary-tree/avl-tree-multi-map.d.ts +0 -2
  562. package/dist/esm/types/data-structures/binary-tree/avl-tree-multi-map.js +0 -2
  563. package/dist/esm/types/data-structures/binary-tree/avl-tree-multi-map.js.map +0 -1
  564. package/dist/esm/types/data-structures/binary-tree/avl-tree.d.ts +0 -2
  565. package/dist/esm/types/data-structures/binary-tree/avl-tree.js +0 -2
  566. package/dist/esm/types/data-structures/binary-tree/avl-tree.js.map +0 -1
  567. package/dist/esm/types/data-structures/binary-tree/binary-indexed-tree.d.ts +0 -1
  568. package/dist/esm/types/data-structures/binary-tree/binary-indexed-tree.js +0 -2
  569. package/dist/esm/types/data-structures/binary-tree/binary-indexed-tree.js.map +0 -1
  570. package/dist/esm/types/data-structures/binary-tree/binary-tree.d.ts +0 -29
  571. package/dist/esm/types/data-structures/binary-tree/binary-tree.js +0 -2
  572. package/dist/esm/types/data-structures/binary-tree/binary-tree.js.map +0 -1
  573. package/dist/esm/types/data-structures/binary-tree/bst.d.ts +0 -12
  574. package/dist/esm/types/data-structures/binary-tree/bst.js +0 -2
  575. package/dist/esm/types/data-structures/binary-tree/bst.js.map +0 -1
  576. package/dist/esm/types/data-structures/binary-tree/index.d.ts +0 -9
  577. package/dist/esm/types/data-structures/binary-tree/index.js +0 -10
  578. package/dist/esm/types/data-structures/binary-tree/index.js.map +0 -1
  579. package/dist/esm/types/data-structures/binary-tree/red-black-tree.d.ts +0 -3
  580. package/dist/esm/types/data-structures/binary-tree/red-black-tree.js +0 -2
  581. package/dist/esm/types/data-structures/binary-tree/red-black-tree.js.map +0 -1
  582. package/dist/esm/types/data-structures/binary-tree/segment-tree.d.ts +0 -1
  583. package/dist/esm/types/data-structures/binary-tree/segment-tree.js +0 -2
  584. package/dist/esm/types/data-structures/binary-tree/segment-tree.js.map +0 -1
  585. package/dist/esm/types/data-structures/binary-tree/tree-counter.d.ts +0 -2
  586. package/dist/esm/types/data-structures/binary-tree/tree-counter.js +0 -2
  587. package/dist/esm/types/data-structures/binary-tree/tree-counter.js.map +0 -1
  588. package/dist/esm/types/data-structures/binary-tree/tree-multi-map.d.ts +0 -2
  589. package/dist/esm/types/data-structures/binary-tree/tree-multi-map.js +0 -2
  590. package/dist/esm/types/data-structures/binary-tree/tree-multi-map.js.map +0 -1
  591. package/dist/esm/types/data-structures/graph/abstract-graph.js +0 -2
  592. package/dist/esm/types/data-structures/graph/abstract-graph.js.map +0 -1
  593. package/dist/esm/types/data-structures/graph/directed-graph.d.ts +0 -1
  594. package/dist/esm/types/data-structures/graph/directed-graph.js +0 -2
  595. package/dist/esm/types/data-structures/graph/directed-graph.js.map +0 -1
  596. package/dist/esm/types/data-structures/graph/index.d.ts +0 -3
  597. package/dist/esm/types/data-structures/graph/index.js +0 -4
  598. package/dist/esm/types/data-structures/graph/index.js.map +0 -1
  599. package/dist/esm/types/data-structures/graph/map-graph.d.ts +0 -1
  600. package/dist/esm/types/data-structures/graph/map-graph.js +0 -2
  601. package/dist/esm/types/data-structures/graph/map-graph.js.map +0 -1
  602. package/dist/esm/types/data-structures/graph/undirected-graph.d.ts +0 -1
  603. package/dist/esm/types/data-structures/graph/undirected-graph.js +0 -2
  604. package/dist/esm/types/data-structures/graph/undirected-graph.js.map +0 -1
  605. package/dist/esm/types/data-structures/hash/hash-map.d.ts +0 -19
  606. package/dist/esm/types/data-structures/hash/hash-map.js +0 -2
  607. package/dist/esm/types/data-structures/hash/hash-map.js.map +0 -1
  608. package/dist/esm/types/data-structures/hash/index.d.ts +0 -2
  609. package/dist/esm/types/data-structures/hash/index.js +0 -2
  610. package/dist/esm/types/data-structures/hash/index.js.map +0 -1
  611. package/dist/esm/types/data-structures/heap/heap.d.ts +0 -5
  612. package/dist/esm/types/data-structures/heap/heap.js +0 -2
  613. package/dist/esm/types/data-structures/heap/heap.js.map +0 -1
  614. package/dist/esm/types/data-structures/heap/index.d.ts +0 -1
  615. package/dist/esm/types/data-structures/heap/index.js +0 -2
  616. package/dist/esm/types/data-structures/heap/index.js.map +0 -1
  617. package/dist/esm/types/data-structures/heap/max-heap.d.ts +0 -1
  618. package/dist/esm/types/data-structures/heap/max-heap.js +0 -2
  619. package/dist/esm/types/data-structures/heap/max-heap.js.map +0 -1
  620. package/dist/esm/types/data-structures/heap/min-heap.d.ts +0 -1
  621. package/dist/esm/types/data-structures/heap/min-heap.js +0 -2
  622. package/dist/esm/types/data-structures/heap/min-heap.js.map +0 -1
  623. package/dist/esm/types/data-structures/index.d.ts +0 -12
  624. package/dist/esm/types/data-structures/index.js +0 -13
  625. package/dist/esm/types/data-structures/index.js.map +0 -1
  626. package/dist/esm/types/data-structures/linked-list/doubly-linked-list.d.ts +0 -2
  627. package/dist/esm/types/data-structures/linked-list/doubly-linked-list.js +0 -2
  628. package/dist/esm/types/data-structures/linked-list/doubly-linked-list.js.map +0 -1
  629. package/dist/esm/types/data-structures/linked-list/index.d.ts +0 -3
  630. package/dist/esm/types/data-structures/linked-list/index.js +0 -4
  631. package/dist/esm/types/data-structures/linked-list/index.js.map +0 -1
  632. package/dist/esm/types/data-structures/linked-list/singly-linked-list.d.ts +0 -2
  633. package/dist/esm/types/data-structures/linked-list/singly-linked-list.js +0 -2
  634. package/dist/esm/types/data-structures/linked-list/singly-linked-list.js.map +0 -1
  635. package/dist/esm/types/data-structures/linked-list/skip-linked-list.d.ts +0 -4
  636. package/dist/esm/types/data-structures/linked-list/skip-linked-list.js +0 -2
  637. package/dist/esm/types/data-structures/linked-list/skip-linked-list.js.map +0 -1
  638. package/dist/esm/types/data-structures/matrix/index.d.ts +0 -2
  639. package/dist/esm/types/data-structures/matrix/index.js +0 -3
  640. package/dist/esm/types/data-structures/matrix/index.js.map +0 -1
  641. package/dist/esm/types/data-structures/matrix/matrix.d.ts +0 -7
  642. package/dist/esm/types/data-structures/matrix/matrix.js +0 -2
  643. package/dist/esm/types/data-structures/matrix/matrix.js.map +0 -1
  644. package/dist/esm/types/data-structures/matrix/navigator.d.ts +0 -14
  645. package/dist/esm/types/data-structures/matrix/navigator.js +0 -2
  646. package/dist/esm/types/data-structures/matrix/navigator.js.map +0 -1
  647. package/dist/esm/types/data-structures/priority-queue/index.d.ts +0 -3
  648. package/dist/esm/types/data-structures/priority-queue/index.js +0 -4
  649. package/dist/esm/types/data-structures/priority-queue/index.js.map +0 -1
  650. package/dist/esm/types/data-structures/priority-queue/max-priority-queue.d.ts +0 -1
  651. package/dist/esm/types/data-structures/priority-queue/max-priority-queue.js +0 -2
  652. package/dist/esm/types/data-structures/priority-queue/max-priority-queue.js.map +0 -1
  653. package/dist/esm/types/data-structures/priority-queue/min-priority-queue.d.ts +0 -1
  654. package/dist/esm/types/data-structures/priority-queue/min-priority-queue.js +0 -2
  655. package/dist/esm/types/data-structures/priority-queue/min-priority-queue.js.map +0 -1
  656. package/dist/esm/types/data-structures/priority-queue/priority-queue.d.ts +0 -2
  657. package/dist/esm/types/data-structures/priority-queue/priority-queue.js +0 -2
  658. package/dist/esm/types/data-structures/priority-queue/priority-queue.js.map +0 -1
  659. package/dist/esm/types/data-structures/queue/deque.d.ts +0 -4
  660. package/dist/esm/types/data-structures/queue/deque.js +0 -2
  661. package/dist/esm/types/data-structures/queue/deque.js.map +0 -1
  662. package/dist/esm/types/data-structures/queue/index.d.ts +0 -2
  663. package/dist/esm/types/data-structures/queue/index.js +0 -3
  664. package/dist/esm/types/data-structures/queue/index.js.map +0 -1
  665. package/dist/esm/types/data-structures/queue/queue.d.ts +0 -4
  666. package/dist/esm/types/data-structures/queue/queue.js +0 -2
  667. package/dist/esm/types/data-structures/queue/queue.js.map +0 -1
  668. package/dist/esm/types/data-structures/stack/index.d.ts +0 -1
  669. package/dist/esm/types/data-structures/stack/index.js +0 -2
  670. package/dist/esm/types/data-structures/stack/index.js.map +0 -1
  671. package/dist/esm/types/data-structures/stack/stack.d.ts +0 -2
  672. package/dist/esm/types/data-structures/stack/stack.js +0 -2
  673. package/dist/esm/types/data-structures/stack/stack.js.map +0 -1
  674. package/dist/esm/types/data-structures/tree/index.d.ts +0 -1
  675. package/dist/esm/types/data-structures/tree/index.js +0 -2
  676. package/dist/esm/types/data-structures/tree/index.js.map +0 -1
  677. package/dist/esm/types/data-structures/tree/tree.d.ts +0 -1
  678. package/dist/esm/types/data-structures/tree/tree.js +0 -2
  679. package/dist/esm/types/data-structures/tree/tree.js.map +0 -1
  680. package/dist/esm/types/data-structures/trie/index.d.ts +0 -1
  681. package/dist/esm/types/data-structures/trie/index.js +0 -2
  682. package/dist/esm/types/data-structures/trie/index.js.map +0 -1
  683. package/dist/esm/types/data-structures/trie/trie.d.ts +0 -4
  684. package/dist/esm/types/data-structures/trie/trie.js +0 -2
  685. package/dist/esm/types/data-structures/trie/trie.js.map +0 -1
  686. package/dist/esm/types/index.d.ts +0 -3
  687. package/dist/esm/types/index.js +0 -4
  688. package/dist/esm/types/index.js.map +0 -1
  689. package/dist/esm/types/utils/index.d.ts +0 -2
  690. package/dist/esm/types/utils/index.js +0 -3
  691. package/dist/esm/types/utils/index.js.map +0 -1
  692. package/dist/esm/types/utils/utils.d.ts +0 -21
  693. package/dist/esm/types/utils/utils.js +0 -2
  694. package/dist/esm/types/utils/utils.js.map +0 -1
  695. package/dist/esm/types/utils/validate-type.d.ts +0 -19
  696. package/dist/esm/types/utils/validate-type.js +0 -2
  697. package/dist/esm/types/utils/validate-type.js.map +0 -1
  698. package/dist/esm/utils/index.d.ts +0 -2
  699. package/dist/esm/utils/index.js +0 -3
  700. package/dist/esm/utils/index.js.map +0 -1
  701. package/dist/esm/utils/number.d.ts +0 -14
  702. package/dist/esm/utils/number.js +0 -21
  703. package/dist/esm/utils/number.js.map +0 -1
  704. package/dist/esm/utils/utils.js +0 -324
  705. package/dist/esm/utils/utils.js.map +0 -1
  706. package/test/performance/data-structures/binary-tree/avl-tree.test.mjs +0 -71
  707. package/test/performance/data-structures/binary-tree/red-black-tree.test.mjs +0 -81
  708. package/tsconfig-cjs.json +0 -14
  709. package/tsconfig-esm.json +0 -14
  710. /package/dist/{cjs → types}/common/index.d.ts +0 -0
  711. /package/dist/{cjs → types}/data-structures/base/index.d.ts +0 -0
  712. /package/dist/{cjs → types}/data-structures/binary-tree/binary-indexed-tree.d.ts +0 -0
  713. /package/dist/{cjs → types}/data-structures/binary-tree/index.d.ts +0 -0
  714. /package/dist/{cjs → types}/data-structures/binary-tree/segment-tree.d.ts +0 -0
  715. /package/dist/{cjs → types}/data-structures/graph/index.d.ts +0 -0
  716. /package/dist/{cjs → types}/data-structures/hash/index.d.ts +0 -0
  717. /package/dist/{cjs → types}/data-structures/heap/index.d.ts +0 -0
  718. /package/dist/{cjs → types}/data-structures/index.d.ts +0 -0
  719. /package/dist/{cjs → types}/data-structures/linked-list/index.d.ts +0 -0
  720. /package/dist/{cjs → types}/data-structures/matrix/index.d.ts +0 -0
  721. /package/dist/{cjs → types}/data-structures/matrix/matrix.d.ts +0 -0
  722. /package/dist/{cjs → types}/data-structures/matrix/navigator.d.ts +0 -0
  723. /package/dist/{cjs → types}/data-structures/priority-queue/index.d.ts +0 -0
  724. /package/dist/{cjs → types}/data-structures/queue/index.d.ts +0 -0
  725. /package/dist/{cjs → types}/data-structures/stack/index.d.ts +0 -0
  726. /package/dist/{cjs → types}/data-structures/tree/index.d.ts +0 -0
  727. /package/dist/{cjs → types}/data-structures/tree/tree.d.ts +0 -0
  728. /package/dist/{cjs → types}/data-structures/trie/index.d.ts +0 -0
  729. /package/dist/{cjs → types}/index.d.ts +0 -0
  730. /package/dist/{cjs → types}/interfaces/doubly-linked-list.d.ts +0 -0
  731. /package/dist/{cjs → types}/interfaces/heap.d.ts +0 -0
  732. /package/dist/{cjs → types}/interfaces/index.d.ts +0 -0
  733. /package/dist/{cjs → types}/interfaces/navigator.d.ts +0 -0
  734. /package/dist/{cjs → types}/interfaces/priority-queue.d.ts +0 -0
  735. /package/dist/{cjs → types}/interfaces/segment-tree.d.ts +0 -0
  736. /package/dist/{cjs → types}/interfaces/singly-linked-list.d.ts +0 -0
  737. /package/dist/{cjs → types}/types/common.d.ts +0 -0
  738. /package/dist/{cjs → types}/types/data-structures/base/index.d.ts +0 -0
  739. /package/dist/{cjs → types}/types/data-structures/binary-tree/avl-tree-counter.d.ts +0 -0
  740. /package/dist/{cjs → types}/types/data-structures/binary-tree/avl-tree-multi-map.d.ts +0 -0
  741. /package/dist/{cjs → types}/types/data-structures/binary-tree/avl-tree.d.ts +0 -0
  742. /package/dist/{cjs → types}/types/data-structures/binary-tree/binary-indexed-tree.d.ts +0 -0
  743. /package/dist/{cjs → types}/types/data-structures/binary-tree/binary-tree.d.ts +0 -0
  744. /package/dist/{cjs → types}/types/data-structures/binary-tree/bst.d.ts +0 -0
  745. /package/dist/{cjs → types}/types/data-structures/binary-tree/index.d.ts +0 -0
  746. /package/dist/{cjs → types}/types/data-structures/binary-tree/red-black-tree.d.ts +0 -0
  747. /package/dist/{cjs → types}/types/data-structures/binary-tree/segment-tree.d.ts +0 -0
  748. /package/dist/{cjs → types}/types/data-structures/binary-tree/tree-counter.d.ts +0 -0
  749. /package/dist/{cjs → types}/types/data-structures/binary-tree/tree-multi-map.d.ts +0 -0
  750. /package/dist/{cjs → types}/types/data-structures/graph/directed-graph.d.ts +0 -0
  751. /package/dist/{cjs → types}/types/data-structures/graph/index.d.ts +0 -0
  752. /package/dist/{cjs → types}/types/data-structures/graph/map-graph.d.ts +0 -0
  753. /package/dist/{cjs → types}/types/data-structures/graph/undirected-graph.d.ts +0 -0
  754. /package/dist/{cjs → types}/types/data-structures/hash/hash-map.d.ts +0 -0
  755. /package/dist/{cjs → types}/types/data-structures/hash/index.d.ts +0 -0
  756. /package/dist/{cjs → types}/types/data-structures/heap/heap.d.ts +0 -0
  757. /package/dist/{cjs → types}/types/data-structures/heap/index.d.ts +0 -0
  758. /package/dist/{cjs → types}/types/data-structures/heap/max-heap.d.ts +0 -0
  759. /package/dist/{cjs → types}/types/data-structures/heap/min-heap.d.ts +0 -0
  760. /package/dist/{cjs → types}/types/data-structures/index.d.ts +0 -0
  761. /package/dist/{cjs → types}/types/data-structures/linked-list/doubly-linked-list.d.ts +0 -0
  762. /package/dist/{cjs → types}/types/data-structures/linked-list/index.d.ts +0 -0
  763. /package/dist/{cjs → types}/types/data-structures/linked-list/singly-linked-list.d.ts +0 -0
  764. /package/dist/{cjs → types}/types/data-structures/linked-list/skip-linked-list.d.ts +0 -0
  765. /package/dist/{cjs → types}/types/data-structures/matrix/index.d.ts +0 -0
  766. /package/dist/{cjs → types}/types/data-structures/matrix/matrix.d.ts +0 -0
  767. /package/dist/{cjs → types}/types/data-structures/matrix/navigator.d.ts +0 -0
  768. /package/dist/{cjs → types}/types/data-structures/priority-queue/index.d.ts +0 -0
  769. /package/dist/{cjs → types}/types/data-structures/priority-queue/max-priority-queue.d.ts +0 -0
  770. /package/dist/{cjs → types}/types/data-structures/priority-queue/min-priority-queue.d.ts +0 -0
  771. /package/dist/{cjs → types}/types/data-structures/priority-queue/priority-queue.d.ts +0 -0
  772. /package/dist/{cjs → types}/types/data-structures/queue/deque.d.ts +0 -0
  773. /package/dist/{cjs → types}/types/data-structures/queue/index.d.ts +0 -0
  774. /package/dist/{cjs → types}/types/data-structures/queue/queue.d.ts +0 -0
  775. /package/dist/{cjs → types}/types/data-structures/stack/index.d.ts +0 -0
  776. /package/dist/{cjs → types}/types/data-structures/stack/stack.d.ts +0 -0
  777. /package/dist/{cjs → types}/types/data-structures/tree/index.d.ts +0 -0
  778. /package/dist/{cjs → types}/types/data-structures/tree/tree.d.ts +0 -0
  779. /package/dist/{cjs → types}/types/data-structures/trie/index.d.ts +0 -0
  780. /package/dist/{cjs → types}/types/data-structures/trie/trie.d.ts +0 -0
  781. /package/dist/{cjs → types}/types/index.d.ts +0 -0
  782. /package/dist/{cjs → types}/types/utils/index.d.ts +0 -0
  783. /package/dist/{cjs → types}/types/utils/validate-type.d.ts +0 -0
  784. /package/dist/{cjs → types}/utils/index.d.ts +0 -0
  785. /package/dist/{cjs → types}/utils/number.d.ts +0 -0
@@ -1,553 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LinearLinkedBase = exports.LinearBase = exports.LinkedListNode = void 0;
4
- const iterable_element_base_1 = require("./iterable-element-base");
5
- class LinkedListNode {
6
- constructor(value) {
7
- this._value = value;
8
- this._next = undefined;
9
- }
10
- get value() {
11
- return this._value;
12
- }
13
- set value(value) {
14
- this._value = value;
15
- }
16
- get next() {
17
- return this._next;
18
- }
19
- set next(value) {
20
- this._next = value;
21
- }
22
- }
23
- exports.LinkedListNode = LinkedListNode;
24
- class LinearBase extends iterable_element_base_1.IterableElementBase {
25
- /**
26
- * The constructor initializes the LinearBase class with optional options, setting the maximum length
27
- * if provided.
28
- * @param [options] - The `options` parameter is an optional object that can be passed to the
29
- * constructor. It is of type `LinearBaseOptions<E, R>`. The constructor checks if the `options`
30
- * object is provided and then extracts the `maxLen` property from it. If `maxLen` is a
31
- */
32
- constructor(options) {
33
- super(options);
34
- this._maxLen = -1;
35
- if (options) {
36
- const { maxLen } = options;
37
- if (typeof maxLen === 'number' && maxLen > 0 && maxLen % 1 === 0)
38
- this._maxLen = maxLen;
39
- }
40
- }
41
- get maxLen() {
42
- return this._maxLen;
43
- }
44
- /**
45
- * Time Complexity: O(n)
46
- * Space Complexity: O(1)
47
- *
48
- * The function indexOf searches for a specified element starting from a given index in an array-like
49
- * object and returns the index of the first occurrence, or -1 if not found.
50
- * @param {E} searchElement - The `searchElement` parameter in the `indexOf` function represents the
51
- * element that you want to find within the array. The function will search for this element starting
52
- * from the `fromIndex` (if provided) up to the end of the array. If the `searchElement` is found
53
- * within the
54
- * @param {number} [fromIndex=0] - The `fromIndex` parameter in the `indexOf` function represents the
55
- * index at which to start searching for the `searchElement` within the array. If provided, the
56
- * search will begin at this index and continue to the end of the array. If `fromIndex` is not
57
- * specified, the default
58
- * @returns The `indexOf` method is returning the index of the `searchElement` if it is found in the
59
- * array starting from the `fromIndex`. If the `searchElement` is not found, it returns -1.
60
- */
61
- indexOf(searchElement, fromIndex = 0) {
62
- // Boundary checks and adjustments
63
- if (this.length === 0)
64
- return -1;
65
- if (fromIndex < 0)
66
- fromIndex = this.length + fromIndex;
67
- if (fromIndex < 0)
68
- fromIndex = 0;
69
- // Iterating from the specified index to the end
70
- for (let i = fromIndex; i < this.length; i++) {
71
- const element = this.at(i);
72
- if (element === searchElement)
73
- return i;
74
- }
75
- return -1; // Not found
76
- }
77
- /**
78
- * Time Complexity: O(n)
79
- * Space Complexity: O(1)
80
- *
81
- * The function `lastIndexOf` in TypeScript returns the index of the last occurrence of a specified
82
- * element in an array.
83
- * @param {E} searchElement - The `searchElement` parameter is the element that you want to find the
84
- * last index of within the array. The `lastIndexOf` method will search the array starting from the
85
- * `fromIndex` (or the end of the array if not specified) and return the index of the last occurrence
86
- * of the
87
- * @param {number} fromIndex - The `fromIndex` parameter in the `lastIndexOf` method specifies the
88
- * index at which to start searching for the `searchElement` in the array. By default, it starts
89
- * searching from the last element of the array (`this.length - 1`). If a specific `fromIndex` is
90
- * provided
91
- * @returns The last index of the `searchElement` in the array is being returned. If the
92
- * `searchElement` is not found in the array, -1 is returned.
93
- */
94
- lastIndexOf(searchElement, fromIndex = this.length - 1) {
95
- if (this.length === 0)
96
- return -1;
97
- if (fromIndex >= this.length)
98
- fromIndex = this.length - 1;
99
- if (fromIndex < 0)
100
- fromIndex = this.length + fromIndex;
101
- for (let i = fromIndex; i >= 0; i--) {
102
- const element = this.at(i);
103
- if (element === searchElement)
104
- return i;
105
- }
106
- return -1;
107
- }
108
- /**
109
- * Time Complexity: O(n)
110
- * Space Complexity: O(1)
111
- *
112
- * The `findIndex` function iterates over an array and returns the index of the first element that
113
- * satisfies the provided predicate function.
114
- * @param predicate - The `predicate` parameter in the `findIndex` function is a callback function
115
- * that takes three arguments: `item`, `index`, and the array `this`. It should return a boolean
116
- * value indicating whether the current element satisfies the condition being checked for.
117
- * @param {any} [thisArg] - The `thisArg` parameter in the `findIndex` function is an optional
118
- * parameter that specifies the value to use as `this` when executing the `predicate` function. If
119
- * provided, the `predicate` function will be called with `thisArg` as its `this` value. If `
120
- * @returns The `findIndex` method is returning the index of the first element in the array that
121
- * satisfies the provided predicate function. If no such element is found, it returns -1.
122
- */
123
- findIndex(predicate, thisArg) {
124
- for (let i = 0; i < this.length; i++) {
125
- const item = this.at(i);
126
- if (item !== undefined && predicate.call(thisArg, item, i, this))
127
- return i;
128
- }
129
- return -1;
130
- }
131
- /**
132
- * Time Complexity: O(n + m)
133
- * Space Complexity: O(n + m)
134
- *
135
- * The `concat` function in TypeScript concatenates multiple items into a new list, handling both
136
- * individual elements and instances of `LinearBase`.
137
- * @param {(E | this)[]} items - The `concat` method takes in an array of items, where
138
- * each item can be either of type `E` or an instance of `LinearBase<E, R>`.
139
- * @returns The `concat` method is returning a new instance of the class that it belongs to, with the
140
- * items passed as arguments concatenated to it.
141
- */
142
- concat(...items) {
143
- const newList = this.clone();
144
- for (const item of items) {
145
- if (item instanceof LinearBase) {
146
- newList.pushMany(item);
147
- }
148
- else {
149
- newList.push(item);
150
- }
151
- }
152
- return newList;
153
- }
154
- /**
155
- * Time Complexity: O(n log n)
156
- * Space Complexity: O(n)
157
- *
158
- * The `sort` function in TypeScript sorts the elements of a collection using a specified comparison
159
- * function.
160
- * @param [compareFn] - The `compareFn` parameter is a function that defines the sort order. It takes
161
- * two elements `a` and `b` as input and returns a number indicating their relative order. If the
162
- * returned value is negative, `a` comes before `b`. If the returned value is positive, `
163
- * @returns The `sort` method is returning the instance of the object on which it is called (this),
164
- * after sorting the elements based on the provided comparison function (compareFn).
165
- */
166
- sort(compareFn) {
167
- const arr = this.toArray();
168
- arr.sort(compareFn);
169
- this.clear();
170
- for (const item of arr)
171
- this.push(item);
172
- return this;
173
- }
174
- /**
175
- * Time Complexity: O(n + m)
176
- * Space Complexity: O(m)
177
- *
178
- * The `splice` function in TypeScript removes elements from an array and optionally inserts new
179
- * elements at the specified index.
180
- * @param {number} start - The `start` parameter in the `splice` method indicates the index at which
181
- * to start modifying the array. If `start` is a negative number, it will count from the end of the
182
- * array.
183
- * @param {number} [deleteCount=0] - The `deleteCount` parameter in the `splice` method specifies the
184
- * number of elements to remove from the array starting at the specified `start` index. If
185
- * `deleteCount` is not provided or is 0, no elements are removed, and only new elements are inserted
186
- * at the `start`
187
- * @param {E[]} items - The `items` parameter in the `splice` method represents the elements that
188
- * will be inserted into the array at the specified `start` index. These elements can be of any type
189
- * and you can pass multiple elements separated by commas. The `splice` method will insert these
190
- * items into the array at the
191
- * @returns The `splice` method returns a list of elements that were removed from the original list
192
- * during the operation.
193
- */
194
- splice(start, deleteCount = 0, ...items) {
195
- const removedList = this._createInstance();
196
- // Handling negative indexes and bounds
197
- start = start < 0 ? this.length + start : start;
198
- start = Math.max(0, Math.min(start, this.length));
199
- deleteCount = Math.max(0, Math.min(deleteCount, this.length - start));
200
- // Delete elements
201
- for (let i = 0; i < deleteCount; i++) {
202
- const removed = this.deleteAt(start); // Always delete the start position
203
- if (removed !== undefined) {
204
- removedList.push(removed); // Add removed elements to the returned list
205
- }
206
- }
207
- // Insert new element
208
- for (let i = 0; i < items.length; i++) {
209
- this.addAt(start + i, items[i]); // Insert new elements one by one at the current position
210
- }
211
- return removedList; // Returns a list of removed elements
212
- }
213
- /**
214
- * Time Complexity: O(n)
215
- * Space Complexity: O(1)
216
- *
217
- * The `join` function in TypeScript returns a string by joining the elements of an array with a
218
- * specified separator.
219
- * @param {string} [separator=,] - The `separator` parameter is a string that specifies the character
220
- * or characters that will be used to separate each element when joining them into a single string.
221
- * By default, the separator is set to a comma (`,`), but you can provide a different separator if
222
- * needed.
223
- * @returns The `join` method is being returned, which takes an optional `separator` parameter
224
- * (defaulting to a comma) and returns a string created by joining all elements of the array after
225
- * converting it to an array.
226
- */
227
- join(separator = ',') {
228
- return this.toArray().join(separator);
229
- }
230
- /**
231
- * Time Complexity: O(n)
232
- * Space Complexity: O(n)
233
- *
234
- * The function `toReversedArray` takes an array and returns a new array with its elements in reverse
235
- * order.
236
- * @returns The `toReversedArray()` function returns an array of elements of type `E` in reverse
237
- * order.
238
- */
239
- toReversedArray() {
240
- const array = [];
241
- for (let i = this.length - 1; i >= 0; i--) {
242
- array.push(this.at(i));
243
- }
244
- return array;
245
- }
246
- /**
247
- * Time Complexity: O(n)
248
- * Space Complexity: O(1)
249
- *
250
- * The `reduceRight` function in TypeScript iterates over an array from right to left and applies a
251
- * callback function to each element, accumulating a single result.
252
- * @param callbackfn - The `callbackfn` parameter in the `reduceRight` method is a function that will
253
- * be called on each element in the array from right to left. It takes four arguments:
254
- * @param {U} [initialValue] - The `initialValue` parameter in the `reduceRight` method is an
255
- * optional parameter that specifies the initial value of the accumulator. If provided, the
256
- * `accumulator` will start with this initial value before iterating over the elements of the array.
257
- * If `initialValue` is not provided, the accumulator will
258
- * @returns The `reduceRight` method is returning the final accumulated value after applying the
259
- * callback function to each element in the array from right to left.
260
- */
261
- reduceRight(callbackfn, initialValue) {
262
- let accumulator = initialValue !== null && initialValue !== void 0 ? initialValue : 0;
263
- for (let i = this.length - 1; i >= 0; i--) {
264
- accumulator = callbackfn(accumulator, this.at(i), i, this);
265
- }
266
- return accumulator;
267
- }
268
- /**
269
- * Time Complexity: O(m)
270
- * Space Complexity: O(m)
271
- *
272
- * The `slice` function in TypeScript creates a new instance by extracting a portion of elements from
273
- * the original instance based on the specified start and end indices.
274
- * @param {number} [start=0] - The `start` parameter in the `slice` method represents the index at
275
- * which to begin extracting elements from an array-like object. If no `start` parameter is provided,
276
- * the default value is 0, meaning the extraction will start from the beginning of the array.
277
- * @param {number} end - The `end` parameter in the `slice` method represents the index at which to
278
- * end the slicing. By default, if no `end` parameter is provided, it will slice until the end of the
279
- * array (i.e., `this.length`).
280
- * @returns The `slice` method is returning a new instance of the object with elements sliced from
281
- * the specified start index (default is 0) to the specified end index (default is the length of the
282
- * object).
283
- */
284
- slice(start = 0, end = this.length) {
285
- start = start < 0 ? this.length + start : start;
286
- end = end < 0 ? this.length + end : end;
287
- const newList = this._createInstance();
288
- for (let i = start; i < end; i++) {
289
- newList.push(this.at(i));
290
- }
291
- return newList;
292
- }
293
- /**
294
- * Time Complexity: O(n)
295
- * Space Complexity: O(1)
296
- *
297
- * The `fill` function in TypeScript fills a specified range in an array-like object with a given
298
- * value.
299
- * @param {E} value - The `value` parameter in the `fill` method represents the element that will be
300
- * used to fill the specified range in the array.
301
- * @param [start=0] - The `start` parameter specifies the index at which to start filling the array
302
- * with the specified value. If not provided, it defaults to 0, indicating the beginning of the
303
- * array.
304
- * @param end - The `end` parameter in the `fill` function represents the index at which the filling
305
- * of values should stop. It specifies the end of the range within the array where the `value` should
306
- * be filled.
307
- * @returns The `fill` method is returning the modified object (`this`) after filling the specified
308
- * range with the provided value.
309
- */
310
- fill(value, start = 0, end = this.length) {
311
- // Handling negative indexes
312
- start = start < 0 ? this.length + start : start;
313
- end = end < 0 ? this.length + end : end;
314
- // Boundary processing
315
- if (start < 0)
316
- start = 0;
317
- if (end > this.length)
318
- end = this.length;
319
- if (start >= end)
320
- return this;
321
- // Iterate through the specified range and fill in the values
322
- for (let i = start; i < end; i++) {
323
- this.setAt(i, value);
324
- }
325
- return this;
326
- }
327
- }
328
- exports.LinearBase = LinearBase;
329
- class LinearLinkedBase extends LinearBase {
330
- /**
331
- * The constructor initializes the LinearBase class with optional options, setting the maximum length
332
- * if provided and valid.
333
- * @param [options] - The `options` parameter is an optional object that can be passed to the
334
- * constructor. It is of type `LinearBaseOptions<E, R>`. This object may contain properties such as
335
- * `maxLen`, which is a number representing the maximum length. If `maxLen` is a positive integer,
336
- */
337
- constructor(options) {
338
- super(options);
339
- if (options) {
340
- const { maxLen } = options;
341
- if (typeof maxLen === 'number' && maxLen > 0 && maxLen % 1 === 0)
342
- this._maxLen = maxLen;
343
- }
344
- }
345
- /**
346
- * Time Complexity: O(n)
347
- * Space Complexity: O(1)
348
- *
349
- * The function overrides the indexOf method to improve performance by searching for an element in a
350
- * custom array implementation starting from a specified index.
351
- * @param {E} searchElement - The `searchElement` parameter is the element that you are searching for
352
- * within the array. The `indexOf` method will return the index of the first occurrence of this
353
- * element within the array.
354
- * @param {number} [fromIndex=0] - The `fromIndex` parameter in the `indexOf` method specifies the
355
- * index in the array at which to start the search for the `searchElement`. If provided, the search
356
- * will begin at the specified index and continue to the end of the array. If not provided, the
357
- * search will start at index
358
- * @returns The `indexOf` method is returning the index of the `searchElement` if it is found in the
359
- * array starting from the `fromIndex`. If the `searchElement` is not found, it returns -1.
360
- */
361
- indexOf(searchElement, fromIndex = 0) {
362
- // In order to improve performance, it is best to override this method in the subclass of the array implementation
363
- const iterator = this._getIterator();
364
- let current = iterator.next();
365
- let index = 0;
366
- while (index < fromIndex) {
367
- current = iterator.next();
368
- index++;
369
- }
370
- while (!current.done) {
371
- if (current.value === searchElement)
372
- return index;
373
- current = iterator.next();
374
- index++;
375
- }
376
- return -1;
377
- }
378
- /**
379
- * Time Complexity: O(n)
380
- * Space Complexity: O(1)
381
- *
382
- * The function overrides the lastIndexOf method in TypeScript to improve performance by searching
383
- * for an element in reverse order starting from a specified index.
384
- * @param {E} searchElement - The `searchElement` parameter is the element that you want to find
385
- * within the array. The `lastIndexOf` method searches the array for this element starting from the
386
- * end of the array (or from the specified `fromIndex` if provided) and returns the index of the last
387
- * occurrence of the element
388
- * @param {number} fromIndex - The `fromIndex` parameter in the `lastIndexOf` method specifies the
389
- * index at which to start searching for the `searchElement` in the array. If provided, the search
390
- * will begin at this index and move towards the beginning of the array. If not provided, the search
391
- * will start at the
392
- * @returns The `lastIndexOf` method is being overridden to search for the `searchElement` starting
393
- * from the specified `fromIndex` (defaulting to the end of the array). It iterates over the array in
394
- * reverse order using a custom iterator `_getReverseIterator` and returns the index of the last
395
- * occurrence of the `searchElement` if found, or -1 if not found.
396
- */
397
- lastIndexOf(searchElement, fromIndex = this.length - 1) {
398
- // In order to improve performance, it is best to override this method in the subclass of the array implementation
399
- const iterator = this._getReverseIterator();
400
- let current = iterator.next();
401
- let index = this.length - 1;
402
- while (index > fromIndex) {
403
- current = iterator.next();
404
- index--;
405
- }
406
- while (!current.done) {
407
- if (current.value === searchElement)
408
- return index;
409
- current = iterator.next();
410
- index--;
411
- }
412
- return -1;
413
- }
414
- /**
415
- * Time Complexity: O(n + m)
416
- * Space Complexity: O(n + m)
417
- *
418
- * The `concat` function in TypeScript overrides the default behavior to concatenate items into a new
419
- * list, handling both individual elements and instances of `LinearBase`.
420
- * @param {(E | LinearBase<E, R>)[]} items - The `concat` method you provided takes in a variable
421
- * number of arguments of type `E` or `LinearBase<E, R>`. The method concatenates these items to the
422
- * current list and returns a new list with the concatenated items.
423
- * @returns The `concat` method is returning a new instance of the class that it belongs to, with the
424
- * items passed as arguments concatenated to it.
425
- */
426
- concat(...items) {
427
- const newList = this.clone();
428
- for (const item of items) {
429
- if (item instanceof LinearBase) {
430
- newList.pushMany(item);
431
- }
432
- else {
433
- newList.push(item);
434
- }
435
- }
436
- return newList;
437
- }
438
- /**
439
- * Time Complexity: O(m)
440
- * Space Complexity: O(m)
441
- *
442
- * The `slice` method is overridden to improve performance by creating a new instance and iterating
443
- * through the array to extract a subset based on the specified start and end indices.
444
- * @param {number} [start=0] - The `start` parameter in the `slice` method specifies the index at
445
- * which to begin extracting elements from the array. If no `start` parameter is provided, the
446
- * default value is 0, indicating that extraction should start from the beginning of the array.
447
- * @param {number} end - The `end` parameter in the `slice` method represents the index at which to
448
- * end the slicing of the array. If not provided, it defaults to the length of the array.
449
- * @returns The `slice` method is returning a new instance of the array implementation with elements
450
- * sliced from the original array based on the `start` and `end` parameters.
451
- */
452
- slice(start = 0, end = this.length) {
453
- // In order to improve performance, it is best to override this method in the subclass of the array implementation
454
- start = start < 0 ? this.length + start : start;
455
- end = end < 0 ? this.length + end : end;
456
- const newList = this._createInstance();
457
- const iterator = this._getIterator();
458
- let current = iterator.next();
459
- let c = 0;
460
- while (c < start) {
461
- current = iterator.next();
462
- c++;
463
- }
464
- for (let i = start; i < end; i++) {
465
- newList.push(current.value);
466
- current = iterator.next();
467
- }
468
- return newList;
469
- }
470
- /**
471
- * Time Complexity: O(n + m)
472
- * Space Complexity: O(m)
473
- *
474
- * The function overrides the splice method to handle deletion and insertion of elements in a data
475
- * structure while returning the removed elements.
476
- * @param {number} start - The `start` parameter in the `splice` method indicates the index at which
477
- * to start modifying the array.
478
- * @param {number} [deleteCount=0] - The `deleteCount` parameter in the `splice` method specifies the
479
- * number of elements to remove from the array starting at the specified `start` index. If
480
- * `deleteCount` is not provided, it defaults to 0, meaning no elements will be removed but new
481
- * elements can still be inserted at
482
- * @param {E[]} items - The `items` parameter in the `splice` method represents the elements that
483
- * will be inserted into the array at the specified `start` index. These elements can be of any type
484
- * and there can be multiple elements passed as arguments to be inserted into the array.
485
- * @returns The `splice` method is returning a new instance of the data structure that was modified
486
- * by removing elements specified by the `start` and `deleteCount` parameters, and inserting new
487
- * elements provided in the `items` array.
488
- */
489
- splice(start, deleteCount = 0, ...items) {
490
- const removedList = this._createInstance(); // Used to store deleted elements
491
- // Handling negative indexes
492
- start = start < 0 ? this.length + start : start;
493
- start = Math.max(0, Math.min(start, this.length)); // Correct start range
494
- deleteCount = Math.max(0, deleteCount); // Make sure deleteCount is non-negative
495
- let currentIndex = 0;
496
- let currentNode = undefined;
497
- let previousNode = undefined;
498
- // Find the starting point using an iterator
499
- const iterator = this._getNodeIterator();
500
- for (const node of iterator) {
501
- if (currentIndex === start) {
502
- currentNode = node; // Find the starting node
503
- break;
504
- }
505
- previousNode = node; // Update the previous node
506
- currentIndex++;
507
- }
508
- // Delete nodes
509
- for (let i = 0; i < deleteCount && currentNode; i++) {
510
- removedList.push(currentNode.value); // Store the deleted value in removedList
511
- const nextNode = currentNode.next; // Save next node
512
- this.delete(currentNode); // Delete current node
513
- currentNode = nextNode;
514
- }
515
- // Insert new value
516
- for (let i = 0; i < items.length; i++) {
517
- if (previousNode) {
518
- this.addAfter(previousNode, items[i]); // Insert after previousNode
519
- previousNode = previousNode.next; // Move to newly inserted node
520
- }
521
- else {
522
- this.addAt(0, items[i]); // Insert at the head of the linked list
523
- previousNode = this._getNodeIterator().next().value; // Update the head node to be the first inserted node
524
- }
525
- }
526
- return removedList;
527
- }
528
- /**
529
- * Time Complexity: O(n)
530
- * Space Complexity: O(1)
531
- *
532
- * The function `reduceRight` iterates over an array in reverse order and applies a callback function
533
- * to each element, accumulating a single result.
534
- * @param callbackfn - The `callbackfn` parameter is a function that will be called on each element
535
- * of the array from right to left. It takes four arguments:
536
- * @param {U} [initialValue] - The `initialValue` parameter is an optional value that is used as the
537
- * initial accumulator value in the reduce operation. If provided, the reduce operation starts with
538
- * this initial value and iterates over the elements of the array, applying the callback function to
539
- * each element and the current accumulator value. If `initial
540
- * @returns The `reduceRight` method is returning the final accumulated value after applying the
541
- * callback function to each element in the array from right to left.
542
- */
543
- reduceRight(callbackfn, initialValue) {
544
- let accumulator = initialValue !== null && initialValue !== void 0 ? initialValue : 0;
545
- let index = this.length - 1;
546
- for (const item of this._getReverseIterator()) {
547
- accumulator = callbackfn(accumulator, item, index--, this);
548
- }
549
- return accumulator;
550
- }
551
- }
552
- exports.LinearLinkedBase = LinearLinkedBase;
553
- //# sourceMappingURL=linear-base.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"linear-base.js","sourceRoot":"","sources":["../../../../src/data-structures/base/linear-base.ts"],"names":[],"mappings":";;;AACA,mEAA8D;AAE9D,MAAa,cAAc;IACzB,YAAY,KAAQ;QAClB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;IACzB,CAAC;IAID,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,IAAI,KAAK,CAAC,KAAQ;QAChB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACtB,CAAC;IAID,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED,IAAI,IAAI,CAAC,KAAoC;QAC3C,IAAI,CAA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