data-structure-typed 2.1.0 → 2.1.2

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 (711) hide show
  1. package/CHANGELOG.md +5 -1
  2. package/COMMANDS.md +13 -3
  3. package/README.md +21 -38
  4. package/benchmark/report.html +1 -1
  5. package/benchmark/report.json +101 -101
  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/{cjs → types}/data-structures/binary-tree/avl-tree-counter.d.ts +5 -5
  11. package/dist/{esm → types}/data-structures/binary-tree/avl-tree-multi-map.d.ts +6 -6
  12. package/dist/{esm → types}/data-structures/binary-tree/avl-tree.d.ts +5 -5
  13. package/dist/{esm → types}/data-structures/binary-tree/binary-tree.d.ts +6 -6
  14. package/dist/{esm → types}/data-structures/binary-tree/bst.d.ts +6 -6
  15. package/dist/{esm → types}/data-structures/binary-tree/red-black-tree.d.ts +6 -6
  16. package/dist/{cjs → types}/data-structures/binary-tree/tree-counter.d.ts +5 -5
  17. package/dist/{cjs → types}/data-structures/binary-tree/tree-multi-map.d.ts +6 -6
  18. package/dist/{esm → types}/data-structures/heap/heap.d.ts +4 -4
  19. package/dist/{esm → types}/data-structures/linked-list/singly-linked-list.d.ts +1 -1
  20. package/dist/{esm → types}/interfaces/binary-tree.d.ts +3 -3
  21. package/dist/umd/data-structure-typed.js +97 -174
  22. package/dist/umd/data-structure-typed.js.map +1 -0
  23. package/dist/umd/data-structure-typed.min.js +2 -2
  24. package/dist/umd/data-structure-typed.min.js.map +1 -1
  25. package/jest.integration.config.js +8 -1
  26. package/package.json +20 -14
  27. package/src/data-structures/binary-tree/avl-tree-counter.ts +8 -11
  28. package/src/data-structures/binary-tree/avl-tree-multi-map.ts +6 -11
  29. package/src/data-structures/binary-tree/avl-tree.ts +6 -8
  30. package/src/data-structures/binary-tree/binary-tree.ts +18 -20
  31. package/src/data-structures/binary-tree/bst.ts +6 -11
  32. package/src/data-structures/binary-tree/red-black-tree.ts +6 -11
  33. package/src/data-structures/binary-tree/tree-counter.ts +8 -13
  34. package/src/data-structures/binary-tree/tree-multi-map.ts +6 -11
  35. package/src/data-structures/heap/heap.ts +5 -5
  36. package/src/data-structures/linked-list/singly-linked-list.ts +2 -2
  37. package/src/interfaces/binary-tree.ts +3 -3
  38. package/test/integration/all-in-one.test.ts +1 -1
  39. package/test/integration/compile.test.mjs +159 -0
  40. package/test/integration/compile.test.ts +176 -0
  41. package/test/integration/heap.test.js +1 -1
  42. package/test/integration/index.html +1 -1
  43. package/test/performance/data-structures/comparison/comparison.test.ts +27 -57
  44. package/test/unit/data-structures/binary-tree/binary-tree.test.ts +3 -3
  45. package/test/unit/data-structures/binary-tree/tree-multi-map.test.ts +109 -1
  46. package/tsconfig.base.json +23 -0
  47. package/tsconfig.test.json +9 -0
  48. package/tsconfig.types.json +15 -0
  49. package/tsup.config.js +12 -24
  50. package/tsup.node.config.js +37 -0
  51. package/dist/cjs/common/index.js +0 -29
  52. package/dist/cjs/common/index.js.map +0 -1
  53. package/dist/cjs/data-structures/base/index.js +0 -19
  54. package/dist/cjs/data-structures/base/index.js.map +0 -1
  55. package/dist/cjs/data-structures/base/iterable-element-base.js +0 -244
  56. package/dist/cjs/data-structures/base/iterable-element-base.js.map +0 -1
  57. package/dist/cjs/data-structures/base/iterable-entry-base.js +0 -184
  58. package/dist/cjs/data-structures/base/iterable-entry-base.js.map +0 -1
  59. package/dist/cjs/data-structures/base/linear-base.js +0 -416
  60. package/dist/cjs/data-structures/base/linear-base.js.map +0 -1
  61. package/dist/cjs/data-structures/binary-tree/avl-tree-counter.js +0 -375
  62. package/dist/cjs/data-structures/binary-tree/avl-tree-counter.js.map +0 -1
  63. package/dist/cjs/data-structures/binary-tree/avl-tree-multi-map.d.ts +0 -135
  64. package/dist/cjs/data-structures/binary-tree/avl-tree-multi-map.js +0 -251
  65. package/dist/cjs/data-structures/binary-tree/avl-tree-multi-map.js.map +0 -1
  66. package/dist/cjs/data-structures/binary-tree/avl-tree.d.ts +0 -291
  67. package/dist/cjs/data-structures/binary-tree/avl-tree.js +0 -612
  68. package/dist/cjs/data-structures/binary-tree/avl-tree.js.map +0 -1
  69. package/dist/cjs/data-structures/binary-tree/binary-indexed-tree.js +0 -295
  70. package/dist/cjs/data-structures/binary-tree/binary-indexed-tree.js.map +0 -1
  71. package/dist/cjs/data-structures/binary-tree/binary-tree.d.ts +0 -754
  72. package/dist/cjs/data-structures/binary-tree/binary-tree.js +0 -1926
  73. package/dist/cjs/data-structures/binary-tree/binary-tree.js.map +0 -1
  74. package/dist/cjs/data-structures/binary-tree/bst.d.ts +0 -413
  75. package/dist/cjs/data-structures/binary-tree/bst.js +0 -904
  76. package/dist/cjs/data-structures/binary-tree/bst.js.map +0 -1
  77. package/dist/cjs/data-structures/binary-tree/index.js +0 -27
  78. package/dist/cjs/data-structures/binary-tree/index.js.map +0 -1
  79. package/dist/cjs/data-structures/binary-tree/red-black-tree.d.ts +0 -208
  80. package/dist/cjs/data-structures/binary-tree/red-black-tree.js +0 -547
  81. package/dist/cjs/data-structures/binary-tree/red-black-tree.js.map +0 -1
  82. package/dist/cjs/data-structures/binary-tree/segment-tree.js +0 -298
  83. package/dist/cjs/data-structures/binary-tree/segment-tree.js.map +0 -1
  84. package/dist/cjs/data-structures/binary-tree/tree-counter.js +0 -414
  85. package/dist/cjs/data-structures/binary-tree/tree-counter.js.map +0 -1
  86. package/dist/cjs/data-structures/binary-tree/tree-multi-map.js +0 -385
  87. package/dist/cjs/data-structures/binary-tree/tree-multi-map.js.map +0 -1
  88. package/dist/cjs/data-structures/graph/abstract-graph.js +0 -897
  89. package/dist/cjs/data-structures/graph/abstract-graph.js.map +0 -1
  90. package/dist/cjs/data-structures/graph/directed-graph.js +0 -526
  91. package/dist/cjs/data-structures/graph/directed-graph.js.map +0 -1
  92. package/dist/cjs/data-structures/graph/index.js +0 -21
  93. package/dist/cjs/data-structures/graph/index.js.map +0 -1
  94. package/dist/cjs/data-structures/graph/map-graph.js +0 -108
  95. package/dist/cjs/data-structures/graph/map-graph.js.map +0 -1
  96. package/dist/cjs/data-structures/graph/undirected-graph.js +0 -425
  97. package/dist/cjs/data-structures/graph/undirected-graph.js.map +0 -1
  98. package/dist/cjs/data-structures/hash/hash-map.js +0 -693
  99. package/dist/cjs/data-structures/hash/hash-map.js.map +0 -1
  100. package/dist/cjs/data-structures/hash/index.js +0 -18
  101. package/dist/cjs/data-structures/hash/index.js.map +0 -1
  102. package/dist/cjs/data-structures/heap/heap.d.ts +0 -503
  103. package/dist/cjs/data-structures/heap/heap.js +0 -902
  104. package/dist/cjs/data-structures/heap/heap.js.map +0 -1
  105. package/dist/cjs/data-structures/heap/index.js +0 -20
  106. package/dist/cjs/data-structures/heap/index.js.map +0 -1
  107. package/dist/cjs/data-structures/heap/max-heap.js +0 -41
  108. package/dist/cjs/data-structures/heap/max-heap.js.map +0 -1
  109. package/dist/cjs/data-structures/heap/min-heap.js +0 -32
  110. package/dist/cjs/data-structures/heap/min-heap.js.map +0 -1
  111. package/dist/cjs/data-structures/index.js +0 -29
  112. package/dist/cjs/data-structures/index.js.map +0 -1
  113. package/dist/cjs/data-structures/linked-list/doubly-linked-list.js +0 -1112
  114. package/dist/cjs/data-structures/linked-list/doubly-linked-list.js.map +0 -1
  115. package/dist/cjs/data-structures/linked-list/index.js +0 -20
  116. package/dist/cjs/data-structures/linked-list/index.js.map +0 -1
  117. package/dist/cjs/data-structures/linked-list/singly-linked-list.d.ts +0 -451
  118. package/dist/cjs/data-structures/linked-list/singly-linked-list.js +0 -851
  119. package/dist/cjs/data-structures/linked-list/singly-linked-list.js.map +0 -1
  120. package/dist/cjs/data-structures/linked-list/skip-linked-list.js +0 -145
  121. package/dist/cjs/data-structures/linked-list/skip-linked-list.js.map +0 -1
  122. package/dist/cjs/data-structures/matrix/index.js +0 -19
  123. package/dist/cjs/data-structures/matrix/index.js.map +0 -1
  124. package/dist/cjs/data-structures/matrix/matrix.js +0 -449
  125. package/dist/cjs/data-structures/matrix/matrix.js.map +0 -1
  126. package/dist/cjs/data-structures/matrix/navigator.js +0 -112
  127. package/dist/cjs/data-structures/matrix/navigator.js.map +0 -1
  128. package/dist/cjs/data-structures/priority-queue/index.js +0 -20
  129. package/dist/cjs/data-structures/priority-queue/index.js.map +0 -1
  130. package/dist/cjs/data-structures/priority-queue/max-priority-queue.js +0 -35
  131. package/dist/cjs/data-structures/priority-queue/max-priority-queue.js.map +0 -1
  132. package/dist/cjs/data-structures/priority-queue/min-priority-queue.js +0 -25
  133. package/dist/cjs/data-structures/priority-queue/min-priority-queue.js.map +0 -1
  134. package/dist/cjs/data-structures/priority-queue/priority-queue.js +0 -21
  135. package/dist/cjs/data-structures/priority-queue/priority-queue.js.map +0 -1
  136. package/dist/cjs/data-structures/queue/deque.js +0 -880
  137. package/dist/cjs/data-structures/queue/deque.js.map +0 -1
  138. package/dist/cjs/data-structures/queue/index.js +0 -19
  139. package/dist/cjs/data-structures/queue/index.js.map +0 -1
  140. package/dist/cjs/data-structures/queue/queue.js +0 -474
  141. package/dist/cjs/data-structures/queue/queue.js.map +0 -1
  142. package/dist/cjs/data-structures/stack/index.js +0 -18
  143. package/dist/cjs/data-structures/stack/index.js.map +0 -1
  144. package/dist/cjs/data-structures/stack/stack.js +0 -402
  145. package/dist/cjs/data-structures/stack/stack.js.map +0 -1
  146. package/dist/cjs/data-structures/tree/index.js +0 -18
  147. package/dist/cjs/data-structures/tree/index.js.map +0 -1
  148. package/dist/cjs/data-structures/tree/tree.js +0 -108
  149. package/dist/cjs/data-structures/tree/tree.js.map +0 -1
  150. package/dist/cjs/data-structures/trie/index.js +0 -18
  151. package/dist/cjs/data-structures/trie/index.js.map +0 -1
  152. package/dist/cjs/data-structures/trie/trie.js +0 -611
  153. package/dist/cjs/data-structures/trie/trie.js.map +0 -1
  154. package/dist/cjs/index.js +0 -22
  155. package/dist/cjs/index.js.map +0 -1
  156. package/dist/cjs/interfaces/binary-tree.d.ts +0 -59
  157. package/dist/cjs/interfaces/binary-tree.js +0 -3
  158. package/dist/cjs/interfaces/binary-tree.js.map +0 -1
  159. package/dist/cjs/interfaces/doubly-linked-list.js +0 -3
  160. package/dist/cjs/interfaces/doubly-linked-list.js.map +0 -1
  161. package/dist/cjs/interfaces/graph.js +0 -3
  162. package/dist/cjs/interfaces/graph.js.map +0 -1
  163. package/dist/cjs/interfaces/heap.js +0 -3
  164. package/dist/cjs/interfaces/heap.js.map +0 -1
  165. package/dist/cjs/interfaces/index.js +0 -25
  166. package/dist/cjs/interfaces/index.js.map +0 -1
  167. package/dist/cjs/interfaces/navigator.js +0 -3
  168. package/dist/cjs/interfaces/navigator.js.map +0 -1
  169. package/dist/cjs/interfaces/priority-queue.js +0 -3
  170. package/dist/cjs/interfaces/priority-queue.js.map +0 -1
  171. package/dist/cjs/interfaces/segment-tree.js +0 -3
  172. package/dist/cjs/interfaces/segment-tree.js.map +0 -1
  173. package/dist/cjs/interfaces/singly-linked-list.js +0 -3
  174. package/dist/cjs/interfaces/singly-linked-list.js.map +0 -1
  175. package/dist/cjs/types/common.js +0 -3
  176. package/dist/cjs/types/common.js.map +0 -1
  177. package/dist/cjs/types/data-structures/base/base.js +0 -3
  178. package/dist/cjs/types/data-structures/base/base.js.map +0 -1
  179. package/dist/cjs/types/data-structures/base/index.js +0 -18
  180. package/dist/cjs/types/data-structures/base/index.js.map +0 -1
  181. package/dist/cjs/types/data-structures/binary-tree/avl-tree-counter.js +0 -3
  182. package/dist/cjs/types/data-structures/binary-tree/avl-tree-counter.js.map +0 -1
  183. package/dist/cjs/types/data-structures/binary-tree/avl-tree-multi-map.js +0 -3
  184. package/dist/cjs/types/data-structures/binary-tree/avl-tree-multi-map.js.map +0 -1
  185. package/dist/cjs/types/data-structures/binary-tree/avl-tree.js +0 -3
  186. package/dist/cjs/types/data-structures/binary-tree/avl-tree.js.map +0 -1
  187. package/dist/cjs/types/data-structures/binary-tree/binary-indexed-tree.js +0 -3
  188. package/dist/cjs/types/data-structures/binary-tree/binary-indexed-tree.js.map +0 -1
  189. package/dist/cjs/types/data-structures/binary-tree/binary-tree.js +0 -3
  190. package/dist/cjs/types/data-structures/binary-tree/binary-tree.js.map +0 -1
  191. package/dist/cjs/types/data-structures/binary-tree/bst.js +0 -3
  192. package/dist/cjs/types/data-structures/binary-tree/bst.js.map +0 -1
  193. package/dist/cjs/types/data-structures/binary-tree/index.js +0 -26
  194. package/dist/cjs/types/data-structures/binary-tree/index.js.map +0 -1
  195. package/dist/cjs/types/data-structures/binary-tree/red-black-tree.js +0 -3
  196. package/dist/cjs/types/data-structures/binary-tree/red-black-tree.js.map +0 -1
  197. package/dist/cjs/types/data-structures/binary-tree/segment-tree.js +0 -3
  198. package/dist/cjs/types/data-structures/binary-tree/segment-tree.js.map +0 -1
  199. package/dist/cjs/types/data-structures/binary-tree/tree-counter.js +0 -3
  200. package/dist/cjs/types/data-structures/binary-tree/tree-counter.js.map +0 -1
  201. package/dist/cjs/types/data-structures/binary-tree/tree-multi-map.js +0 -3
  202. package/dist/cjs/types/data-structures/binary-tree/tree-multi-map.js.map +0 -1
  203. package/dist/cjs/types/data-structures/graph/abstract-graph.js +0 -3
  204. package/dist/cjs/types/data-structures/graph/abstract-graph.js.map +0 -1
  205. package/dist/cjs/types/data-structures/graph/directed-graph.js +0 -3
  206. package/dist/cjs/types/data-structures/graph/directed-graph.js.map +0 -1
  207. package/dist/cjs/types/data-structures/graph/index.js +0 -20
  208. package/dist/cjs/types/data-structures/graph/index.js.map +0 -1
  209. package/dist/cjs/types/data-structures/graph/map-graph.js +0 -3
  210. package/dist/cjs/types/data-structures/graph/map-graph.js.map +0 -1
  211. package/dist/cjs/types/data-structures/graph/undirected-graph.js +0 -3
  212. package/dist/cjs/types/data-structures/graph/undirected-graph.js.map +0 -1
  213. package/dist/cjs/types/data-structures/hash/hash-map.js +0 -3
  214. package/dist/cjs/types/data-structures/hash/hash-map.js.map +0 -1
  215. package/dist/cjs/types/data-structures/hash/index.js +0 -18
  216. package/dist/cjs/types/data-structures/hash/index.js.map +0 -1
  217. package/dist/cjs/types/data-structures/heap/heap.js +0 -3
  218. package/dist/cjs/types/data-structures/heap/heap.js.map +0 -1
  219. package/dist/cjs/types/data-structures/heap/index.js +0 -18
  220. package/dist/cjs/types/data-structures/heap/index.js.map +0 -1
  221. package/dist/cjs/types/data-structures/heap/max-heap.js +0 -3
  222. package/dist/cjs/types/data-structures/heap/max-heap.js.map +0 -1
  223. package/dist/cjs/types/data-structures/heap/min-heap.js +0 -3
  224. package/dist/cjs/types/data-structures/heap/min-heap.js.map +0 -1
  225. package/dist/cjs/types/data-structures/index.js +0 -29
  226. package/dist/cjs/types/data-structures/index.js.map +0 -1
  227. package/dist/cjs/types/data-structures/linked-list/doubly-linked-list.js +0 -3
  228. package/dist/cjs/types/data-structures/linked-list/doubly-linked-list.js.map +0 -1
  229. package/dist/cjs/types/data-structures/linked-list/index.js +0 -20
  230. package/dist/cjs/types/data-structures/linked-list/index.js.map +0 -1
  231. package/dist/cjs/types/data-structures/linked-list/singly-linked-list.js +0 -3
  232. package/dist/cjs/types/data-structures/linked-list/singly-linked-list.js.map +0 -1
  233. package/dist/cjs/types/data-structures/linked-list/skip-linked-list.js +0 -3
  234. package/dist/cjs/types/data-structures/linked-list/skip-linked-list.js.map +0 -1
  235. package/dist/cjs/types/data-structures/matrix/index.js +0 -19
  236. package/dist/cjs/types/data-structures/matrix/index.js.map +0 -1
  237. package/dist/cjs/types/data-structures/matrix/matrix.js +0 -3
  238. package/dist/cjs/types/data-structures/matrix/matrix.js.map +0 -1
  239. package/dist/cjs/types/data-structures/matrix/navigator.js +0 -3
  240. package/dist/cjs/types/data-structures/matrix/navigator.js.map +0 -1
  241. package/dist/cjs/types/data-structures/priority-queue/index.js +0 -20
  242. package/dist/cjs/types/data-structures/priority-queue/index.js.map +0 -1
  243. package/dist/cjs/types/data-structures/priority-queue/max-priority-queue.js +0 -3
  244. package/dist/cjs/types/data-structures/priority-queue/max-priority-queue.js.map +0 -1
  245. package/dist/cjs/types/data-structures/priority-queue/min-priority-queue.js +0 -3
  246. package/dist/cjs/types/data-structures/priority-queue/min-priority-queue.js.map +0 -1
  247. package/dist/cjs/types/data-structures/priority-queue/priority-queue.js +0 -3
  248. package/dist/cjs/types/data-structures/priority-queue/priority-queue.js.map +0 -1
  249. package/dist/cjs/types/data-structures/queue/deque.js +0 -3
  250. package/dist/cjs/types/data-structures/queue/deque.js.map +0 -1
  251. package/dist/cjs/types/data-structures/queue/index.js +0 -19
  252. package/dist/cjs/types/data-structures/queue/index.js.map +0 -1
  253. package/dist/cjs/types/data-structures/queue/queue.js +0 -3
  254. package/dist/cjs/types/data-structures/queue/queue.js.map +0 -1
  255. package/dist/cjs/types/data-structures/stack/index.js +0 -18
  256. package/dist/cjs/types/data-structures/stack/index.js.map +0 -1
  257. package/dist/cjs/types/data-structures/stack/stack.js +0 -3
  258. package/dist/cjs/types/data-structures/stack/stack.js.map +0 -1
  259. package/dist/cjs/types/data-structures/tree/index.js +0 -18
  260. package/dist/cjs/types/data-structures/tree/index.js.map +0 -1
  261. package/dist/cjs/types/data-structures/tree/tree.js +0 -3
  262. package/dist/cjs/types/data-structures/tree/tree.js.map +0 -1
  263. package/dist/cjs/types/data-structures/trie/index.js +0 -18
  264. package/dist/cjs/types/data-structures/trie/index.js.map +0 -1
  265. package/dist/cjs/types/data-structures/trie/trie.js +0 -3
  266. package/dist/cjs/types/data-structures/trie/trie.js.map +0 -1
  267. package/dist/cjs/types/index.js +0 -20
  268. package/dist/cjs/types/index.js.map +0 -1
  269. package/dist/cjs/types/utils/index.js +0 -19
  270. package/dist/cjs/types/utils/index.js.map +0 -1
  271. package/dist/cjs/types/utils/utils.js +0 -3
  272. package/dist/cjs/types/utils/utils.js.map +0 -1
  273. package/dist/cjs/types/utils/validate-type.js +0 -3
  274. package/dist/cjs/types/utils/validate-type.js.map +0 -1
  275. package/dist/cjs/utils/index.js +0 -19
  276. package/dist/cjs/utils/index.js.map +0 -1
  277. package/dist/cjs/utils/number.js +0 -24
  278. package/dist/cjs/utils/number.js.map +0 -1
  279. package/dist/cjs/utils/utils.js +0 -354
  280. package/dist/cjs/utils/utils.js.map +0 -1
  281. package/dist/esm/common/index.d.ts +0 -12
  282. package/dist/esm/common/index.js +0 -29
  283. package/dist/esm/common/index.js.map +0 -1
  284. package/dist/esm/data-structures/base/index.d.ts +0 -2
  285. package/dist/esm/data-structures/base/index.js +0 -3
  286. package/dist/esm/data-structures/base/index.js.map +0 -1
  287. package/dist/esm/data-structures/base/iterable-element-base.d.ts +0 -219
  288. package/dist/esm/data-structures/base/iterable-element-base.js +0 -247
  289. package/dist/esm/data-structures/base/iterable-element-base.js.map +0 -1
  290. package/dist/esm/data-structures/base/iterable-entry-base.d.ts +0 -144
  291. package/dist/esm/data-structures/base/iterable-entry-base.js +0 -180
  292. package/dist/esm/data-structures/base/iterable-entry-base.js.map +0 -1
  293. package/dist/esm/data-structures/base/linear-base.d.ts +0 -335
  294. package/dist/esm/data-structures/base/linear-base.js +0 -412
  295. package/dist/esm/data-structures/base/linear-base.js.map +0 -1
  296. package/dist/esm/data-structures/binary-tree/avl-tree-counter.d.ts +0 -182
  297. package/dist/esm/data-structures/binary-tree/avl-tree-counter.js +0 -369
  298. package/dist/esm/data-structures/binary-tree/avl-tree-counter.js.map +0 -1
  299. package/dist/esm/data-structures/binary-tree/avl-tree-multi-map.js +0 -244
  300. package/dist/esm/data-structures/binary-tree/avl-tree-multi-map.js.map +0 -1
  301. package/dist/esm/data-structures/binary-tree/avl-tree.js +0 -607
  302. package/dist/esm/data-structures/binary-tree/avl-tree.js.map +0 -1
  303. package/dist/esm/data-structures/binary-tree/binary-indexed-tree.d.ts +0 -174
  304. package/dist/esm/data-structures/binary-tree/binary-indexed-tree.js +0 -296
  305. package/dist/esm/data-structures/binary-tree/binary-indexed-tree.js.map +0 -1
  306. package/dist/esm/data-structures/binary-tree/binary-tree.js +0 -1922
  307. package/dist/esm/data-structures/binary-tree/binary-tree.js.map +0 -1
  308. package/dist/esm/data-structures/binary-tree/bst.js +0 -901
  309. package/dist/esm/data-structures/binary-tree/bst.js.map +0 -1
  310. package/dist/esm/data-structures/binary-tree/index.d.ts +0 -10
  311. package/dist/esm/data-structures/binary-tree/index.js +0 -11
  312. package/dist/esm/data-structures/binary-tree/index.js.map +0 -1
  313. package/dist/esm/data-structures/binary-tree/red-black-tree.js +0 -540
  314. package/dist/esm/data-structures/binary-tree/red-black-tree.js.map +0 -1
  315. package/dist/esm/data-structures/binary-tree/segment-tree.d.ts +0 -160
  316. package/dist/esm/data-structures/binary-tree/segment-tree.js +0 -295
  317. package/dist/esm/data-structures/binary-tree/segment-tree.js.map +0 -1
  318. package/dist/esm/data-structures/binary-tree/tree-counter.d.ts +0 -190
  319. package/dist/esm/data-structures/binary-tree/tree-counter.js +0 -412
  320. package/dist/esm/data-structures/binary-tree/tree-counter.js.map +0 -1
  321. package/dist/esm/data-structures/binary-tree/tree-multi-map.d.ts +0 -270
  322. package/dist/esm/data-structures/binary-tree/tree-multi-map.js +0 -378
  323. package/dist/esm/data-structures/binary-tree/tree-multi-map.js.map +0 -1
  324. package/dist/esm/data-structures/graph/abstract-graph.d.ts +0 -340
  325. package/dist/esm/data-structures/graph/abstract-graph.js +0 -892
  326. package/dist/esm/data-structures/graph/abstract-graph.js.map +0 -1
  327. package/dist/esm/data-structures/graph/directed-graph.d.ts +0 -207
  328. package/dist/esm/data-structures/graph/directed-graph.js +0 -521
  329. package/dist/esm/data-structures/graph/directed-graph.js.map +0 -1
  330. package/dist/esm/data-structures/graph/index.d.ts +0 -4
  331. package/dist/esm/data-structures/graph/index.js +0 -5
  332. package/dist/esm/data-structures/graph/index.js.map +0 -1
  333. package/dist/esm/data-structures/graph/map-graph.d.ts +0 -78
  334. package/dist/esm/data-structures/graph/map-graph.js +0 -105
  335. package/dist/esm/data-structures/graph/map-graph.js.map +0 -1
  336. package/dist/esm/data-structures/graph/undirected-graph.d.ts +0 -188
  337. package/dist/esm/data-structures/graph/undirected-graph.js +0 -418
  338. package/dist/esm/data-structures/graph/undirected-graph.js.map +0 -1
  339. package/dist/esm/data-structures/hash/hash-map.d.ts +0 -345
  340. package/dist/esm/data-structures/hash/hash-map.js +0 -691
  341. package/dist/esm/data-structures/hash/hash-map.js.map +0 -1
  342. package/dist/esm/data-structures/hash/index.d.ts +0 -1
  343. package/dist/esm/data-structures/hash/index.js +0 -2
  344. package/dist/esm/data-structures/hash/index.js.map +0 -1
  345. package/dist/esm/data-structures/heap/heap.js +0 -894
  346. package/dist/esm/data-structures/heap/heap.js.map +0 -1
  347. package/dist/esm/data-structures/heap/index.d.ts +0 -3
  348. package/dist/esm/data-structures/heap/index.js +0 -4
  349. package/dist/esm/data-structures/heap/index.js.map +0 -1
  350. package/dist/esm/data-structures/heap/max-heap.d.ts +0 -32
  351. package/dist/esm/data-structures/heap/max-heap.js +0 -40
  352. package/dist/esm/data-structures/heap/max-heap.js.map +0 -1
  353. package/dist/esm/data-structures/heap/min-heap.d.ts +0 -33
  354. package/dist/esm/data-structures/heap/min-heap.js +0 -28
  355. package/dist/esm/data-structures/heap/min-heap.js.map +0 -1
  356. package/dist/esm/data-structures/index.d.ts +0 -12
  357. package/dist/esm/data-structures/index.js +0 -13
  358. package/dist/esm/data-structures/index.js.map +0 -1
  359. package/dist/esm/data-structures/linked-list/doubly-linked-list.d.ts +0 -769
  360. package/dist/esm/data-structures/linked-list/doubly-linked-list.js +0 -1109
  361. package/dist/esm/data-structures/linked-list/doubly-linked-list.js.map +0 -1
  362. package/dist/esm/data-structures/linked-list/index.d.ts +0 -3
  363. package/dist/esm/data-structures/linked-list/index.js +0 -4
  364. package/dist/esm/data-structures/linked-list/index.js.map +0 -1
  365. package/dist/esm/data-structures/linked-list/singly-linked-list.js +0 -847
  366. package/dist/esm/data-structures/linked-list/singly-linked-list.js.map +0 -1
  367. package/dist/esm/data-structures/linked-list/skip-linked-list.d.ts +0 -27
  368. package/dist/esm/data-structures/linked-list/skip-linked-list.js +0 -143
  369. package/dist/esm/data-structures/linked-list/skip-linked-list.js.map +0 -1
  370. package/dist/esm/data-structures/matrix/index.d.ts +0 -2
  371. package/dist/esm/data-structures/matrix/index.js +0 -3
  372. package/dist/esm/data-structures/matrix/index.js.map +0 -1
  373. package/dist/esm/data-structures/matrix/matrix.d.ts +0 -168
  374. package/dist/esm/data-structures/matrix/matrix.js +0 -444
  375. package/dist/esm/data-structures/matrix/matrix.js.map +0 -1
  376. package/dist/esm/data-structures/matrix/navigator.d.ts +0 -55
  377. package/dist/esm/data-structures/matrix/navigator.js +0 -114
  378. package/dist/esm/data-structures/matrix/navigator.js.map +0 -1
  379. package/dist/esm/data-structures/priority-queue/index.d.ts +0 -3
  380. package/dist/esm/data-structures/priority-queue/index.js +0 -4
  381. package/dist/esm/data-structures/priority-queue/index.js.map +0 -1
  382. package/dist/esm/data-structures/priority-queue/max-priority-queue.d.ts +0 -27
  383. package/dist/esm/data-structures/priority-queue/max-priority-queue.js +0 -34
  384. package/dist/esm/data-structures/priority-queue/max-priority-queue.js.map +0 -1
  385. package/dist/esm/data-structures/priority-queue/min-priority-queue.d.ts +0 -26
  386. package/dist/esm/data-structures/priority-queue/min-priority-queue.js +0 -21
  387. package/dist/esm/data-structures/priority-queue/min-priority-queue.js.map +0 -1
  388. package/dist/esm/data-structures/priority-queue/priority-queue.d.ts +0 -15
  389. package/dist/esm/data-structures/priority-queue/priority-queue.js +0 -17
  390. package/dist/esm/data-structures/priority-queue/priority-queue.js.map +0 -1
  391. package/dist/esm/data-structures/queue/deque.d.ts +0 -431
  392. package/dist/esm/data-structures/queue/deque.js +0 -880
  393. package/dist/esm/data-structures/queue/deque.js.map +0 -1
  394. package/dist/esm/data-structures/queue/index.d.ts +0 -2
  395. package/dist/esm/data-structures/queue/index.js +0 -3
  396. package/dist/esm/data-structures/queue/index.js.map +0 -1
  397. package/dist/esm/data-structures/queue/queue.d.ts +0 -308
  398. package/dist/esm/data-structures/queue/queue.js +0 -467
  399. package/dist/esm/data-structures/queue/queue.js.map +0 -1
  400. package/dist/esm/data-structures/stack/index.d.ts +0 -1
  401. package/dist/esm/data-structures/stack/index.js +0 -2
  402. package/dist/esm/data-structures/stack/index.js.map +0 -1
  403. package/dist/esm/data-structures/stack/stack.d.ts +0 -306
  404. package/dist/esm/data-structures/stack/stack.js +0 -398
  405. package/dist/esm/data-structures/stack/stack.js.map +0 -1
  406. package/dist/esm/data-structures/tree/index.d.ts +0 -1
  407. package/dist/esm/data-structures/tree/index.js +0 -2
  408. package/dist/esm/data-structures/tree/index.js.map +0 -1
  409. package/dist/esm/data-structures/tree/tree.d.ts +0 -62
  410. package/dist/esm/data-structures/tree/tree.js +0 -107
  411. package/dist/esm/data-structures/tree/tree.js.map +0 -1
  412. package/dist/esm/data-structures/trie/index.d.ts +0 -1
  413. package/dist/esm/data-structures/trie/index.js +0 -2
  414. package/dist/esm/data-structures/trie/index.js.map +0 -1
  415. package/dist/esm/data-structures/trie/trie.d.ts +0 -350
  416. package/dist/esm/data-structures/trie/trie.js +0 -613
  417. package/dist/esm/data-structures/trie/trie.js.map +0 -1
  418. package/dist/esm/index.d.ts +0 -5
  419. package/dist/esm/index.js +0 -6
  420. package/dist/esm/index.js.map +0 -1
  421. package/dist/esm/interfaces/binary-tree.js +0 -2
  422. package/dist/esm/interfaces/binary-tree.js.map +0 -1
  423. package/dist/esm/interfaces/doubly-linked-list.d.ts +0 -1
  424. package/dist/esm/interfaces/doubly-linked-list.js +0 -2
  425. package/dist/esm/interfaces/doubly-linked-list.js.map +0 -1
  426. package/dist/esm/interfaces/graph.d.ts +0 -21
  427. package/dist/esm/interfaces/graph.js +0 -2
  428. package/dist/esm/interfaces/graph.js.map +0 -1
  429. package/dist/esm/interfaces/heap.d.ts +0 -1
  430. package/dist/esm/interfaces/heap.js +0 -2
  431. package/dist/esm/interfaces/heap.js.map +0 -1
  432. package/dist/esm/interfaces/index.d.ts +0 -8
  433. package/dist/esm/interfaces/index.js +0 -9
  434. package/dist/esm/interfaces/index.js.map +0 -1
  435. package/dist/esm/interfaces/navigator.d.ts +0 -1
  436. package/dist/esm/interfaces/navigator.js +0 -2
  437. package/dist/esm/interfaces/navigator.js.map +0 -1
  438. package/dist/esm/interfaces/priority-queue.d.ts +0 -1
  439. package/dist/esm/interfaces/priority-queue.js +0 -2
  440. package/dist/esm/interfaces/priority-queue.js.map +0 -1
  441. package/dist/esm/interfaces/segment-tree.d.ts +0 -1
  442. package/dist/esm/interfaces/segment-tree.js +0 -2
  443. package/dist/esm/interfaces/segment-tree.js.map +0 -1
  444. package/dist/esm/interfaces/singly-linked-list.d.ts +0 -1
  445. package/dist/esm/interfaces/singly-linked-list.js +0 -2
  446. package/dist/esm/interfaces/singly-linked-list.js.map +0 -1
  447. package/dist/esm/types/common.d.ts +0 -15
  448. package/dist/esm/types/common.js +0 -2
  449. package/dist/esm/types/common.js.map +0 -1
  450. package/dist/esm/types/data-structures/base/base.d.ts +0 -13
  451. package/dist/esm/types/data-structures/base/base.js +0 -2
  452. package/dist/esm/types/data-structures/base/base.js.map +0 -1
  453. package/dist/esm/types/data-structures/base/index.d.ts +0 -1
  454. package/dist/esm/types/data-structures/base/index.js +0 -2
  455. package/dist/esm/types/data-structures/base/index.js.map +0 -1
  456. package/dist/esm/types/data-structures/binary-tree/avl-tree-counter.d.ts +0 -2
  457. package/dist/esm/types/data-structures/binary-tree/avl-tree-counter.js +0 -2
  458. package/dist/esm/types/data-structures/binary-tree/avl-tree-counter.js.map +0 -1
  459. package/dist/esm/types/data-structures/binary-tree/avl-tree-multi-map.d.ts +0 -2
  460. package/dist/esm/types/data-structures/binary-tree/avl-tree-multi-map.js +0 -2
  461. package/dist/esm/types/data-structures/binary-tree/avl-tree-multi-map.js.map +0 -1
  462. package/dist/esm/types/data-structures/binary-tree/avl-tree.d.ts +0 -2
  463. package/dist/esm/types/data-structures/binary-tree/avl-tree.js +0 -2
  464. package/dist/esm/types/data-structures/binary-tree/avl-tree.js.map +0 -1
  465. package/dist/esm/types/data-structures/binary-tree/binary-indexed-tree.d.ts +0 -1
  466. package/dist/esm/types/data-structures/binary-tree/binary-indexed-tree.js +0 -2
  467. package/dist/esm/types/data-structures/binary-tree/binary-indexed-tree.js.map +0 -1
  468. package/dist/esm/types/data-structures/binary-tree/binary-tree.d.ts +0 -29
  469. package/dist/esm/types/data-structures/binary-tree/binary-tree.js +0 -2
  470. package/dist/esm/types/data-structures/binary-tree/binary-tree.js.map +0 -1
  471. package/dist/esm/types/data-structures/binary-tree/bst.d.ts +0 -12
  472. package/dist/esm/types/data-structures/binary-tree/bst.js +0 -2
  473. package/dist/esm/types/data-structures/binary-tree/bst.js.map +0 -1
  474. package/dist/esm/types/data-structures/binary-tree/index.d.ts +0 -9
  475. package/dist/esm/types/data-structures/binary-tree/index.js +0 -10
  476. package/dist/esm/types/data-structures/binary-tree/index.js.map +0 -1
  477. package/dist/esm/types/data-structures/binary-tree/red-black-tree.d.ts +0 -3
  478. package/dist/esm/types/data-structures/binary-tree/red-black-tree.js +0 -2
  479. package/dist/esm/types/data-structures/binary-tree/red-black-tree.js.map +0 -1
  480. package/dist/esm/types/data-structures/binary-tree/segment-tree.d.ts +0 -1
  481. package/dist/esm/types/data-structures/binary-tree/segment-tree.js +0 -2
  482. package/dist/esm/types/data-structures/binary-tree/segment-tree.js.map +0 -1
  483. package/dist/esm/types/data-structures/binary-tree/tree-counter.d.ts +0 -2
  484. package/dist/esm/types/data-structures/binary-tree/tree-counter.js +0 -2
  485. package/dist/esm/types/data-structures/binary-tree/tree-counter.js.map +0 -1
  486. package/dist/esm/types/data-structures/binary-tree/tree-multi-map.d.ts +0 -2
  487. package/dist/esm/types/data-structures/binary-tree/tree-multi-map.js +0 -2
  488. package/dist/esm/types/data-structures/binary-tree/tree-multi-map.js.map +0 -1
  489. package/dist/esm/types/data-structures/graph/abstract-graph.d.ts +0 -14
  490. package/dist/esm/types/data-structures/graph/abstract-graph.js +0 -2
  491. package/dist/esm/types/data-structures/graph/abstract-graph.js.map +0 -1
  492. package/dist/esm/types/data-structures/graph/directed-graph.d.ts +0 -1
  493. package/dist/esm/types/data-structures/graph/directed-graph.js +0 -2
  494. package/dist/esm/types/data-structures/graph/directed-graph.js.map +0 -1
  495. package/dist/esm/types/data-structures/graph/index.d.ts +0 -3
  496. package/dist/esm/types/data-structures/graph/index.js +0 -4
  497. package/dist/esm/types/data-structures/graph/index.js.map +0 -1
  498. package/dist/esm/types/data-structures/graph/map-graph.d.ts +0 -1
  499. package/dist/esm/types/data-structures/graph/map-graph.js +0 -2
  500. package/dist/esm/types/data-structures/graph/map-graph.js.map +0 -1
  501. package/dist/esm/types/data-structures/graph/undirected-graph.d.ts +0 -1
  502. package/dist/esm/types/data-structures/graph/undirected-graph.js +0 -2
  503. package/dist/esm/types/data-structures/graph/undirected-graph.js.map +0 -1
  504. package/dist/esm/types/data-structures/hash/hash-map.d.ts +0 -19
  505. package/dist/esm/types/data-structures/hash/hash-map.js +0 -2
  506. package/dist/esm/types/data-structures/hash/hash-map.js.map +0 -1
  507. package/dist/esm/types/data-structures/hash/index.d.ts +0 -2
  508. package/dist/esm/types/data-structures/hash/index.js +0 -2
  509. package/dist/esm/types/data-structures/hash/index.js.map +0 -1
  510. package/dist/esm/types/data-structures/heap/heap.d.ts +0 -5
  511. package/dist/esm/types/data-structures/heap/heap.js +0 -2
  512. package/dist/esm/types/data-structures/heap/heap.js.map +0 -1
  513. package/dist/esm/types/data-structures/heap/index.d.ts +0 -1
  514. package/dist/esm/types/data-structures/heap/index.js +0 -2
  515. package/dist/esm/types/data-structures/heap/index.js.map +0 -1
  516. package/dist/esm/types/data-structures/heap/max-heap.d.ts +0 -1
  517. package/dist/esm/types/data-structures/heap/max-heap.js +0 -2
  518. package/dist/esm/types/data-structures/heap/max-heap.js.map +0 -1
  519. package/dist/esm/types/data-structures/heap/min-heap.d.ts +0 -1
  520. package/dist/esm/types/data-structures/heap/min-heap.js +0 -2
  521. package/dist/esm/types/data-structures/heap/min-heap.js.map +0 -1
  522. package/dist/esm/types/data-structures/index.d.ts +0 -12
  523. package/dist/esm/types/data-structures/index.js +0 -13
  524. package/dist/esm/types/data-structures/index.js.map +0 -1
  525. package/dist/esm/types/data-structures/linked-list/doubly-linked-list.d.ts +0 -2
  526. package/dist/esm/types/data-structures/linked-list/doubly-linked-list.js +0 -2
  527. package/dist/esm/types/data-structures/linked-list/doubly-linked-list.js.map +0 -1
  528. package/dist/esm/types/data-structures/linked-list/index.d.ts +0 -3
  529. package/dist/esm/types/data-structures/linked-list/index.js +0 -4
  530. package/dist/esm/types/data-structures/linked-list/index.js.map +0 -1
  531. package/dist/esm/types/data-structures/linked-list/singly-linked-list.d.ts +0 -2
  532. package/dist/esm/types/data-structures/linked-list/singly-linked-list.js +0 -2
  533. package/dist/esm/types/data-structures/linked-list/singly-linked-list.js.map +0 -1
  534. package/dist/esm/types/data-structures/linked-list/skip-linked-list.d.ts +0 -4
  535. package/dist/esm/types/data-structures/linked-list/skip-linked-list.js +0 -2
  536. package/dist/esm/types/data-structures/linked-list/skip-linked-list.js.map +0 -1
  537. package/dist/esm/types/data-structures/matrix/index.d.ts +0 -2
  538. package/dist/esm/types/data-structures/matrix/index.js +0 -3
  539. package/dist/esm/types/data-structures/matrix/index.js.map +0 -1
  540. package/dist/esm/types/data-structures/matrix/matrix.d.ts +0 -7
  541. package/dist/esm/types/data-structures/matrix/matrix.js +0 -2
  542. package/dist/esm/types/data-structures/matrix/matrix.js.map +0 -1
  543. package/dist/esm/types/data-structures/matrix/navigator.d.ts +0 -14
  544. package/dist/esm/types/data-structures/matrix/navigator.js +0 -2
  545. package/dist/esm/types/data-structures/matrix/navigator.js.map +0 -1
  546. package/dist/esm/types/data-structures/priority-queue/index.d.ts +0 -3
  547. package/dist/esm/types/data-structures/priority-queue/index.js +0 -4
  548. package/dist/esm/types/data-structures/priority-queue/index.js.map +0 -1
  549. package/dist/esm/types/data-structures/priority-queue/max-priority-queue.d.ts +0 -1
  550. package/dist/esm/types/data-structures/priority-queue/max-priority-queue.js +0 -2
  551. package/dist/esm/types/data-structures/priority-queue/max-priority-queue.js.map +0 -1
  552. package/dist/esm/types/data-structures/priority-queue/min-priority-queue.d.ts +0 -1
  553. package/dist/esm/types/data-structures/priority-queue/min-priority-queue.js +0 -2
  554. package/dist/esm/types/data-structures/priority-queue/min-priority-queue.js.map +0 -1
  555. package/dist/esm/types/data-structures/priority-queue/priority-queue.d.ts +0 -2
  556. package/dist/esm/types/data-structures/priority-queue/priority-queue.js +0 -2
  557. package/dist/esm/types/data-structures/priority-queue/priority-queue.js.map +0 -1
  558. package/dist/esm/types/data-structures/queue/deque.d.ts +0 -4
  559. package/dist/esm/types/data-structures/queue/deque.js +0 -2
  560. package/dist/esm/types/data-structures/queue/deque.js.map +0 -1
  561. package/dist/esm/types/data-structures/queue/index.d.ts +0 -2
  562. package/dist/esm/types/data-structures/queue/index.js +0 -3
  563. package/dist/esm/types/data-structures/queue/index.js.map +0 -1
  564. package/dist/esm/types/data-structures/queue/queue.d.ts +0 -4
  565. package/dist/esm/types/data-structures/queue/queue.js +0 -2
  566. package/dist/esm/types/data-structures/queue/queue.js.map +0 -1
  567. package/dist/esm/types/data-structures/stack/index.d.ts +0 -1
  568. package/dist/esm/types/data-structures/stack/index.js +0 -2
  569. package/dist/esm/types/data-structures/stack/index.js.map +0 -1
  570. package/dist/esm/types/data-structures/stack/stack.d.ts +0 -2
  571. package/dist/esm/types/data-structures/stack/stack.js +0 -2
  572. package/dist/esm/types/data-structures/stack/stack.js.map +0 -1
  573. package/dist/esm/types/data-structures/tree/index.d.ts +0 -1
  574. package/dist/esm/types/data-structures/tree/index.js +0 -2
  575. package/dist/esm/types/data-structures/tree/index.js.map +0 -1
  576. package/dist/esm/types/data-structures/tree/tree.d.ts +0 -1
  577. package/dist/esm/types/data-structures/tree/tree.js +0 -2
  578. package/dist/esm/types/data-structures/tree/tree.js.map +0 -1
  579. package/dist/esm/types/data-structures/trie/index.d.ts +0 -1
  580. package/dist/esm/types/data-structures/trie/index.js +0 -2
  581. package/dist/esm/types/data-structures/trie/index.js.map +0 -1
  582. package/dist/esm/types/data-structures/trie/trie.d.ts +0 -4
  583. package/dist/esm/types/data-structures/trie/trie.js +0 -2
  584. package/dist/esm/types/data-structures/trie/trie.js.map +0 -1
  585. package/dist/esm/types/index.d.ts +0 -3
  586. package/dist/esm/types/index.js +0 -4
  587. package/dist/esm/types/index.js.map +0 -1
  588. package/dist/esm/types/utils/index.d.ts +0 -2
  589. package/dist/esm/types/utils/index.js +0 -3
  590. package/dist/esm/types/utils/index.js.map +0 -1
  591. package/dist/esm/types/utils/utils.d.ts +0 -22
  592. package/dist/esm/types/utils/utils.js +0 -2
  593. package/dist/esm/types/utils/utils.js.map +0 -1
  594. package/dist/esm/types/utils/validate-type.d.ts +0 -19
  595. package/dist/esm/types/utils/validate-type.js +0 -2
  596. package/dist/esm/types/utils/validate-type.js.map +0 -1
  597. package/dist/esm/utils/index.d.ts +0 -2
  598. package/dist/esm/utils/index.js +0 -3
  599. package/dist/esm/utils/index.js.map +0 -1
  600. package/dist/esm/utils/number.d.ts +0 -14
  601. package/dist/esm/utils/number.js +0 -21
  602. package/dist/esm/utils/number.js.map +0 -1
  603. package/dist/esm/utils/utils.d.ts +0 -209
  604. package/dist/esm/utils/utils.js +0 -325
  605. package/dist/esm/utils/utils.js.map +0 -1
  606. package/test/integration/compile.js +0 -144
  607. package/test/integration/compile.mjs +0 -135
  608. package/test/integration/compile.ts +0 -171
  609. package/tsconfig-base.json +0 -24
  610. package/tsconfig-cjs.json +0 -14
  611. package/tsconfig-esm.json +0 -14
  612. /package/dist/{cjs → types}/common/index.d.ts +0 -0
  613. /package/dist/{cjs → types}/data-structures/base/index.d.ts +0 -0
  614. /package/dist/{cjs → types}/data-structures/base/iterable-element-base.d.ts +0 -0
  615. /package/dist/{cjs → types}/data-structures/base/iterable-entry-base.d.ts +0 -0
  616. /package/dist/{cjs → types}/data-structures/base/linear-base.d.ts +0 -0
  617. /package/dist/{cjs → types}/data-structures/binary-tree/binary-indexed-tree.d.ts +0 -0
  618. /package/dist/{cjs → types}/data-structures/binary-tree/index.d.ts +0 -0
  619. /package/dist/{cjs → types}/data-structures/binary-tree/segment-tree.d.ts +0 -0
  620. /package/dist/{cjs → types}/data-structures/graph/abstract-graph.d.ts +0 -0
  621. /package/dist/{cjs → types}/data-structures/graph/directed-graph.d.ts +0 -0
  622. /package/dist/{cjs → types}/data-structures/graph/index.d.ts +0 -0
  623. /package/dist/{cjs → types}/data-structures/graph/map-graph.d.ts +0 -0
  624. /package/dist/{cjs → types}/data-structures/graph/undirected-graph.d.ts +0 -0
  625. /package/dist/{cjs → types}/data-structures/hash/hash-map.d.ts +0 -0
  626. /package/dist/{cjs → types}/data-structures/hash/index.d.ts +0 -0
  627. /package/dist/{cjs → types}/data-structures/heap/index.d.ts +0 -0
  628. /package/dist/{cjs → types}/data-structures/heap/max-heap.d.ts +0 -0
  629. /package/dist/{cjs → types}/data-structures/heap/min-heap.d.ts +0 -0
  630. /package/dist/{cjs → types}/data-structures/index.d.ts +0 -0
  631. /package/dist/{cjs → types}/data-structures/linked-list/doubly-linked-list.d.ts +0 -0
  632. /package/dist/{cjs → types}/data-structures/linked-list/index.d.ts +0 -0
  633. /package/dist/{cjs → types}/data-structures/linked-list/skip-linked-list.d.ts +0 -0
  634. /package/dist/{cjs → types}/data-structures/matrix/index.d.ts +0 -0
  635. /package/dist/{cjs → types}/data-structures/matrix/matrix.d.ts +0 -0
  636. /package/dist/{cjs → types}/data-structures/matrix/navigator.d.ts +0 -0
  637. /package/dist/{cjs → types}/data-structures/priority-queue/index.d.ts +0 -0
  638. /package/dist/{cjs → types}/data-structures/priority-queue/max-priority-queue.d.ts +0 -0
  639. /package/dist/{cjs → types}/data-structures/priority-queue/min-priority-queue.d.ts +0 -0
  640. /package/dist/{cjs → types}/data-structures/priority-queue/priority-queue.d.ts +0 -0
  641. /package/dist/{cjs → types}/data-structures/queue/deque.d.ts +0 -0
  642. /package/dist/{cjs → types}/data-structures/queue/index.d.ts +0 -0
  643. /package/dist/{cjs → types}/data-structures/queue/queue.d.ts +0 -0
  644. /package/dist/{cjs → types}/data-structures/stack/index.d.ts +0 -0
  645. /package/dist/{cjs → types}/data-structures/stack/stack.d.ts +0 -0
  646. /package/dist/{cjs → types}/data-structures/tree/index.d.ts +0 -0
  647. /package/dist/{cjs → types}/data-structures/tree/tree.d.ts +0 -0
  648. /package/dist/{cjs → types}/data-structures/trie/index.d.ts +0 -0
  649. /package/dist/{cjs → types}/data-structures/trie/trie.d.ts +0 -0
  650. /package/dist/{cjs → types}/index.d.ts +0 -0
  651. /package/dist/{cjs → types}/interfaces/doubly-linked-list.d.ts +0 -0
  652. /package/dist/{cjs → types}/interfaces/graph.d.ts +0 -0
  653. /package/dist/{cjs → types}/interfaces/heap.d.ts +0 -0
  654. /package/dist/{cjs → types}/interfaces/index.d.ts +0 -0
  655. /package/dist/{cjs → types}/interfaces/navigator.d.ts +0 -0
  656. /package/dist/{cjs → types}/interfaces/priority-queue.d.ts +0 -0
  657. /package/dist/{cjs → types}/interfaces/segment-tree.d.ts +0 -0
  658. /package/dist/{cjs → types}/interfaces/singly-linked-list.d.ts +0 -0
  659. /package/dist/{cjs → types}/types/common.d.ts +0 -0
  660. /package/dist/{cjs → types}/types/data-structures/base/base.d.ts +0 -0
  661. /package/dist/{cjs → types}/types/data-structures/base/index.d.ts +0 -0
  662. /package/dist/{cjs → types}/types/data-structures/binary-tree/avl-tree-counter.d.ts +0 -0
  663. /package/dist/{cjs → types}/types/data-structures/binary-tree/avl-tree-multi-map.d.ts +0 -0
  664. /package/dist/{cjs → types}/types/data-structures/binary-tree/avl-tree.d.ts +0 -0
  665. /package/dist/{cjs → types}/types/data-structures/binary-tree/binary-indexed-tree.d.ts +0 -0
  666. /package/dist/{cjs → types}/types/data-structures/binary-tree/binary-tree.d.ts +0 -0
  667. /package/dist/{cjs → types}/types/data-structures/binary-tree/bst.d.ts +0 -0
  668. /package/dist/{cjs → types}/types/data-structures/binary-tree/index.d.ts +0 -0
  669. /package/dist/{cjs → types}/types/data-structures/binary-tree/red-black-tree.d.ts +0 -0
  670. /package/dist/{cjs → types}/types/data-structures/binary-tree/segment-tree.d.ts +0 -0
  671. /package/dist/{cjs → types}/types/data-structures/binary-tree/tree-counter.d.ts +0 -0
  672. /package/dist/{cjs → types}/types/data-structures/binary-tree/tree-multi-map.d.ts +0 -0
  673. /package/dist/{cjs → types}/types/data-structures/graph/abstract-graph.d.ts +0 -0
  674. /package/dist/{cjs → types}/types/data-structures/graph/directed-graph.d.ts +0 -0
  675. /package/dist/{cjs → types}/types/data-structures/graph/index.d.ts +0 -0
  676. /package/dist/{cjs → types}/types/data-structures/graph/map-graph.d.ts +0 -0
  677. /package/dist/{cjs → types}/types/data-structures/graph/undirected-graph.d.ts +0 -0
  678. /package/dist/{cjs → types}/types/data-structures/hash/hash-map.d.ts +0 -0
  679. /package/dist/{cjs → types}/types/data-structures/hash/index.d.ts +0 -0
  680. /package/dist/{cjs → types}/types/data-structures/heap/heap.d.ts +0 -0
  681. /package/dist/{cjs → types}/types/data-structures/heap/index.d.ts +0 -0
  682. /package/dist/{cjs → types}/types/data-structures/heap/max-heap.d.ts +0 -0
  683. /package/dist/{cjs → types}/types/data-structures/heap/min-heap.d.ts +0 -0
  684. /package/dist/{cjs → types}/types/data-structures/index.d.ts +0 -0
  685. /package/dist/{cjs → types}/types/data-structures/linked-list/doubly-linked-list.d.ts +0 -0
  686. /package/dist/{cjs → types}/types/data-structures/linked-list/index.d.ts +0 -0
  687. /package/dist/{cjs → types}/types/data-structures/linked-list/singly-linked-list.d.ts +0 -0
  688. /package/dist/{cjs → types}/types/data-structures/linked-list/skip-linked-list.d.ts +0 -0
  689. /package/dist/{cjs → types}/types/data-structures/matrix/index.d.ts +0 -0
  690. /package/dist/{cjs → types}/types/data-structures/matrix/matrix.d.ts +0 -0
  691. /package/dist/{cjs → types}/types/data-structures/matrix/navigator.d.ts +0 -0
  692. /package/dist/{cjs → types}/types/data-structures/priority-queue/index.d.ts +0 -0
  693. /package/dist/{cjs → types}/types/data-structures/priority-queue/max-priority-queue.d.ts +0 -0
  694. /package/dist/{cjs → types}/types/data-structures/priority-queue/min-priority-queue.d.ts +0 -0
  695. /package/dist/{cjs → types}/types/data-structures/priority-queue/priority-queue.d.ts +0 -0
  696. /package/dist/{cjs → types}/types/data-structures/queue/deque.d.ts +0 -0
  697. /package/dist/{cjs → types}/types/data-structures/queue/index.d.ts +0 -0
  698. /package/dist/{cjs → types}/types/data-structures/queue/queue.d.ts +0 -0
  699. /package/dist/{cjs → types}/types/data-structures/stack/index.d.ts +0 -0
  700. /package/dist/{cjs → types}/types/data-structures/stack/stack.d.ts +0 -0
  701. /package/dist/{cjs → types}/types/data-structures/tree/index.d.ts +0 -0
  702. /package/dist/{cjs → types}/types/data-structures/tree/tree.d.ts +0 -0
  703. /package/dist/{cjs → types}/types/data-structures/trie/index.d.ts +0 -0
  704. /package/dist/{cjs → types}/types/data-structures/trie/trie.d.ts +0 -0
  705. /package/dist/{cjs → types}/types/index.d.ts +0 -0
  706. /package/dist/{cjs → types}/types/utils/index.d.ts +0 -0
  707. /package/dist/{cjs → types}/types/utils/utils.d.ts +0 -0
  708. /package/dist/{cjs → types}/types/utils/validate-type.d.ts +0 -0
  709. /package/dist/{cjs → types}/utils/index.d.ts +0 -0
  710. /package/dist/{cjs → types}/utils/number.d.ts +0 -0
  711. /package/dist/{cjs → types}/utils/utils.d.ts +0 -0
@@ -1,27 +0,0 @@
1
- /**
2
- * data-structure-typed
3
- *
4
- * @author Kirk Qi
5
- * @copyright Copyright (c) 2022 Kirk Qi <qilinaus@gmail.com>
6
- * @license MIT License
7
- */
8
- import type { PriorityQueueOptions } from '../../types';
9
- import { PriorityQueue } from './priority-queue';
10
- /**
11
- * Max-oriented priority queue (max-heap) built on {@link PriorityQueue}.
12
- * The default comparator orders primitive values in descending order. If you store objects,
13
- * you must provide a custom comparator via {@link PriorityQueueOptions}.
14
- * @template E Element type stored in the queue.
15
- * @template R Extra record/metadata associated with each element.
16
- * @example
17
- */
18
- export declare class MaxPriorityQueue<E = any, R = any> extends PriorityQueue<E, R> {
19
- /**
20
- * Creates a max-priority queue.
21
- * @param elements Optional initial elements to insert.
22
- * @param options Optional configuration (e.g., `comparator`, `toElementFn`).
23
- * @throws {TypeError} Thrown when using the default comparator with object elements (provide a custom comparator).
24
- * @remarks Complexity — Time: O(n log n) when inserting n elements incrementally; Space: O(n).
25
- */
26
- constructor(elements?: Iterable<E> | Iterable<R>, options?: PriorityQueueOptions<E, R>);
27
- }
@@ -1,34 +0,0 @@
1
- import { PriorityQueue } from './priority-queue';
2
- /**
3
- * Max-oriented priority queue (max-heap) built on {@link PriorityQueue}.
4
- * The default comparator orders primitive values in descending order. If you store objects,
5
- * you must provide a custom comparator via {@link PriorityQueueOptions}.
6
- * @template E Element type stored in the queue.
7
- * @template R Extra record/metadata associated with each element.
8
- * @example
9
- */
10
- export class MaxPriorityQueue extends PriorityQueue {
11
- /**
12
- * Creates a max-priority queue.
13
- * @param elements Optional initial elements to insert.
14
- * @param options Optional configuration (e.g., `comparator`, `toElementFn`).
15
- * @throws {TypeError} Thrown when using the default comparator with object elements (provide a custom comparator).
16
- * @remarks Complexity — Time: O(n log n) when inserting n elements incrementally; Space: O(n).
17
- */
18
- constructor(elements = [], options) {
19
- super(elements, {
20
- comparator: (a, b) => {
21
- if (typeof a === 'object' || typeof b === 'object') {
22
- throw TypeError(`When comparing object types, a custom comparator must be defined in the constructor's options parameter.`);
23
- }
24
- if (a < b)
25
- return 1;
26
- if (a > b)
27
- return -1;
28
- return 0;
29
- },
30
- ...options
31
- });
32
- }
33
- }
34
- //# sourceMappingURL=max-priority-queue.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"max-priority-queue.js","sourceRoot":"","sources":["../../../../src/data-structures/priority-queue/max-priority-queue.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD;;;;;;;GAOG;AACH,MAAM,OAAO,gBAAmC,SAAQ,aAAmB;IACzE;;;;;;OAMG;IACH,YAAY,WAAsC,EAAE,EAAE,OAAoC;QACxF,KAAK,CAAC,QAAQ,EAAE;YACd,UAAU,EAAE,CAAC,CAAI,EAAE,CAAI,EAAU,EAAE;gBACjC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE,CAAC;oBACnD,MAAM,SAAS,CACb,0GAA0G,CAC3G,CAAC;gBACJ,CAAC;gBACD,IAAI,CAAC,GAAG,CAAC;oBAAE,OAAO,CAAC,CAAC;gBACpB,IAAI,CAAC,GAAG,CAAC;oBAAE,OAAO,CAAC,CAAC,CAAC;gBACrB,OAAO,CAAC,CAAC;YACX,CAAC;YACD,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -1,26 +0,0 @@
1
- /**
2
- * data-structure-typed
3
- *
4
- * @author Kirk Qi
5
- * @copyright Copyright (c) 2022 Kirk Qi <qilinaus@gmail.com>
6
- * @license MIT License
7
- */
8
- import type { PriorityQueueOptions } from '../../types';
9
- import { PriorityQueue } from './priority-queue';
10
- /**
11
- * Min-oriented priority queue (min-heap) built on {@link PriorityQueue}.
12
- * The queue removes the smallest element first under the provided comparator.
13
- * Provide a custom comparator if you store non-primitive objects.
14
- * @template E Element type stored in the queue.
15
- * @template R Extra record/metadata associated with each element.
16
- * @example
17
- */
18
- export declare class MinPriorityQueue<E = any, R = any> extends PriorityQueue<E, R> {
19
- /**
20
- * Creates a min-priority queue.
21
- * @param elements Optional initial elements to insert.
22
- * @param options Optional configuration (e.g., `comparator`, `toElementFn`).
23
- * @remarks Complexity — Time: O(n log n) when inserting n elements incrementally; Space: O(n).
24
- */
25
- constructor(elements?: Iterable<E> | Iterable<R>, options?: PriorityQueueOptions<E, R>);
26
- }
@@ -1,21 +0,0 @@
1
- import { PriorityQueue } from './priority-queue';
2
- /**
3
- * Min-oriented priority queue (min-heap) built on {@link PriorityQueue}.
4
- * The queue removes the smallest element first under the provided comparator.
5
- * Provide a custom comparator if you store non-primitive objects.
6
- * @template E Element type stored in the queue.
7
- * @template R Extra record/metadata associated with each element.
8
- * @example
9
- */
10
- export class MinPriorityQueue extends PriorityQueue {
11
- /**
12
- * Creates a min-priority queue.
13
- * @param elements Optional initial elements to insert.
14
- * @param options Optional configuration (e.g., `comparator`, `toElementFn`).
15
- * @remarks Complexity — Time: O(n log n) when inserting n elements incrementally; Space: O(n).
16
- */
17
- constructor(elements = [], options) {
18
- super(elements, options);
19
- }
20
- }
21
- //# sourceMappingURL=min-priority-queue.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"min-priority-queue.js","sourceRoot":"","sources":["../../../../src/data-structures/priority-queue/min-priority-queue.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD;;;;;;;GAOG;AACH,MAAM,OAAO,gBAAmC,SAAQ,aAAmB;IACzE;;;;;OAKG;IACH,YAAY,WAAsC,EAAE,EAAE,OAAoC;QACxF,KAAK,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC3B,CAAC;CACF"}
@@ -1,15 +0,0 @@
1
- /**
2
- * data-structure-typed
3
- *
4
- * @author Kirk Qi
5
- * @copyright Copyright (c) 2022 Kirk Qi <qilinaus@gmail.com>
6
- * @license MIT License
7
- */
8
- import type { PriorityQueueOptions } from '../../types';
9
- import { Heap } from '../heap';
10
- /**
11
- * @example
12
- */
13
- export declare class PriorityQueue<E = any, R = any> extends Heap<E, R> {
14
- constructor(elements?: Iterable<E> | Iterable<R>, options?: PriorityQueueOptions<E, R>);
15
- }
@@ -1,17 +0,0 @@
1
- /**
2
- * data-structure-typed
3
- *
4
- * @author Kirk Qi
5
- * @copyright Copyright (c) 2022 Kirk Qi <qilinaus@gmail.com>
6
- * @license MIT License
7
- */
8
- import { Heap } from '../heap';
9
- /**
10
- * @example
11
- */
12
- export class PriorityQueue extends Heap {
13
- constructor(elements = [], options) {
14
- super(elements, options);
15
- }
16
- }
17
- //# sourceMappingURL=priority-queue.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"priority-queue.js","sourceRoot":"","sources":["../../../../src/data-structures/priority-queue/priority-queue.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B;;GAEG;AACH,MAAM,OAAO,aAAgC,SAAQ,IAAU;IAC7D,YAAY,WAAsC,EAAE,EAAE,OAAoC;QACxF,KAAK,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC3B,CAAC;CACF"}
@@ -1,431 +0,0 @@
1
- /**
2
- * data-structure-typed
3
- *
4
- * @author Pablo Zeng
5
- * @copyright Copyright (c) 2022 Pablo Zeng <zrwusa@gmail.com>
6
- * @license MIT License
7
- */
8
- import type { DequeOptions, ElementCallback, IterableElementBaseOptions, IterableWithSizeOrLength, LinearBaseOptions } from '../../types';
9
- import { LinearBase } from '../base/linear-base';
10
- /**
11
- * Deque implemented with circular buckets allowing O(1) amortized push/pop at both ends.
12
- * @remarks Time O(1), Space O(1)
13
- * @template E
14
- * @template R
15
- * 1. Operations at Both Ends: Supports adding and removing elements at both the front and back of the queue. This allows it to be used as a stack (last in, first out) and a queue (first in, first out).
16
- * 2. Efficient Random Access: Being based on an array, it offers fast random access capability, allowing constant time access to any element.
17
- * 3. Continuous Memory Allocation: Since it is based on an array, all elements are stored contiguously in memory, which can bring cache friendliness and efficient memory access.
18
- * 4. Efficiency: Adding and removing elements at both ends of a deque is usually very fast. However, when the dynamic array needs to expand, it may involve copying the entire array to a larger one, and this operation has a time complexity of O(n).
19
- * 5. Performance jitter: Deque may experience performance jitter, but DoublyLinkedList will not
20
- * @example
21
- * // prize roulette
22
- * class PrizeRoulette {
23
- * private deque: Deque<string>;
24
- *
25
- * constructor(prizes: string[]) {
26
- * // Initialize the deque with prizes
27
- * this.deque = new Deque<string>(prizes);
28
- * }
29
- *
30
- * // Rotate clockwise to the right (forward)
31
- * rotateClockwise(steps: number): void {
32
- * const n = this.deque.length;
33
- * if (n === 0) return;
34
- *
35
- * for (let i = 0; i < steps; i++) {
36
- * const last = this.deque.pop(); // Remove the last element
37
- * this.deque.unshift(last!); // Add it to the front
38
- * }
39
- * }
40
- *
41
- * // Rotate counterclockwise to the left (backward)
42
- * rotateCounterClockwise(steps: number): void {
43
- * const n = this.deque.length;
44
- * if (n === 0) return;
45
- *
46
- * for (let i = 0; i < steps; i++) {
47
- * const first = this.deque.shift(); // Remove the first element
48
- * this.deque.push(first!); // Add it to the back
49
- * }
50
- * }
51
- *
52
- * // Display the current prize at the head
53
- * display() {
54
- * return this.deque.first;
55
- * }
56
- * }
57
- *
58
- * // Example usage
59
- * const prizes = ['Car', 'Bike', 'Laptop', 'Phone', 'Watch', 'Headphones']; // Initialize the prize list
60
- * const roulette = new PrizeRoulette(prizes);
61
- *
62
- * // Display the initial state
63
- * console.log(roulette.display()); // 'Car' // Car
64
- *
65
- * // Rotate clockwise by 3 steps
66
- * roulette.rotateClockwise(3);
67
- * console.log(roulette.display()); // 'Phone' // Phone
68
- *
69
- * // Rotate counterclockwise by 2 steps
70
- * roulette.rotateCounterClockwise(2);
71
- * console.log(roulette.display()); // 'Headphones'
72
- * @example
73
- * // sliding window
74
- * // Maximum function of sliding window
75
- * function maxSlidingWindow(nums: number[], k: number): number[] {
76
- * const n = nums.length;
77
- * if (n * k === 0) return [];
78
- *
79
- * const deq = new Deque<number>();
80
- * const result: number[] = [];
81
- *
82
- * for (let i = 0; i < n; i++) {
83
- * // Delete indexes in the queue that are not within the window range
84
- * if (deq.length > 0 && deq.first! === i - k) {
85
- * deq.shift();
86
- * }
87
- *
88
- * // Remove all indices less than the current value from the tail of the queue
89
- * while (deq.length > 0 && nums[deq.last!] < nums[i]) {
90
- * deq.pop();
91
- * }
92
- *
93
- * // Add the current index to the end of the queue
94
- * deq.push(i);
95
- *
96
- * // Add the maximum value of the window to the results
97
- * if (i >= k - 1) {
98
- * result.push(nums[deq.first!]);
99
- * }
100
- * }
101
- *
102
- * return result;
103
- * }
104
- *
105
- * const nums = [1, 3, -1, -3, 5, 3, 6, 7];
106
- * const k = 3;
107
- * console.log(maxSlidingWindow(nums, k)); // [3, 3, 5, 5, 6, 7]
108
- */
109
- export declare class Deque<E = any, R = any> extends LinearBase<E, R> {
110
- protected _equals: (a: E, b: E) => boolean;
111
- /**
112
- * Create a Deque and optionally bulk-insert elements.
113
- * @remarks Time O(N), Space O(N)
114
- * @param [elements] - Iterable (or iterable-like) of elements/records to insert.
115
- * @param [options] - Options such as bucketSize, toElementFn, and maxLen.
116
- * @returns New Deque instance.
117
- */
118
- constructor(elements?: IterableWithSizeOrLength<E> | IterableWithSizeOrLength<R>, options?: DequeOptions<E, R>);
119
- protected _bucketSize: number;
120
- /**
121
- * Get the current bucket size.
122
- * @remarks Time O(1), Space O(1)
123
- * @returns Bucket capacity per bucket.
124
- */
125
- get bucketSize(): number;
126
- protected _bucketFirst: number;
127
- /**
128
- * Get the index of the first bucket in use.
129
- * @remarks Time O(1), Space O(1)
130
- * @returns Zero-based bucket index.
131
- */
132
- get bucketFirst(): number;
133
- protected _firstInBucket: number;
134
- /**
135
- * Get the index inside the first bucket.
136
- * @remarks Time O(1), Space O(1)
137
- * @returns Zero-based index within the first bucket.
138
- */
139
- get firstInBucket(): number;
140
- protected _bucketLast: number;
141
- /**
142
- * Get the index of the last bucket in use.
143
- * @remarks Time O(1), Space O(1)
144
- * @returns Zero-based bucket index.
145
- */
146
- get bucketLast(): number;
147
- protected _lastInBucket: number;
148
- /**
149
- * Get the index inside the last bucket.
150
- * @remarks Time O(1), Space O(1)
151
- * @returns Zero-based index within the last bucket.
152
- */
153
- get lastInBucket(): number;
154
- protected _bucketCount: number;
155
- /**
156
- * Get the number of buckets allocated.
157
- * @remarks Time O(1), Space O(1)
158
- * @returns Bucket count.
159
- */
160
- get bucketCount(): number;
161
- protected _buckets: E[][];
162
- /**
163
- * Get the internal buckets array.
164
- * @remarks Time O(1), Space O(1)
165
- * @returns Array of buckets storing values.
166
- */
167
- get buckets(): E[][];
168
- protected _length: number;
169
- /**
170
- * Get the number of elements in the deque.
171
- * @remarks Time O(1), Space O(1)
172
- * @returns Current length.
173
- */
174
- get length(): number;
175
- /**
176
- * Get the first element without removing it.
177
- * @remarks Time O(1), Space O(1)
178
- * @returns First element or undefined.
179
- */
180
- get first(): E | undefined;
181
- /**
182
- * Get the last element without removing it.
183
- * @remarks Time O(1), Space O(1)
184
- * @returns Last element or undefined.
185
- */
186
- get last(): E | undefined;
187
- /**
188
- * Create a Deque from an array of elements.
189
- * @remarks Time O(N), Space O(N)
190
- * @template E
191
- * @template R
192
- * @param this - Constructor (subclass) to instantiate.
193
- * @param data - Array of elements to insert in order.
194
- * @param [options] - Options forwarded to the constructor.
195
- * @returns A new Deque populated from the array.
196
- */
197
- static fromArray<E, R = any>(this: new (elements?: IterableWithSizeOrLength<E> | IterableWithSizeOrLength<R>, options?: DequeOptions<E, R>) => any, data: E[], options?: DequeOptions<E, R>): any;
198
- /**
199
- * Append one element at the back.
200
- * @remarks Time O(1) amortized, Space O(1)
201
- * @param element - Element to append.
202
- * @returns True when appended.
203
- */
204
- push(element: E): boolean;
205
- /**
206
- * Remove and return the last element.
207
- * @remarks Time O(1), Space O(1)
208
- * @returns Removed element or undefined.
209
- */
210
- pop(): E | undefined;
211
- /**
212
- * Remove and return the first element.
213
- * @remarks Time O(1) amortized, Space O(1)
214
- * @returns Removed element or undefined.
215
- */
216
- shift(): E | undefined;
217
- /**
218
- * Prepend one element at the front.
219
- * @remarks Time O(1) amortized, Space O(1)
220
- * @param element - Element to prepend.
221
- * @returns True when prepended.
222
- */
223
- unshift(element: E): boolean;
224
- /**
225
- * Append a sequence of elements.
226
- * @remarks Time O(N), Space O(1)
227
- * @param elements - Iterable (or iterable-like) of elements/records.
228
- * @returns Array of per-element success flags.
229
- */
230
- pushMany(elements: IterableWithSizeOrLength<E> | IterableWithSizeOrLength<R>): boolean[];
231
- /**
232
- * Prepend a sequence of elements.
233
- * @remarks Time O(N), Space O(1)
234
- * @param [elements] - Iterable (or iterable-like) of elements/records.
235
- * @returns Array of per-element success flags.
236
- */
237
- unshiftMany(elements?: IterableWithSizeOrLength<E> | IterableWithSizeOrLength<R>): boolean[];
238
- /**
239
- * Check whether the deque is empty.
240
- * @remarks Time O(1), Space O(1)
241
- * @returns True if length is 0.
242
- */
243
- isEmpty(): boolean;
244
- /**
245
- * Remove all elements and reset structure.
246
- * @remarks Time O(1), Space O(1)
247
- * @returns void
248
- */
249
- clear(): void;
250
- /**
251
- * Get the element at a given position.
252
- * @remarks Time O(1), Space O(1)
253
- * @param pos - Zero-based position from the front.
254
- * @returns Element or undefined.
255
- */
256
- at(pos: number): E | undefined;
257
- /**
258
- * Replace the element at a given position.
259
- * @remarks Time O(1), Space O(1)
260
- * @param pos - Zero-based position from the front.
261
- * @param element - New element value.
262
- * @returns True if updated.
263
- */
264
- setAt(pos: number, element: E): boolean;
265
- /**
266
- * Insert repeated copies of an element at a position.
267
- * @remarks Time O(N), Space O(1)
268
- * @param pos - Zero-based position from the front.
269
- * @param element - Element to insert.
270
- * @param [num] - Number of times to insert (default 1).
271
- * @returns True if inserted.
272
- */
273
- addAt(pos: number, element: E, num?: number): boolean;
274
- /**
275
- * Cut the deque to keep items up to index; optionally mutate in-place.
276
- * @remarks Time O(N), Space O(1)
277
- * @param pos - Last index to keep.
278
- * @param [isCutSelf] - When true, mutate this deque; otherwise return a new deque.
279
- * @returns This deque if in-place; otherwise a new deque of the prefix.
280
- */
281
- cut(pos: number, isCutSelf?: boolean): Deque<E>;
282
- /**
283
- * Remove and/or insert elements at a position (array-like behavior).
284
- * @remarks Time O(N + M), Space O(M)
285
- * @param start - Start index (clamped to [0, length]).
286
- * @param [deleteCount] - Number of elements to remove (default: length - start).
287
- * @param [items] - Elements to insert after `start`.
288
- * @returns A new deque containing the removed elements (typed as `this`).
289
- */
290
- splice(start: number, deleteCount?: number, ...items: E[]): this;
291
- /**
292
- * Cut the deque to keep items from index onward; optionally mutate in-place.
293
- * @remarks Time O(N), Space O(1)
294
- * @param pos - First index to keep.
295
- * @param [isCutSelf] - When true, mutate this deque; otherwise return a new deque.
296
- * @returns This deque if in-place; otherwise a new deque of the suffix.
297
- */
298
- cutRest(pos: number, isCutSelf?: boolean): Deque<E>;
299
- /**
300
- * Delete the element at a given position.
301
- * @remarks Time O(N), Space O(1)
302
- * @param pos - Zero-based position from the front.
303
- * @returns Removed element or undefined.
304
- */
305
- deleteAt(pos: number): E | undefined;
306
- /**
307
- * Delete the first occurrence of a value.
308
- * @remarks Time O(N), Space O(1)
309
- * @param element - Element to remove (using the configured equality).
310
- * @returns True if an element was removed.
311
- */
312
- delete(element: E): boolean;
313
- /**
314
- * Delete the first element matching a predicate.
315
- * @remarks Time O(N), Space O(1)
316
- * @param predicate - Function (value, index, deque) → boolean.
317
- * @returns True if a match was removed.
318
- */
319
- deleteWhere(predicate: (value: E, index: number, deque: this) => boolean): boolean;
320
- /**
321
- * Set the equality comparator used by delete operations.
322
- * @remarks Time O(1), Space O(1)
323
- * @param equals - Equality predicate (a, b) → boolean.
324
- * @returns This deque.
325
- */
326
- setEquality(equals: (a: E, b: E) => boolean): this;
327
- /**
328
- * Reverse the deque by reversing buckets and pointers.
329
- * @remarks Time O(N), Space O(N)
330
- * @returns This deque.
331
- */
332
- reverse(): this;
333
- /**
334
- * Deduplicate consecutive equal elements in-place.
335
- * @remarks Time O(N), Space O(1)
336
- * @returns This deque.
337
- */
338
- unique(): this;
339
- /**
340
- * Trim unused buckets to fit exactly the active range.
341
- * @remarks Time O(N), Space O(1)
342
- * @returns void
343
- */
344
- shrinkToFit(): void;
345
- /**
346
- * Deep clone this deque, preserving options.
347
- * @remarks Time O(N), Space O(N)
348
- * @returns A new deque with the same content and options.
349
- */
350
- clone(): this;
351
- /**
352
- * Filter elements into a new deque of the same class.
353
- * @remarks Time O(N), Space O(N)
354
- * @param predicate - Predicate (value, index, deque) → boolean to keep element.
355
- * @param [thisArg] - Value for `this` inside the predicate.
356
- * @returns A new deque with kept elements.
357
- */
358
- filter(predicate: ElementCallback<E, R, boolean>, thisArg?: any): this;
359
- /**
360
- * Map elements into a new deque of the same element type.
361
- * @remarks Time O(N), Space O(N)
362
- * @param callback - Mapping function (value, index, deque) → newValue.
363
- * @param [thisArg] - Value for `this` inside the callback.
364
- * @returns A new deque with mapped values.
365
- */
366
- mapSame(callback: ElementCallback<E, R, E>, thisArg?: any): this;
367
- /**
368
- * Map elements into a new deque (possibly different element type).
369
- * @remarks Time O(N), Space O(N)
370
- * @template EM
371
- * @template RM
372
- * @param callback - Mapping function (value, index, deque) → newElement.
373
- * @param [options] - Options for the output deque (e.g., bucketSize, toElementFn, maxLen).
374
- * @param [thisArg] - Value for `this` inside the callback.
375
- * @returns A new Deque with mapped elements.
376
- */
377
- map<EM, RM>(callback: ElementCallback<E, R, EM>, options?: IterableElementBaseOptions<EM, RM>, thisArg?: any): Deque<EM, RM>;
378
- /**
379
- * (Protected) Set the internal bucket size.
380
- * @remarks Time O(1), Space O(1)
381
- * @param size - Bucket capacity to assign.
382
- * @returns void
383
- */
384
- protected _setBucketSize(size: number): void;
385
- /**
386
- * (Protected) Iterate elements from front to back.
387
- * @remarks Time O(N), Space O(1)
388
- * @returns Iterator of elements.
389
- */
390
- protected _getIterator(): IterableIterator<E>;
391
- /**
392
- * (Protected) Reallocate buckets to make room near the ends.
393
- * @remarks Time O(N), Space O(N)
394
- * @param [needBucketNum] - How many extra buckets to add; defaults to half of current.
395
- * @returns void
396
- */
397
- protected _reallocate(needBucketNum?: number): void;
398
- /**
399
- * (Protected) Translate a logical position to bucket/offset.
400
- * @remarks Time O(1), Space O(1)
401
- * @param pos - Zero-based position.
402
- * @returns An object containing bucketIndex and indexInBucket.
403
- */
404
- protected _getBucketAndPosition(pos: number): {
405
- bucketIndex: number;
406
- indexInBucket: number;
407
- };
408
- /**
409
- * (Protected) Create an empty instance of the same concrete class.
410
- * @remarks Time O(1), Space O(1)
411
- * @param [options] - Options forwarded to the constructor.
412
- * @returns An empty like-kind deque instance.
413
- */
414
- protected _createInstance(options?: LinearBaseOptions<E, R>): this;
415
- /**
416
- * (Protected) Create a like-kind deque seeded by elements.
417
- * @remarks Time O(N), Space O(N)
418
- * @template T
419
- * @template RR
420
- * @param [elements] - Iterable used to seed the new deque.
421
- * @param [options] - Options forwarded to the constructor.
422
- * @returns A like-kind Deque instance.
423
- */
424
- protected _createLike<T = E, RR = R>(elements?: IterableWithSizeOrLength<T> | IterableWithSizeOrLength<RR>, options?: DequeOptions<T, RR>): any;
425
- /**
426
- * (Protected) Iterate elements from back to front.
427
- * @remarks Time O(N), Space O(1)
428
- * @returns Iterator of elements.
429
- */
430
- protected _getReverseIterator(): IterableIterator<E>;
431
- }