data-structure-typed 1.38.0 → 1.38.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 (792) hide show
  1. package/dist/{data-structures → cjs/data-structures}/binary-tree/avl-tree.js +22 -22
  2. package/dist/cjs/data-structures/binary-tree/avl-tree.js.map +1 -0
  3. package/dist/cjs/data-structures/binary-tree/binary-indexed-tree.js.map +1 -0
  4. package/dist/{data-structures → cjs/data-structures}/binary-tree/binary-tree.js +32 -32
  5. package/dist/cjs/data-structures/binary-tree/binary-tree.js.map +1 -0
  6. package/dist/cjs/data-structures/binary-tree/bst.js.map +1 -0
  7. package/dist/cjs/data-structures/binary-tree/index.js.map +1 -0
  8. package/dist/cjs/data-structures/binary-tree/rb-tree.js.map +1 -0
  9. package/dist/cjs/data-structures/binary-tree/segment-tree.js.map +1 -0
  10. package/dist/{data-structures → cjs/data-structures}/binary-tree/tree-multiset.js +23 -23
  11. package/dist/cjs/data-structures/binary-tree/tree-multiset.js.map +1 -0
  12. package/dist/cjs/data-structures/graph/abstract-graph.js.map +1 -0
  13. package/dist/cjs/data-structures/graph/directed-graph.js.map +1 -0
  14. package/dist/cjs/data-structures/graph/index.js.map +1 -0
  15. package/dist/cjs/data-structures/graph/map-graph.js.map +1 -0
  16. package/dist/cjs/data-structures/graph/undirected-graph.js.map +1 -0
  17. package/dist/cjs/data-structures/hash/coordinate-map.js.map +1 -0
  18. package/dist/cjs/data-structures/hash/coordinate-set.js.map +1 -0
  19. package/dist/{data-structures → cjs/data-structures}/hash/hash-map.js +59 -59
  20. package/dist/cjs/data-structures/hash/hash-map.js.map +1 -0
  21. package/dist/{data-structures → cjs/data-structures}/hash/hash-table.js +99 -99
  22. package/dist/cjs/data-structures/hash/hash-table.js.map +1 -0
  23. package/dist/cjs/data-structures/hash/index.js.map +1 -0
  24. package/dist/cjs/data-structures/hash/tree-map.js.map +1 -0
  25. package/dist/cjs/data-structures/hash/tree-set.js.map +1 -0
  26. package/dist/{data-structures → cjs/data-structures}/heap/heap.js +167 -167
  27. package/dist/cjs/data-structures/heap/heap.js.map +1 -0
  28. package/dist/cjs/data-structures/heap/index.js.map +1 -0
  29. package/dist/cjs/data-structures/heap/max-heap.js.map +1 -0
  30. package/dist/cjs/data-structures/heap/min-heap.js.map +1 -0
  31. package/dist/cjs/data-structures/index.js.map +1 -0
  32. package/dist/{data-structures → cjs/data-structures}/linked-list/doubly-linked-list.js +3 -3
  33. package/dist/cjs/data-structures/linked-list/doubly-linked-list.js.map +1 -0
  34. package/dist/cjs/data-structures/linked-list/index.js.map +1 -0
  35. package/dist/cjs/data-structures/linked-list/singly-linked-list.js.map +1 -0
  36. package/dist/{data-structures → cjs/data-structures}/linked-list/skip-linked-list.js +34 -34
  37. package/dist/cjs/data-structures/linked-list/skip-linked-list.js.map +1 -0
  38. package/dist/cjs/data-structures/matrix/index.js.map +1 -0
  39. package/dist/cjs/data-structures/matrix/matrix.js.map +1 -0
  40. package/{lib → dist/cjs}/data-structures/matrix/matrix2d.js +21 -13
  41. package/dist/cjs/data-structures/matrix/matrix2d.js.map +1 -0
  42. package/dist/cjs/data-structures/matrix/navigator.js.map +1 -0
  43. package/dist/cjs/data-structures/matrix/vector2d.js.map +1 -0
  44. package/dist/cjs/data-structures/priority-queue/index.js.map +1 -0
  45. package/dist/cjs/data-structures/priority-queue/max-priority-queue.js.map +1 -0
  46. package/dist/cjs/data-structures/priority-queue/min-priority-queue.js.map +1 -0
  47. package/dist/cjs/data-structures/priority-queue/priority-queue.js.map +1 -0
  48. package/dist/cjs/data-structures/queue/deque.js.map +1 -0
  49. package/dist/cjs/data-structures/queue/index.js.map +1 -0
  50. package/dist/cjs/data-structures/queue/queue.js.map +1 -0
  51. package/dist/cjs/data-structures/stack/index.js.map +1 -0
  52. package/dist/cjs/data-structures/stack/stack.js.map +1 -0
  53. package/dist/cjs/data-structures/tree/index.js.map +1 -0
  54. package/dist/cjs/data-structures/tree/tree.js.map +1 -0
  55. package/dist/cjs/data-structures/trie/index.js.map +1 -0
  56. package/dist/{data-structures → cjs/data-structures}/trie/trie.js +6 -6
  57. package/dist/cjs/data-structures/trie/trie.js.map +1 -0
  58. package/dist/cjs/index.js.map +1 -0
  59. package/dist/cjs/interfaces/binary-tree.js.map +1 -0
  60. package/dist/cjs/interfaces/doubly-linked-list.js.map +1 -0
  61. package/dist/{interfaces → cjs/interfaces}/graph.js.map +1 -1
  62. package/dist/{interfaces → cjs/interfaces}/heap.js.map +1 -1
  63. package/dist/cjs/interfaces/index.js.map +1 -0
  64. package/dist/{interfaces → cjs/interfaces}/navigator.js.map +1 -1
  65. package/dist/cjs/interfaces/priority-queue.js.map +1 -0
  66. package/dist/cjs/interfaces/segment-tree.js.map +1 -0
  67. package/dist/cjs/interfaces/singly-linked-list.js.map +1 -0
  68. package/dist/cjs/types/data-structures/binary-tree/avl-tree.js.map +1 -0
  69. package/dist/cjs/types/data-structures/binary-tree/binary-indexed-tree.js.map +1 -0
  70. package/dist/cjs/types/data-structures/binary-tree/binary-tree.js.map +1 -0
  71. package/dist/cjs/types/data-structures/binary-tree/bst.js.map +1 -0
  72. package/dist/cjs/types/data-structures/binary-tree/index.js.map +1 -0
  73. package/dist/cjs/types/data-structures/binary-tree/rb-tree.js.map +1 -0
  74. package/dist/cjs/types/data-structures/binary-tree/segment-tree.js.map +1 -0
  75. package/dist/cjs/types/data-structures/binary-tree/tree-multiset.js.map +1 -0
  76. package/dist/cjs/types/data-structures/graph/abstract-graph.js.map +1 -0
  77. package/dist/cjs/types/data-structures/graph/directed-graph.js.map +1 -0
  78. package/dist/cjs/types/data-structures/graph/index.js.map +1 -0
  79. package/dist/cjs/types/data-structures/graph/map-graph.js.map +1 -0
  80. package/dist/cjs/types/data-structures/graph/undirected-graph.js.map +1 -0
  81. package/dist/cjs/types/data-structures/hash/coordinate-map.js.map +1 -0
  82. package/dist/cjs/types/data-structures/hash/coordinate-set.js.map +1 -0
  83. package/dist/cjs/types/data-structures/hash/hash-map.js.map +1 -0
  84. package/dist/cjs/types/data-structures/hash/hash-table.js.map +1 -0
  85. package/dist/cjs/types/data-structures/hash/index.js.map +1 -0
  86. package/dist/cjs/types/data-structures/hash/tree-map.js.map +1 -0
  87. package/dist/cjs/types/data-structures/hash/tree-set.js.map +1 -0
  88. package/dist/cjs/types/data-structures/heap/heap.js.map +1 -0
  89. package/dist/cjs/types/data-structures/heap/index.js.map +1 -0
  90. package/dist/cjs/types/data-structures/heap/max-heap.js.map +1 -0
  91. package/dist/cjs/types/data-structures/heap/min-heap.js.map +1 -0
  92. package/dist/cjs/types/data-structures/index.js.map +1 -0
  93. package/dist/cjs/types/data-structures/linked-list/doubly-linked-list.js.map +1 -0
  94. package/dist/cjs/types/data-structures/linked-list/index.js.map +1 -0
  95. package/dist/cjs/types/data-structures/linked-list/singly-linked-list.js.map +1 -0
  96. package/dist/cjs/types/data-structures/linked-list/skip-linked-list.js.map +1 -0
  97. package/dist/cjs/types/data-structures/matrix/index.js.map +1 -0
  98. package/dist/cjs/types/data-structures/matrix/matrix.js.map +1 -0
  99. package/dist/cjs/types/data-structures/matrix/matrix2d.js.map +1 -0
  100. package/dist/cjs/types/data-structures/matrix/navigator.js.map +1 -0
  101. package/dist/cjs/types/data-structures/matrix/vector2d.js.map +1 -0
  102. package/dist/cjs/types/data-structures/priority-queue/index.js.map +1 -0
  103. package/dist/cjs/types/data-structures/priority-queue/max-priority-queue.js.map +1 -0
  104. package/dist/cjs/types/data-structures/priority-queue/min-priority-queue.js.map +1 -0
  105. package/dist/cjs/types/data-structures/priority-queue/priority-queue.js.map +1 -0
  106. package/dist/cjs/types/data-structures/queue/deque.js.map +1 -0
  107. package/dist/cjs/types/data-structures/queue/index.js.map +1 -0
  108. package/dist/cjs/types/data-structures/queue/queue.js.map +1 -0
  109. package/dist/cjs/types/data-structures/stack/index.js.map +1 -0
  110. package/dist/cjs/types/data-structures/stack/stack.js.map +1 -0
  111. package/dist/cjs/types/data-structures/tree/index.js.map +1 -0
  112. package/dist/cjs/types/data-structures/tree/tree.js.map +1 -0
  113. package/dist/cjs/types/data-structures/trie/index.js.map +1 -0
  114. package/dist/cjs/types/data-structures/trie/trie.js.map +1 -0
  115. package/dist/cjs/types/helpers.js.map +1 -0
  116. package/dist/cjs/types/index.js.map +1 -0
  117. package/dist/cjs/types/utils/index.js.map +1 -0
  118. package/dist/{types → cjs/types}/utils/utils.js.map +1 -1
  119. package/dist/cjs/types/utils/validate-type.js.map +1 -0
  120. package/dist/cjs/utils/index.js.map +1 -0
  121. package/dist/cjs/utils/utils.js.map +1 -0
  122. package/{lib → dist/mjs}/data-structures/binary-tree/avl-tree.js +32 -26
  123. package/{lib → dist/mjs}/data-structures/binary-tree/binary-indexed-tree.js +12 -3
  124. package/{lib → dist/mjs}/data-structures/binary-tree/binary-tree.js +90 -73
  125. package/{lib → dist/mjs}/data-structures/binary-tree/bst.js +42 -40
  126. package/dist/mjs/data-structures/binary-tree/index.js +23 -0
  127. package/dist/mjs/data-structures/binary-tree/rb-tree.js +28 -0
  128. package/{lib → dist/mjs}/data-structures/binary-tree/segment-tree.js +17 -10
  129. package/{lib → dist/mjs}/data-structures/binary-tree/tree-multiset.js +42 -36
  130. package/{lib → dist/mjs}/data-structures/graph/abstract-graph.js +29 -24
  131. package/{lib → dist/mjs}/data-structures/graph/directed-graph.js +22 -14
  132. package/dist/mjs/data-structures/graph/index.js +20 -0
  133. package/{lib → dist/mjs}/data-structures/graph/map-graph.js +14 -5
  134. package/{lib → dist/mjs}/data-structures/graph/undirected-graph.js +19 -13
  135. package/{lib → dist/mjs}/data-structures/hash/coordinate-map.js +6 -2
  136. package/{lib → dist/mjs}/data-structures/hash/coordinate-set.js +6 -2
  137. package/{lib → dist/mjs}/data-structures/hash/hash-map.js +70 -60
  138. package/{lib → dist/mjs}/data-structures/hash/hash-table.js +115 -103
  139. package/dist/mjs/data-structures/hash/index.js +22 -0
  140. package/dist/mjs/data-structures/hash/tree-map.js +6 -0
  141. package/dist/mjs/data-structures/hash/tree-set.js +6 -0
  142. package/{lib → dist/mjs}/data-structures/heap/heap.js +188 -172
  143. package/dist/mjs/data-structures/heap/index.js +19 -0
  144. package/{lib → dist/mjs}/data-structures/heap/max-heap.js +6 -2
  145. package/{lib → dist/mjs}/data-structures/heap/min-heap.js +6 -2
  146. package/dist/mjs/data-structures/index.js +27 -0
  147. package/{lib → dist/mjs}/data-structures/linked-list/doubly-linked-list.js +18 -9
  148. package/dist/mjs/data-structures/linked-list/index.js +19 -0
  149. package/{lib → dist/mjs}/data-structures/linked-list/singly-linked-list.js +12 -2
  150. package/{lib → dist/mjs}/data-structures/linked-list/skip-linked-list.js +48 -36
  151. package/dist/mjs/data-structures/matrix/index.js +20 -0
  152. package/{lib → dist/mjs}/data-structures/matrix/matrix.js +6 -1
  153. package/dist/{data-structures → mjs/data-structures}/matrix/matrix2d.js +14 -11
  154. package/{lib → dist/mjs}/data-structures/matrix/navigator.js +14 -2
  155. package/{lib → dist/mjs}/data-structures/matrix/vector2d.js +9 -2
  156. package/dist/mjs/data-structures/priority-queue/index.js +19 -0
  157. package/{lib → dist/mjs}/data-structures/priority-queue/max-priority-queue.js +6 -2
  158. package/{lib → dist/mjs}/data-structures/priority-queue/min-priority-queue.js +6 -2
  159. package/dist/mjs/data-structures/priority-queue/priority-queue.js +17 -0
  160. package/{lib → dist/mjs}/data-structures/queue/deque.js +21 -22
  161. package/dist/mjs/data-structures/queue/index.js +18 -0
  162. package/{lib → dist/mjs}/data-structures/queue/queue.js +11 -5
  163. package/dist/mjs/data-structures/stack/index.js +17 -0
  164. package/{lib → dist/mjs}/data-structures/stack/stack.js +6 -1
  165. package/dist/mjs/data-structures/tree/index.js +17 -0
  166. package/{lib → dist/mjs}/data-structures/tree/tree.js +8 -1
  167. package/dist/mjs/data-structures/trie/index.js +17 -0
  168. package/{lib → dist/mjs}/data-structures/trie/trie.js +18 -8
  169. package/dist/mjs/index.js +20 -0
  170. package/dist/mjs/interfaces/binary-tree.js +2 -0
  171. package/dist/mjs/interfaces/doubly-linked-list.js +2 -0
  172. package/dist/mjs/interfaces/graph.js +2 -0
  173. package/dist/mjs/interfaces/heap.js +2 -0
  174. package/dist/mjs/interfaces/index.js +24 -0
  175. package/dist/mjs/interfaces/navigator.js +2 -0
  176. package/dist/mjs/interfaces/priority-queue.js +2 -0
  177. package/dist/mjs/interfaces/segment-tree.js +2 -0
  178. package/dist/mjs/interfaces/singly-linked-list.js +2 -0
  179. package/dist/mjs/types/data-structures/binary-tree/avl-tree.js +2 -0
  180. package/dist/mjs/types/data-structures/binary-tree/binary-indexed-tree.js +2 -0
  181. package/{lib → dist/mjs}/types/data-structures/binary-tree/binary-tree.js +7 -4
  182. package/dist/mjs/types/data-structures/binary-tree/bst.js +2 -0
  183. package/dist/mjs/types/data-structures/binary-tree/index.js +22 -0
  184. package/dist/mjs/types/data-structures/binary-tree/rb-tree.js +8 -0
  185. package/dist/mjs/types/data-structures/binary-tree/segment-tree.js +2 -0
  186. package/dist/mjs/types/data-structures/binary-tree/tree-multiset.js +2 -0
  187. package/dist/mjs/types/data-structures/graph/abstract-graph.js +2 -0
  188. package/dist/mjs/types/data-structures/graph/directed-graph.js +9 -0
  189. package/dist/mjs/types/data-structures/graph/index.js +19 -0
  190. package/dist/mjs/types/data-structures/graph/map-graph.js +2 -0
  191. package/dist/mjs/types/data-structures/graph/undirected-graph.js +2 -0
  192. package/dist/mjs/types/data-structures/hash/coordinate-map.js +2 -0
  193. package/dist/mjs/types/data-structures/hash/coordinate-set.js +2 -0
  194. package/dist/mjs/types/data-structures/hash/hash-map.js +2 -0
  195. package/dist/mjs/types/data-structures/hash/hash-table.js +2 -0
  196. package/dist/mjs/types/data-structures/hash/index.js +2 -0
  197. package/dist/mjs/types/data-structures/hash/tree-map.js +2 -0
  198. package/dist/mjs/types/data-structures/hash/tree-set.js +2 -0
  199. package/dist/mjs/types/data-structures/heap/heap.js +2 -0
  200. package/dist/mjs/types/data-structures/heap/index.js +17 -0
  201. package/dist/mjs/types/data-structures/heap/max-heap.js +2 -0
  202. package/dist/mjs/types/data-structures/heap/min-heap.js +2 -0
  203. package/dist/mjs/types/data-structures/index.js +27 -0
  204. package/dist/mjs/types/data-structures/linked-list/doubly-linked-list.js +2 -0
  205. package/dist/mjs/types/data-structures/linked-list/index.js +18 -0
  206. package/dist/mjs/types/data-structures/linked-list/singly-linked-list.js +2 -0
  207. package/dist/mjs/types/data-structures/linked-list/skip-linked-list.js +2 -0
  208. package/dist/mjs/types/data-structures/matrix/index.js +17 -0
  209. package/dist/mjs/types/data-structures/matrix/matrix.js +2 -0
  210. package/dist/mjs/types/data-structures/matrix/matrix2d.js +2 -0
  211. package/dist/mjs/types/data-structures/matrix/navigator.js +2 -0
  212. package/dist/mjs/types/data-structures/matrix/vector2d.js +2 -0
  213. package/dist/mjs/types/data-structures/priority-queue/index.js +19 -0
  214. package/dist/mjs/types/data-structures/priority-queue/max-priority-queue.js +2 -0
  215. package/dist/mjs/types/data-structures/priority-queue/min-priority-queue.js +2 -0
  216. package/dist/mjs/types/data-structures/priority-queue/priority-queue.js +2 -0
  217. package/dist/mjs/types/data-structures/queue/deque.js +2 -0
  218. package/dist/mjs/types/data-structures/queue/index.js +18 -0
  219. package/dist/mjs/types/data-structures/queue/queue.js +2 -0
  220. package/dist/mjs/types/data-structures/stack/index.js +17 -0
  221. package/dist/mjs/types/data-structures/stack/stack.js +2 -0
  222. package/dist/mjs/types/data-structures/tree/index.js +17 -0
  223. package/dist/mjs/types/data-structures/tree/tree.js +2 -0
  224. package/dist/mjs/types/data-structures/trie/index.js +17 -0
  225. package/dist/mjs/types/data-structures/trie/trie.js +2 -0
  226. package/dist/mjs/types/helpers.js +9 -0
  227. package/dist/mjs/types/index.js +19 -0
  228. package/dist/mjs/types/utils/index.js +18 -0
  229. package/dist/mjs/types/utils/utils.js +2 -0
  230. package/dist/mjs/types/utils/validate-type.js +2 -0
  231. package/dist/mjs/utils/index.js +17 -0
  232. package/dist/mjs/utils/utils.js +64 -0
  233. package/dist/umd/index.global.js +27 -0
  234. package/dist/umd/index.global.js.map +1 -0
  235. package/package.json +21 -23
  236. package/src/data-structures/binary-tree/avl-tree.ts +28 -28
  237. package/src/data-structures/binary-tree/binary-indexed-tree.ts +1 -1
  238. package/src/data-structures/binary-tree/binary-tree.ts +57 -57
  239. package/src/data-structures/binary-tree/bst.ts +4 -0
  240. package/src/data-structures/binary-tree/rb-tree.ts +2 -2
  241. package/src/data-structures/binary-tree/tree-multiset.ts +30 -31
  242. package/src/data-structures/graph/abstract-graph.ts +10 -11
  243. package/src/data-structures/graph/directed-graph.ts +1 -2
  244. package/src/data-structures/graph/undirected-graph.ts +4 -5
  245. package/src/data-structures/hash/hash-map.ts +82 -76
  246. package/src/data-structures/hash/hash-table.ts +112 -109
  247. package/src/data-structures/hash/tree-map.ts +2 -1
  248. package/src/data-structures/hash/tree-set.ts +2 -1
  249. package/src/data-structures/heap/heap.ts +182 -181
  250. package/src/data-structures/linked-list/doubly-linked-list.ts +4 -4
  251. package/src/data-structures/linked-list/singly-linked-list.ts +1 -1
  252. package/src/data-structures/linked-list/skip-linked-list.ts +45 -38
  253. package/src/data-structures/matrix/matrix.ts +1 -1
  254. package/src/data-structures/matrix/matrix2d.ts +10 -10
  255. package/src/data-structures/matrix/vector2d.ts +2 -1
  256. package/src/data-structures/queue/deque.ts +5 -4
  257. package/src/data-structures/queue/queue.ts +1 -1
  258. package/src/data-structures/trie/trie.ts +9 -9
  259. package/src/types/data-structures/matrix/navigator.ts +1 -1
  260. package/src/types/helpers.ts +5 -1
  261. package/src/types/utils/utils.ts +1 -1
  262. package/src/types/utils/validate-type.ts +2 -2
  263. package/test/integration/bst.test.ts +1 -1
  264. package/test/integration/index.html +1 -2
  265. package/test/unit/data-structures/binary-tree/avl-tree.test.ts +1 -1
  266. package/test/unit/data-structures/binary-tree/binary-index-tree.test.ts +3 -2
  267. package/test/unit/data-structures/binary-tree/bst.test.ts +3 -3
  268. package/test/unit/data-structures/binary-tree/overall.test.ts +1 -1
  269. package/test/unit/data-structures/binary-tree/tree-multiset.test.ts +1 -1
  270. package/test/unit/data-structures/hash/hash-table.test.ts +1 -1
  271. package/test/unit/data-structures/heap/heap.test.ts +2 -2
  272. package/test/unit/data-structures/linked-list/doubly-linked-list.test.ts +1 -1
  273. package/test/unit/data-structures/linked-list/singly-linked-list.test.ts +2 -2
  274. package/test/unit/data-structures/matrix/navigator.test.ts +1 -1
  275. package/test/unit/data-structures/priority-queue/max-priority-queue.test.ts +2 -2
  276. package/test/unit/data-structures/queue/deque.test.ts +1 -1
  277. package/test/unit/data-structures/queue/queue.test.ts +1 -1
  278. package/test/utils/big-o.ts +1 -1
  279. package/tsconfig-base.json +27 -0
  280. package/tsconfig-cjs.json +9 -0
  281. package/tsup.config.js +11 -0
  282. package/umd/bundle.min.js +1 -1
  283. package/umd/bundle.min.js.map +1 -1
  284. package/dist/data-structures/binary-tree/avl-tree.js.map +0 -1
  285. package/dist/data-structures/binary-tree/binary-indexed-tree.js.map +0 -1
  286. package/dist/data-structures/binary-tree/binary-tree.js.map +0 -1
  287. package/dist/data-structures/binary-tree/bst.js.map +0 -1
  288. package/dist/data-structures/binary-tree/index.js.map +0 -1
  289. package/dist/data-structures/binary-tree/rb-tree.js.map +0 -1
  290. package/dist/data-structures/binary-tree/segment-tree.js.map +0 -1
  291. package/dist/data-structures/binary-tree/tree-multiset.js.map +0 -1
  292. package/dist/data-structures/graph/abstract-graph.js.map +0 -1
  293. package/dist/data-structures/graph/directed-graph.js.map +0 -1
  294. package/dist/data-structures/graph/index.js.map +0 -1
  295. package/dist/data-structures/graph/map-graph.js.map +0 -1
  296. package/dist/data-structures/graph/undirected-graph.js.map +0 -1
  297. package/dist/data-structures/hash/coordinate-map.js.map +0 -1
  298. package/dist/data-structures/hash/coordinate-set.js.map +0 -1
  299. package/dist/data-structures/hash/hash-map.js.map +0 -1
  300. package/dist/data-structures/hash/hash-table.js.map +0 -1
  301. package/dist/data-structures/hash/index.js.map +0 -1
  302. package/dist/data-structures/hash/tree-map.js.map +0 -1
  303. package/dist/data-structures/hash/tree-set.js.map +0 -1
  304. package/dist/data-structures/heap/heap.js.map +0 -1
  305. package/dist/data-structures/heap/index.js.map +0 -1
  306. package/dist/data-structures/heap/max-heap.js.map +0 -1
  307. package/dist/data-structures/heap/min-heap.js.map +0 -1
  308. package/dist/data-structures/index.js.map +0 -1
  309. package/dist/data-structures/linked-list/doubly-linked-list.js.map +0 -1
  310. package/dist/data-structures/linked-list/index.js.map +0 -1
  311. package/dist/data-structures/linked-list/singly-linked-list.js.map +0 -1
  312. package/dist/data-structures/linked-list/skip-linked-list.js.map +0 -1
  313. package/dist/data-structures/matrix/index.js.map +0 -1
  314. package/dist/data-structures/matrix/matrix.js.map +0 -1
  315. package/dist/data-structures/matrix/matrix2d.js.map +0 -1
  316. package/dist/data-structures/matrix/navigator.js.map +0 -1
  317. package/dist/data-structures/matrix/vector2d.js.map +0 -1
  318. package/dist/data-structures/priority-queue/index.js.map +0 -1
  319. package/dist/data-structures/priority-queue/max-priority-queue.js.map +0 -1
  320. package/dist/data-structures/priority-queue/min-priority-queue.js.map +0 -1
  321. package/dist/data-structures/priority-queue/priority-queue.js.map +0 -1
  322. package/dist/data-structures/queue/deque.js.map +0 -1
  323. package/dist/data-structures/queue/index.js.map +0 -1
  324. package/dist/data-structures/queue/queue.js.map +0 -1
  325. package/dist/data-structures/stack/index.js.map +0 -1
  326. package/dist/data-structures/stack/stack.js.map +0 -1
  327. package/dist/data-structures/tree/index.js.map +0 -1
  328. package/dist/data-structures/tree/tree.js.map +0 -1
  329. package/dist/data-structures/trie/index.js.map +0 -1
  330. package/dist/data-structures/trie/trie.js.map +0 -1
  331. package/dist/index.js.map +0 -1
  332. package/dist/interfaces/binary-tree.js.map +0 -1
  333. package/dist/interfaces/doubly-linked-list.js.map +0 -1
  334. package/dist/interfaces/index.js.map +0 -1
  335. package/dist/interfaces/priority-queue.js.map +0 -1
  336. package/dist/interfaces/segment-tree.js.map +0 -1
  337. package/dist/interfaces/singly-linked-list.js.map +0 -1
  338. package/dist/types/data-structures/binary-tree/avl-tree.js.map +0 -1
  339. package/dist/types/data-structures/binary-tree/binary-indexed-tree.js.map +0 -1
  340. package/dist/types/data-structures/binary-tree/binary-tree.js.map +0 -1
  341. package/dist/types/data-structures/binary-tree/bst.js.map +0 -1
  342. package/dist/types/data-structures/binary-tree/index.js.map +0 -1
  343. package/dist/types/data-structures/binary-tree/rb-tree.js.map +0 -1
  344. package/dist/types/data-structures/binary-tree/segment-tree.js.map +0 -1
  345. package/dist/types/data-structures/binary-tree/tree-multiset.js.map +0 -1
  346. package/dist/types/data-structures/graph/abstract-graph.js.map +0 -1
  347. package/dist/types/data-structures/graph/directed-graph.js.map +0 -1
  348. package/dist/types/data-structures/graph/index.js.map +0 -1
  349. package/dist/types/data-structures/graph/map-graph.js.map +0 -1
  350. package/dist/types/data-structures/graph/undirected-graph.js.map +0 -1
  351. package/dist/types/data-structures/hash/coordinate-map.js.map +0 -1
  352. package/dist/types/data-structures/hash/coordinate-set.js.map +0 -1
  353. package/dist/types/data-structures/hash/hash-map.js.map +0 -1
  354. package/dist/types/data-structures/hash/hash-table.js.map +0 -1
  355. package/dist/types/data-structures/hash/index.js.map +0 -1
  356. package/dist/types/data-structures/hash/tree-map.js.map +0 -1
  357. package/dist/types/data-structures/hash/tree-set.js.map +0 -1
  358. package/dist/types/data-structures/heap/heap.js.map +0 -1
  359. package/dist/types/data-structures/heap/index.js.map +0 -1
  360. package/dist/types/data-structures/heap/max-heap.js.map +0 -1
  361. package/dist/types/data-structures/heap/min-heap.js.map +0 -1
  362. package/dist/types/data-structures/index.js.map +0 -1
  363. package/dist/types/data-structures/linked-list/doubly-linked-list.js.map +0 -1
  364. package/dist/types/data-structures/linked-list/index.js.map +0 -1
  365. package/dist/types/data-structures/linked-list/singly-linked-list.js.map +0 -1
  366. package/dist/types/data-structures/linked-list/skip-linked-list.js.map +0 -1
  367. package/dist/types/data-structures/matrix/index.js.map +0 -1
  368. package/dist/types/data-structures/matrix/matrix.js.map +0 -1
  369. package/dist/types/data-structures/matrix/matrix2d.js.map +0 -1
  370. package/dist/types/data-structures/matrix/navigator.js.map +0 -1
  371. package/dist/types/data-structures/matrix/vector2d.js.map +0 -1
  372. package/dist/types/data-structures/priority-queue/index.js.map +0 -1
  373. package/dist/types/data-structures/priority-queue/max-priority-queue.js.map +0 -1
  374. package/dist/types/data-structures/priority-queue/min-priority-queue.js.map +0 -1
  375. package/dist/types/data-structures/priority-queue/priority-queue.js.map +0 -1
  376. package/dist/types/data-structures/queue/deque.js.map +0 -1
  377. package/dist/types/data-structures/queue/index.js.map +0 -1
  378. package/dist/types/data-structures/queue/queue.js.map +0 -1
  379. package/dist/types/data-structures/stack/index.js.map +0 -1
  380. package/dist/types/data-structures/stack/stack.js.map +0 -1
  381. package/dist/types/data-structures/tree/index.js.map +0 -1
  382. package/dist/types/data-structures/tree/tree.js.map +0 -1
  383. package/dist/types/data-structures/trie/index.js.map +0 -1
  384. package/dist/types/data-structures/trie/trie.js.map +0 -1
  385. package/dist/types/helpers.js.map +0 -1
  386. package/dist/types/index.js.map +0 -1
  387. package/dist/types/utils/index.js.map +0 -1
  388. package/dist/types/utils/validate-type.js.map +0 -1
  389. package/dist/utils/index.js.map +0 -1
  390. package/dist/utils/utils.js.map +0 -1
  391. package/lib/data-structures/binary-tree/index.js +0 -7
  392. package/lib/data-structures/binary-tree/rb-tree.js +0 -22
  393. package/lib/data-structures/graph/index.js +0 -4
  394. package/lib/data-structures/hash/index.js +0 -6
  395. package/lib/data-structures/hash/tree-map.js +0 -2
  396. package/lib/data-structures/hash/tree-set.js +0 -2
  397. package/lib/data-structures/heap/index.js +0 -3
  398. package/lib/data-structures/index.js +0 -11
  399. package/lib/data-structures/linked-list/index.js +0 -3
  400. package/lib/data-structures/matrix/index.js +0 -4
  401. package/lib/data-structures/priority-queue/index.js +0 -3
  402. package/lib/data-structures/priority-queue/priority-queue.js +0 -13
  403. package/lib/data-structures/queue/index.js +0 -2
  404. package/lib/data-structures/stack/index.js +0 -1
  405. package/lib/data-structures/tree/index.js +0 -1
  406. package/lib/data-structures/trie/index.js +0 -1
  407. package/lib/index.js +0 -4
  408. package/lib/interfaces/binary-tree.js +0 -1
  409. package/lib/interfaces/doubly-linked-list.js +0 -1
  410. package/lib/interfaces/graph.js +0 -1
  411. package/lib/interfaces/heap.js +0 -1
  412. package/lib/interfaces/index.js +0 -8
  413. package/lib/interfaces/navigator.js +0 -1
  414. package/lib/interfaces/priority-queue.js +0 -1
  415. package/lib/interfaces/segment-tree.js +0 -1
  416. package/lib/interfaces/singly-linked-list.js +0 -1
  417. package/lib/types/data-structures/binary-tree/avl-tree.js +0 -1
  418. package/lib/types/data-structures/binary-tree/binary-indexed-tree.js +0 -1
  419. package/lib/types/data-structures/binary-tree/bst.js +0 -1
  420. package/lib/types/data-structures/binary-tree/index.js +0 -6
  421. package/lib/types/data-structures/binary-tree/rb-tree.js +0 -5
  422. package/lib/types/data-structures/binary-tree/segment-tree.js +0 -1
  423. package/lib/types/data-structures/binary-tree/tree-multiset.js +0 -1
  424. package/lib/types/data-structures/graph/abstract-graph.js +0 -1
  425. package/lib/types/data-structures/graph/directed-graph.js +0 -6
  426. package/lib/types/data-structures/graph/index.js +0 -3
  427. package/lib/types/data-structures/graph/map-graph.js +0 -1
  428. package/lib/types/data-structures/graph/undirected-graph.js +0 -1
  429. package/lib/types/data-structures/hash/coordinate-map.js +0 -1
  430. package/lib/types/data-structures/hash/coordinate-set.js +0 -1
  431. package/lib/types/data-structures/hash/hash-map.js +0 -1
  432. package/lib/types/data-structures/hash/hash-table.js +0 -1
  433. package/lib/types/data-structures/hash/index.js +0 -1
  434. package/lib/types/data-structures/hash/tree-map.js +0 -1
  435. package/lib/types/data-structures/hash/tree-set.js +0 -1
  436. package/lib/types/data-structures/heap/heap.js +0 -1
  437. package/lib/types/data-structures/heap/index.js +0 -1
  438. package/lib/types/data-structures/heap/max-heap.js +0 -1
  439. package/lib/types/data-structures/heap/min-heap.js +0 -1
  440. package/lib/types/data-structures/index.js +0 -11
  441. package/lib/types/data-structures/linked-list/doubly-linked-list.js +0 -1
  442. package/lib/types/data-structures/linked-list/index.js +0 -2
  443. package/lib/types/data-structures/linked-list/singly-linked-list.js +0 -1
  444. package/lib/types/data-structures/linked-list/skip-linked-list.js +0 -1
  445. package/lib/types/data-structures/matrix/index.js +0 -1
  446. package/lib/types/data-structures/matrix/matrix.js +0 -1
  447. package/lib/types/data-structures/matrix/matrix2d.js +0 -1
  448. package/lib/types/data-structures/matrix/navigator.js +0 -1
  449. package/lib/types/data-structures/matrix/vector2d.js +0 -1
  450. package/lib/types/data-structures/priority-queue/index.js +0 -3
  451. package/lib/types/data-structures/priority-queue/max-priority-queue.js +0 -1
  452. package/lib/types/data-structures/priority-queue/min-priority-queue.js +0 -1
  453. package/lib/types/data-structures/priority-queue/priority-queue.js +0 -1
  454. package/lib/types/data-structures/queue/deque.js +0 -1
  455. package/lib/types/data-structures/queue/index.js +0 -2
  456. package/lib/types/data-structures/queue/queue.js +0 -1
  457. package/lib/types/data-structures/stack/index.js +0 -1
  458. package/lib/types/data-structures/stack/stack.js +0 -1
  459. package/lib/types/data-structures/tree/index.js +0 -1
  460. package/lib/types/data-structures/tree/tree.js +0 -1
  461. package/lib/types/data-structures/trie/index.js +0 -1
  462. package/lib/types/data-structures/trie/trie.js +0 -1
  463. package/lib/types/helpers.js +0 -6
  464. package/lib/types/index.js +0 -3
  465. package/lib/types/utils/index.js +0 -2
  466. package/lib/types/utils/utils.js +0 -1
  467. package/lib/types/utils/validate-type.js +0 -1
  468. package/lib/utils/index.js +0 -1
  469. package/lib/utils/utils.js +0 -63
  470. package/dist/{data-structures → cjs/data-structures}/binary-tree/avl-tree.d.ts +9 -9
  471. package/dist/{data-structures → cjs/data-structures}/binary-tree/binary-indexed-tree.d.ts +0 -0
  472. package/dist/{data-structures → cjs/data-structures}/binary-tree/binary-indexed-tree.js +0 -0
  473. package/dist/{data-structures → cjs/data-structures}/binary-tree/binary-tree.d.ts +31 -31
  474. package/dist/{data-structures → cjs/data-structures}/binary-tree/bst.d.ts +0 -0
  475. package/dist/{data-structures → cjs/data-structures}/binary-tree/bst.js +0 -0
  476. package/dist/{data-structures → cjs/data-structures}/binary-tree/index.d.ts +0 -0
  477. package/dist/{data-structures → cjs/data-structures}/binary-tree/index.js +0 -0
  478. package/dist/{data-structures → cjs/data-structures}/binary-tree/rb-tree.d.ts +1 -1
  479. package/dist/{data-structures → cjs/data-structures}/binary-tree/rb-tree.js +0 -0
  480. package/dist/{data-structures → cjs/data-structures}/binary-tree/segment-tree.d.ts +0 -0
  481. package/dist/{data-structures → cjs/data-structures}/binary-tree/segment-tree.js +0 -0
  482. package/dist/{data-structures → cjs/data-structures}/binary-tree/tree-multiset.d.ts +9 -9
  483. package/dist/{data-structures → cjs/data-structures}/graph/abstract-graph.d.ts +0 -0
  484. package/dist/{data-structures → cjs/data-structures}/graph/abstract-graph.js +0 -0
  485. package/dist/{data-structures → cjs/data-structures}/graph/directed-graph.d.ts +0 -0
  486. package/dist/{data-structures → cjs/data-structures}/graph/directed-graph.js +0 -0
  487. package/dist/{data-structures → cjs/data-structures}/graph/index.d.ts +0 -0
  488. package/dist/{data-structures → cjs/data-structures}/graph/index.js +0 -0
  489. package/dist/{data-structures → cjs/data-structures}/graph/map-graph.d.ts +0 -0
  490. package/dist/{data-structures → cjs/data-structures}/graph/map-graph.js +0 -0
  491. package/dist/{data-structures → cjs/data-structures}/graph/undirected-graph.d.ts +0 -0
  492. package/dist/{data-structures → cjs/data-structures}/graph/undirected-graph.js +0 -0
  493. package/dist/{data-structures → cjs/data-structures}/hash/coordinate-map.d.ts +0 -0
  494. package/dist/{data-structures → cjs/data-structures}/hash/coordinate-map.js +0 -0
  495. package/dist/{data-structures → cjs/data-structures}/hash/coordinate-set.d.ts +0 -0
  496. package/dist/{data-structures → cjs/data-structures}/hash/coordinate-set.js +0 -0
  497. package/{lib → dist/cjs}/data-structures/hash/hash-map.d.ts +25 -25
  498. package/{lib → dist/cjs}/data-structures/hash/hash-table.d.ts +34 -34
  499. package/dist/{data-structures → cjs/data-structures}/hash/index.d.ts +0 -0
  500. package/dist/{data-structures → cjs/data-structures}/hash/index.js +0 -0
  501. package/dist/{data-structures → cjs/data-structures}/hash/tree-map.d.ts +0 -0
  502. package/dist/{data-structures → cjs/data-structures}/hash/tree-map.js +0 -0
  503. package/dist/{data-structures → cjs/data-structures}/hash/tree-set.d.ts +0 -0
  504. package/dist/{data-structures → cjs/data-structures}/hash/tree-set.js +0 -0
  505. package/dist/{data-structures → cjs/data-structures}/heap/heap.d.ts +66 -66
  506. package/dist/{data-structures → cjs/data-structures}/heap/index.d.ts +0 -0
  507. package/dist/{data-structures → cjs/data-structures}/heap/index.js +0 -0
  508. package/dist/{data-structures → cjs/data-structures}/heap/max-heap.d.ts +0 -0
  509. package/dist/{data-structures → cjs/data-structures}/heap/max-heap.js +0 -0
  510. package/dist/{data-structures → cjs/data-structures}/heap/min-heap.d.ts +0 -0
  511. package/dist/{data-structures → cjs/data-structures}/heap/min-heap.js +0 -0
  512. package/dist/{data-structures → cjs/data-structures}/index.d.ts +0 -0
  513. package/dist/{data-structures → cjs/data-structures}/index.js +0 -0
  514. package/{lib → dist/cjs}/data-structures/linked-list/doubly-linked-list.d.ts +1 -1
  515. package/dist/{data-structures → cjs/data-structures}/linked-list/index.d.ts +0 -0
  516. package/dist/{data-structures → cjs/data-structures}/linked-list/index.js +0 -0
  517. package/dist/{data-structures → cjs/data-structures}/linked-list/singly-linked-list.d.ts +0 -0
  518. package/dist/{data-structures → cjs/data-structures}/linked-list/singly-linked-list.js +0 -0
  519. package/dist/{data-structures → cjs/data-structures}/linked-list/skip-linked-list.d.ts +17 -17
  520. package/dist/{data-structures → cjs/data-structures}/matrix/index.d.ts +0 -0
  521. package/dist/{data-structures → cjs/data-structures}/matrix/index.js +0 -0
  522. package/dist/{data-structures → cjs/data-structures}/matrix/matrix.d.ts +0 -0
  523. package/dist/{data-structures → cjs/data-structures}/matrix/matrix.js +0 -0
  524. package/{lib → dist/cjs}/data-structures/matrix/matrix2d.d.ts +7 -7
  525. package/dist/{data-structures → cjs/data-structures}/matrix/navigator.d.ts +0 -0
  526. package/dist/{data-structures → cjs/data-structures}/matrix/navigator.js +0 -0
  527. package/dist/{data-structures → cjs/data-structures}/matrix/vector2d.d.ts +0 -0
  528. package/dist/{data-structures → cjs/data-structures}/matrix/vector2d.js +0 -0
  529. package/dist/{data-structures → cjs/data-structures}/priority-queue/index.d.ts +0 -0
  530. package/dist/{data-structures → cjs/data-structures}/priority-queue/index.js +0 -0
  531. package/dist/{data-structures → cjs/data-structures}/priority-queue/max-priority-queue.d.ts +0 -0
  532. package/dist/{data-structures → cjs/data-structures}/priority-queue/max-priority-queue.js +0 -0
  533. package/dist/{data-structures → cjs/data-structures}/priority-queue/min-priority-queue.d.ts +0 -0
  534. package/dist/{data-structures → cjs/data-structures}/priority-queue/min-priority-queue.js +0 -0
  535. package/dist/{data-structures → cjs/data-structures}/priority-queue/priority-queue.d.ts +0 -0
  536. package/dist/{data-structures → cjs/data-structures}/priority-queue/priority-queue.js +0 -0
  537. package/dist/{data-structures → cjs/data-structures}/queue/deque.d.ts +0 -0
  538. package/dist/{data-structures → cjs/data-structures}/queue/deque.js +0 -0
  539. package/dist/{data-structures → cjs/data-structures}/queue/index.d.ts +0 -0
  540. package/dist/{data-structures → cjs/data-structures}/queue/index.js +0 -0
  541. package/dist/{data-structures → cjs/data-structures}/queue/queue.d.ts +0 -0
  542. package/dist/{data-structures → cjs/data-structures}/queue/queue.js +0 -0
  543. package/dist/{data-structures → cjs/data-structures}/stack/index.d.ts +0 -0
  544. package/dist/{data-structures → cjs/data-structures}/stack/index.js +0 -0
  545. package/dist/{data-structures → cjs/data-structures}/stack/stack.d.ts +0 -0
  546. package/dist/{data-structures → cjs/data-structures}/stack/stack.js +0 -0
  547. package/dist/{data-structures → cjs/data-structures}/tree/index.d.ts +0 -0
  548. package/dist/{data-structures → cjs/data-structures}/tree/index.js +0 -0
  549. package/dist/{data-structures → cjs/data-structures}/tree/tree.d.ts +0 -0
  550. package/dist/{data-structures → cjs/data-structures}/tree/tree.js +0 -0
  551. package/dist/{data-structures → cjs/data-structures}/trie/index.d.ts +0 -0
  552. package/dist/{data-structures → cjs/data-structures}/trie/index.js +0 -0
  553. package/{lib → dist/cjs}/data-structures/trie/trie.d.ts +2 -2
  554. package/dist/{index.d.ts → cjs/index.d.ts} +0 -0
  555. package/dist/{index.js → cjs/index.js} +0 -0
  556. package/dist/{interfaces → cjs/interfaces}/binary-tree.d.ts +0 -0
  557. package/dist/{interfaces → cjs/interfaces}/binary-tree.js +0 -0
  558. package/dist/{interfaces → cjs/interfaces}/doubly-linked-list.d.ts +0 -0
  559. package/dist/{interfaces → cjs/interfaces}/doubly-linked-list.js +0 -0
  560. package/dist/{interfaces → cjs/interfaces}/graph.d.ts +0 -0
  561. package/dist/{interfaces → cjs/interfaces}/graph.js +0 -0
  562. package/dist/{interfaces → cjs/interfaces}/heap.d.ts +0 -0
  563. package/dist/{interfaces → cjs/interfaces}/heap.js +0 -0
  564. package/dist/{interfaces → cjs/interfaces}/index.d.ts +0 -0
  565. package/dist/{interfaces → cjs/interfaces}/index.js +0 -0
  566. package/dist/{interfaces → cjs/interfaces}/navigator.d.ts +0 -0
  567. package/dist/{interfaces → cjs/interfaces}/navigator.js +0 -0
  568. package/dist/{interfaces → cjs/interfaces}/priority-queue.d.ts +0 -0
  569. package/dist/{interfaces → cjs/interfaces}/priority-queue.js +0 -0
  570. package/dist/{interfaces → cjs/interfaces}/segment-tree.d.ts +0 -0
  571. package/dist/{interfaces → cjs/interfaces}/segment-tree.js +0 -0
  572. package/dist/{interfaces → cjs/interfaces}/singly-linked-list.d.ts +0 -0
  573. package/dist/{interfaces → cjs/interfaces}/singly-linked-list.js +0 -0
  574. package/dist/{types → cjs/types}/data-structures/binary-tree/avl-tree.d.ts +0 -0
  575. package/dist/{types → cjs/types}/data-structures/binary-tree/avl-tree.js +0 -0
  576. package/dist/{types → cjs/types}/data-structures/binary-tree/binary-indexed-tree.d.ts +0 -0
  577. package/dist/{types → cjs/types}/data-structures/binary-tree/binary-indexed-tree.js +0 -0
  578. package/dist/{types → cjs/types}/data-structures/binary-tree/binary-tree.d.ts +0 -0
  579. package/dist/{types → cjs/types}/data-structures/binary-tree/binary-tree.js +0 -0
  580. package/dist/{types → cjs/types}/data-structures/binary-tree/bst.d.ts +0 -0
  581. package/dist/{types → cjs/types}/data-structures/binary-tree/bst.js +0 -0
  582. package/dist/{types → cjs/types}/data-structures/binary-tree/index.d.ts +0 -0
  583. package/dist/{types → cjs/types}/data-structures/binary-tree/index.js +0 -0
  584. package/dist/{types → cjs/types}/data-structures/binary-tree/rb-tree.d.ts +0 -0
  585. package/dist/{types → cjs/types}/data-structures/binary-tree/rb-tree.js +0 -0
  586. package/dist/{types → cjs/types}/data-structures/binary-tree/segment-tree.d.ts +0 -0
  587. package/dist/{types → cjs/types}/data-structures/binary-tree/segment-tree.js +0 -0
  588. package/dist/{types → cjs/types}/data-structures/binary-tree/tree-multiset.d.ts +0 -0
  589. package/dist/{types → cjs/types}/data-structures/binary-tree/tree-multiset.js +0 -0
  590. package/dist/{types → cjs/types}/data-structures/graph/abstract-graph.d.ts +0 -0
  591. package/dist/{types → cjs/types}/data-structures/graph/abstract-graph.js +0 -0
  592. package/dist/{types → cjs/types}/data-structures/graph/directed-graph.d.ts +0 -0
  593. package/dist/{types → cjs/types}/data-structures/graph/directed-graph.js +0 -0
  594. package/dist/{types → cjs/types}/data-structures/graph/index.d.ts +0 -0
  595. package/dist/{types → cjs/types}/data-structures/graph/index.js +0 -0
  596. package/dist/{types → cjs/types}/data-structures/graph/map-graph.d.ts +0 -0
  597. package/dist/{types → cjs/types}/data-structures/graph/map-graph.js +0 -0
  598. package/dist/{types → cjs/types}/data-structures/graph/undirected-graph.d.ts +0 -0
  599. package/dist/{types → cjs/types}/data-structures/graph/undirected-graph.js +0 -0
  600. package/dist/{types → cjs/types}/data-structures/hash/coordinate-map.d.ts +0 -0
  601. package/dist/{types → cjs/types}/data-structures/hash/coordinate-map.js +0 -0
  602. package/dist/{types → cjs/types}/data-structures/hash/coordinate-set.d.ts +0 -0
  603. package/dist/{types → cjs/types}/data-structures/hash/coordinate-set.js +0 -0
  604. package/dist/{types → cjs/types}/data-structures/hash/hash-map.d.ts +0 -0
  605. package/dist/{types → cjs/types}/data-structures/hash/hash-map.js +0 -0
  606. package/dist/{types → cjs/types}/data-structures/hash/hash-table.d.ts +0 -0
  607. package/dist/{types → cjs/types}/data-structures/hash/hash-table.js +0 -0
  608. package/dist/{types → cjs/types}/data-structures/hash/index.d.ts +0 -0
  609. package/dist/{types → cjs/types}/data-structures/hash/index.js +0 -0
  610. package/dist/{types → cjs/types}/data-structures/hash/tree-map.d.ts +0 -0
  611. package/dist/{types → cjs/types}/data-structures/hash/tree-map.js +0 -0
  612. package/dist/{types → cjs/types}/data-structures/hash/tree-set.d.ts +0 -0
  613. package/dist/{types → cjs/types}/data-structures/hash/tree-set.js +0 -0
  614. package/dist/{types → cjs/types}/data-structures/heap/heap.d.ts +0 -0
  615. package/dist/{types → cjs/types}/data-structures/heap/heap.js +0 -0
  616. package/dist/{types → cjs/types}/data-structures/heap/index.d.ts +0 -0
  617. package/dist/{types → cjs/types}/data-structures/heap/index.js +0 -0
  618. package/dist/{types → cjs/types}/data-structures/heap/max-heap.d.ts +0 -0
  619. package/dist/{types → cjs/types}/data-structures/heap/max-heap.js +0 -0
  620. package/dist/{types → cjs/types}/data-structures/heap/min-heap.d.ts +0 -0
  621. package/dist/{types → cjs/types}/data-structures/heap/min-heap.js +0 -0
  622. package/dist/{types → cjs/types}/data-structures/index.d.ts +0 -0
  623. package/dist/{types → cjs/types}/data-structures/index.js +0 -0
  624. package/dist/{types → cjs/types}/data-structures/linked-list/doubly-linked-list.d.ts +0 -0
  625. package/dist/{types → cjs/types}/data-structures/linked-list/doubly-linked-list.js +0 -0
  626. package/dist/{types → cjs/types}/data-structures/linked-list/index.d.ts +0 -0
  627. package/dist/{types → cjs/types}/data-structures/linked-list/index.js +0 -0
  628. package/dist/{types → cjs/types}/data-structures/linked-list/singly-linked-list.d.ts +0 -0
  629. package/dist/{types → cjs/types}/data-structures/linked-list/singly-linked-list.js +0 -0
  630. package/dist/{types → cjs/types}/data-structures/linked-list/skip-linked-list.d.ts +0 -0
  631. package/dist/{types → cjs/types}/data-structures/linked-list/skip-linked-list.js +0 -0
  632. package/dist/{types → cjs/types}/data-structures/matrix/index.d.ts +0 -0
  633. package/dist/{types → cjs/types}/data-structures/matrix/index.js +0 -0
  634. package/dist/{types → cjs/types}/data-structures/matrix/matrix.d.ts +0 -0
  635. package/dist/{types → cjs/types}/data-structures/matrix/matrix.js +0 -0
  636. package/dist/{types → cjs/types}/data-structures/matrix/matrix2d.d.ts +0 -0
  637. package/dist/{types → cjs/types}/data-structures/matrix/matrix2d.js +0 -0
  638. package/dist/{types → cjs/types}/data-structures/matrix/navigator.d.ts +0 -0
  639. package/dist/{types → cjs/types}/data-structures/matrix/navigator.js +0 -0
  640. package/dist/{types → cjs/types}/data-structures/matrix/vector2d.d.ts +0 -0
  641. package/dist/{types → cjs/types}/data-structures/matrix/vector2d.js +0 -0
  642. package/dist/{types → cjs/types}/data-structures/priority-queue/index.d.ts +0 -0
  643. package/dist/{types → cjs/types}/data-structures/priority-queue/index.js +0 -0
  644. package/dist/{types → cjs/types}/data-structures/priority-queue/max-priority-queue.d.ts +0 -0
  645. package/dist/{types → cjs/types}/data-structures/priority-queue/max-priority-queue.js +0 -0
  646. package/dist/{types → cjs/types}/data-structures/priority-queue/min-priority-queue.d.ts +0 -0
  647. package/dist/{types → cjs/types}/data-structures/priority-queue/min-priority-queue.js +0 -0
  648. package/dist/{types → cjs/types}/data-structures/priority-queue/priority-queue.d.ts +0 -0
  649. package/dist/{types → cjs/types}/data-structures/priority-queue/priority-queue.js +0 -0
  650. package/dist/{types → cjs/types}/data-structures/queue/deque.d.ts +0 -0
  651. package/dist/{types → cjs/types}/data-structures/queue/deque.js +0 -0
  652. package/dist/{types → cjs/types}/data-structures/queue/index.d.ts +0 -0
  653. package/dist/{types → cjs/types}/data-structures/queue/index.js +0 -0
  654. package/dist/{types → cjs/types}/data-structures/queue/queue.d.ts +0 -0
  655. package/dist/{types → cjs/types}/data-structures/queue/queue.js +0 -0
  656. package/dist/{types → cjs/types}/data-structures/stack/index.d.ts +0 -0
  657. package/dist/{types → cjs/types}/data-structures/stack/index.js +0 -0
  658. package/dist/{types → cjs/types}/data-structures/stack/stack.d.ts +0 -0
  659. package/dist/{types → cjs/types}/data-structures/stack/stack.js +0 -0
  660. package/dist/{types → cjs/types}/data-structures/tree/index.d.ts +0 -0
  661. package/dist/{types → cjs/types}/data-structures/tree/index.js +0 -0
  662. package/dist/{types → cjs/types}/data-structures/tree/tree.d.ts +0 -0
  663. package/dist/{types → cjs/types}/data-structures/tree/tree.js +0 -0
  664. package/dist/{types → cjs/types}/data-structures/trie/index.d.ts +0 -0
  665. package/dist/{types → cjs/types}/data-structures/trie/index.js +0 -0
  666. package/dist/{types → cjs/types}/data-structures/trie/trie.d.ts +0 -0
  667. package/dist/{types → cjs/types}/data-structures/trie/trie.js +0 -0
  668. package/dist/{types → cjs/types}/helpers.d.ts +0 -0
  669. package/dist/{types → cjs/types}/helpers.js +0 -0
  670. package/dist/{types → cjs/types}/index.d.ts +0 -0
  671. package/dist/{types → cjs/types}/index.js +0 -0
  672. package/dist/{types → cjs/types}/utils/index.d.ts +0 -0
  673. package/dist/{types → cjs/types}/utils/index.js +0 -0
  674. package/dist/{types → cjs/types}/utils/utils.d.ts +0 -0
  675. package/dist/{types → cjs/types}/utils/utils.js +0 -0
  676. package/dist/{types → cjs/types}/utils/validate-type.d.ts +0 -0
  677. package/dist/{types → cjs/types}/utils/validate-type.js +0 -0
  678. package/dist/{utils → cjs/utils}/index.d.ts +0 -0
  679. package/dist/{utils → cjs/utils}/index.js +0 -0
  680. package/dist/{utils → cjs/utils}/utils.d.ts +0 -0
  681. package/dist/{utils → cjs/utils}/utils.js +0 -0
  682. package/{lib → dist/mjs}/data-structures/binary-tree/avl-tree.d.ts +9 -9
  683. package/{lib → dist/mjs}/data-structures/binary-tree/binary-indexed-tree.d.ts +0 -0
  684. package/{lib → dist/mjs}/data-structures/binary-tree/binary-tree.d.ts +31 -31
  685. package/{lib → dist/mjs}/data-structures/binary-tree/bst.d.ts +0 -0
  686. package/{lib → dist/mjs}/data-structures/binary-tree/index.d.ts +0 -0
  687. package/{lib → dist/mjs}/data-structures/binary-tree/rb-tree.d.ts +1 -1
  688. package/{lib → dist/mjs}/data-structures/binary-tree/segment-tree.d.ts +0 -0
  689. package/{lib → dist/mjs}/data-structures/binary-tree/tree-multiset.d.ts +9 -9
  690. package/{lib → dist/mjs}/data-structures/graph/abstract-graph.d.ts +0 -0
  691. package/{lib → dist/mjs}/data-structures/graph/directed-graph.d.ts +0 -0
  692. package/{lib → dist/mjs}/data-structures/graph/index.d.ts +0 -0
  693. package/{lib → dist/mjs}/data-structures/graph/map-graph.d.ts +0 -0
  694. package/{lib → dist/mjs}/data-structures/graph/undirected-graph.d.ts +0 -0
  695. package/{lib → dist/mjs}/data-structures/hash/coordinate-map.d.ts +0 -0
  696. package/{lib → dist/mjs}/data-structures/hash/coordinate-set.d.ts +0 -0
  697. package/dist/{data-structures → mjs/data-structures}/hash/hash-map.d.ts +25 -25
  698. package/dist/{data-structures → mjs/data-structures}/hash/hash-table.d.ts +34 -34
  699. package/{lib → dist/mjs}/data-structures/hash/index.d.ts +0 -0
  700. package/{lib → dist/mjs}/data-structures/hash/tree-map.d.ts +0 -0
  701. package/{lib → dist/mjs}/data-structures/hash/tree-set.d.ts +0 -0
  702. package/{lib → dist/mjs}/data-structures/heap/heap.d.ts +66 -66
  703. package/{lib → dist/mjs}/data-structures/heap/index.d.ts +0 -0
  704. package/{lib → dist/mjs}/data-structures/heap/max-heap.d.ts +0 -0
  705. package/{lib → dist/mjs}/data-structures/heap/min-heap.d.ts +0 -0
  706. package/{lib → dist/mjs}/data-structures/index.d.ts +0 -0
  707. package/dist/{data-structures → mjs/data-structures}/linked-list/doubly-linked-list.d.ts +1 -1
  708. package/{lib → dist/mjs}/data-structures/linked-list/index.d.ts +0 -0
  709. package/{lib → dist/mjs}/data-structures/linked-list/singly-linked-list.d.ts +0 -0
  710. package/{lib → dist/mjs}/data-structures/linked-list/skip-linked-list.d.ts +17 -17
  711. package/{lib → dist/mjs}/data-structures/matrix/index.d.ts +0 -0
  712. package/{lib → dist/mjs}/data-structures/matrix/matrix.d.ts +0 -0
  713. package/dist/{data-structures → mjs/data-structures}/matrix/matrix2d.d.ts +7 -7
  714. package/{lib → dist/mjs}/data-structures/matrix/navigator.d.ts +0 -0
  715. package/{lib → dist/mjs}/data-structures/matrix/vector2d.d.ts +0 -0
  716. package/{lib → dist/mjs}/data-structures/priority-queue/index.d.ts +0 -0
  717. package/{lib → dist/mjs}/data-structures/priority-queue/max-priority-queue.d.ts +0 -0
  718. package/{lib → dist/mjs}/data-structures/priority-queue/min-priority-queue.d.ts +0 -0
  719. package/{lib → dist/mjs}/data-structures/priority-queue/priority-queue.d.ts +0 -0
  720. package/{lib → dist/mjs}/data-structures/queue/deque.d.ts +0 -0
  721. package/{lib → dist/mjs}/data-structures/queue/index.d.ts +0 -0
  722. package/{lib → dist/mjs}/data-structures/queue/queue.d.ts +0 -0
  723. package/{lib → dist/mjs}/data-structures/stack/index.d.ts +0 -0
  724. package/{lib → dist/mjs}/data-structures/stack/stack.d.ts +0 -0
  725. package/{lib → dist/mjs}/data-structures/tree/index.d.ts +0 -0
  726. package/{lib → dist/mjs}/data-structures/tree/tree.d.ts +0 -0
  727. package/{lib → dist/mjs}/data-structures/trie/index.d.ts +0 -0
  728. package/dist/{data-structures → mjs/data-structures}/trie/trie.d.ts +2 -2
  729. /package/{lib → dist/mjs}/index.d.ts +0 -0
  730. /package/{lib → dist/mjs}/interfaces/binary-tree.d.ts +0 -0
  731. /package/{lib → dist/mjs}/interfaces/doubly-linked-list.d.ts +0 -0
  732. /package/{lib → dist/mjs}/interfaces/graph.d.ts +0 -0
  733. /package/{lib → dist/mjs}/interfaces/heap.d.ts +0 -0
  734. /package/{lib → dist/mjs}/interfaces/index.d.ts +0 -0
  735. /package/{lib → dist/mjs}/interfaces/navigator.d.ts +0 -0
  736. /package/{lib → dist/mjs}/interfaces/priority-queue.d.ts +0 -0
  737. /package/{lib → dist/mjs}/interfaces/segment-tree.d.ts +0 -0
  738. /package/{lib → dist/mjs}/interfaces/singly-linked-list.d.ts +0 -0
  739. /package/{lib → dist/mjs}/types/data-structures/binary-tree/avl-tree.d.ts +0 -0
  740. /package/{lib → dist/mjs}/types/data-structures/binary-tree/binary-indexed-tree.d.ts +0 -0
  741. /package/{lib → dist/mjs}/types/data-structures/binary-tree/binary-tree.d.ts +0 -0
  742. /package/{lib → dist/mjs}/types/data-structures/binary-tree/bst.d.ts +0 -0
  743. /package/{lib → dist/mjs}/types/data-structures/binary-tree/index.d.ts +0 -0
  744. /package/{lib → dist/mjs}/types/data-structures/binary-tree/rb-tree.d.ts +0 -0
  745. /package/{lib → dist/mjs}/types/data-structures/binary-tree/segment-tree.d.ts +0 -0
  746. /package/{lib → dist/mjs}/types/data-structures/binary-tree/tree-multiset.d.ts +0 -0
  747. /package/{lib → dist/mjs}/types/data-structures/graph/abstract-graph.d.ts +0 -0
  748. /package/{lib → dist/mjs}/types/data-structures/graph/directed-graph.d.ts +0 -0
  749. /package/{lib → dist/mjs}/types/data-structures/graph/index.d.ts +0 -0
  750. /package/{lib → dist/mjs}/types/data-structures/graph/map-graph.d.ts +0 -0
  751. /package/{lib → dist/mjs}/types/data-structures/graph/undirected-graph.d.ts +0 -0
  752. /package/{lib → dist/mjs}/types/data-structures/hash/coordinate-map.d.ts +0 -0
  753. /package/{lib → dist/mjs}/types/data-structures/hash/coordinate-set.d.ts +0 -0
  754. /package/{lib → dist/mjs}/types/data-structures/hash/hash-map.d.ts +0 -0
  755. /package/{lib → dist/mjs}/types/data-structures/hash/hash-table.d.ts +0 -0
  756. /package/{lib → dist/mjs}/types/data-structures/hash/index.d.ts +0 -0
  757. /package/{lib → dist/mjs}/types/data-structures/hash/tree-map.d.ts +0 -0
  758. /package/{lib → dist/mjs}/types/data-structures/hash/tree-set.d.ts +0 -0
  759. /package/{lib → dist/mjs}/types/data-structures/heap/heap.d.ts +0 -0
  760. /package/{lib → dist/mjs}/types/data-structures/heap/index.d.ts +0 -0
  761. /package/{lib → dist/mjs}/types/data-structures/heap/max-heap.d.ts +0 -0
  762. /package/{lib → dist/mjs}/types/data-structures/heap/min-heap.d.ts +0 -0
  763. /package/{lib → dist/mjs}/types/data-structures/index.d.ts +0 -0
  764. /package/{lib → dist/mjs}/types/data-structures/linked-list/doubly-linked-list.d.ts +0 -0
  765. /package/{lib → dist/mjs}/types/data-structures/linked-list/index.d.ts +0 -0
  766. /package/{lib → dist/mjs}/types/data-structures/linked-list/singly-linked-list.d.ts +0 -0
  767. /package/{lib → dist/mjs}/types/data-structures/linked-list/skip-linked-list.d.ts +0 -0
  768. /package/{lib → dist/mjs}/types/data-structures/matrix/index.d.ts +0 -0
  769. /package/{lib → dist/mjs}/types/data-structures/matrix/matrix.d.ts +0 -0
  770. /package/{lib → dist/mjs}/types/data-structures/matrix/matrix2d.d.ts +0 -0
  771. /package/{lib → dist/mjs}/types/data-structures/matrix/navigator.d.ts +0 -0
  772. /package/{lib → dist/mjs}/types/data-structures/matrix/vector2d.d.ts +0 -0
  773. /package/{lib → dist/mjs}/types/data-structures/priority-queue/index.d.ts +0 -0
  774. /package/{lib → dist/mjs}/types/data-structures/priority-queue/max-priority-queue.d.ts +0 -0
  775. /package/{lib → dist/mjs}/types/data-structures/priority-queue/min-priority-queue.d.ts +0 -0
  776. /package/{lib → dist/mjs}/types/data-structures/priority-queue/priority-queue.d.ts +0 -0
  777. /package/{lib → dist/mjs}/types/data-structures/queue/deque.d.ts +0 -0
  778. /package/{lib → dist/mjs}/types/data-structures/queue/index.d.ts +0 -0
  779. /package/{lib → dist/mjs}/types/data-structures/queue/queue.d.ts +0 -0
  780. /package/{lib → dist/mjs}/types/data-structures/stack/index.d.ts +0 -0
  781. /package/{lib → dist/mjs}/types/data-structures/stack/stack.d.ts +0 -0
  782. /package/{lib → dist/mjs}/types/data-structures/tree/index.d.ts +0 -0
  783. /package/{lib → dist/mjs}/types/data-structures/tree/tree.d.ts +0 -0
  784. /package/{lib → dist/mjs}/types/data-structures/trie/index.d.ts +0 -0
  785. /package/{lib → dist/mjs}/types/data-structures/trie/trie.d.ts +0 -0
  786. /package/{lib → dist/mjs}/types/helpers.d.ts +0 -0
  787. /package/{lib → dist/mjs}/types/index.d.ts +0 -0
  788. /package/{lib → dist/mjs}/types/utils/index.d.ts +0 -0
  789. /package/{lib → dist/mjs}/types/utils/utils.d.ts +0 -0
  790. /package/{lib → dist/mjs}/types/utils/validate-type.d.ts +0 -0
  791. /package/{lib → dist/mjs}/utils/index.d.ts +0 -0
  792. /package/{lib → dist/mjs}/utils/utils.d.ts +0 -0
@@ -9,42 +9,6 @@ exports.HashMap = void 0;
9
9
  * @license MIT License
10
10
  */
11
11
  class HashMap {
12
- get hashFn() {
13
- return this._hashFn;
14
- }
15
- set hashFn(value) {
16
- this._hashFn = value;
17
- }
18
- get table() {
19
- return this._table;
20
- }
21
- set table(value) {
22
- this._table = value;
23
- }
24
- get capacityMultiplier() {
25
- return this._capacityMultiplier;
26
- }
27
- set capacityMultiplier(value) {
28
- this._capacityMultiplier = value;
29
- }
30
- get loadFactor() {
31
- return this._loadFactor;
32
- }
33
- set loadFactor(value) {
34
- this._loadFactor = value;
35
- }
36
- get initialCapacity() {
37
- return this._initialCapacity;
38
- }
39
- set initialCapacity(value) {
40
- this._initialCapacity = value;
41
- }
42
- get size() {
43
- return this._size;
44
- }
45
- set size(value) {
46
- this._size = value;
47
- }
48
12
  /**
49
13
  * The constructor initializes the properties of a hash table, including the initial capacity, load factor, capacity
50
14
  * multiplier, size, table array, and hash function.
@@ -74,30 +38,41 @@ class HashMap {
74
38
  return hash % this.table.length;
75
39
  });
76
40
  }
77
- _hash(key) {
78
- return this._hashFn(key);
41
+ get initialCapacity() {
42
+ return this._initialCapacity;
79
43
  }
80
- /**
81
- * The `resizeTable` function resizes the table used in a hash map by creating a new table with a specified capacity and
82
- * rehashing the key-value pairs from the old table into the new table.
83
- * @param {number} newCapacity - The newCapacity parameter is the desired capacity for the resized table. It represents
84
- * the number of buckets that the new table should have.
85
- */
86
- resizeTable(newCapacity) {
87
- const newTable = new Array(newCapacity);
88
- for (const bucket of this._table) {
89
- // Note that this is this._table
90
- if (bucket) {
91
- for (const [key, value] of bucket) {
92
- const newIndex = this._hash(key) % newCapacity;
93
- if (!newTable[newIndex]) {
94
- newTable[newIndex] = [];
95
- }
96
- newTable[newIndex].push([key, value]);
97
- }
98
- }
99
- }
100
- this._table = newTable; // Again, here is this._table
44
+ set initialCapacity(value) {
45
+ this._initialCapacity = value;
46
+ }
47
+ get loadFactor() {
48
+ return this._loadFactor;
49
+ }
50
+ set loadFactor(value) {
51
+ this._loadFactor = value;
52
+ }
53
+ get capacityMultiplier() {
54
+ return this._capacityMultiplier;
55
+ }
56
+ set capacityMultiplier(value) {
57
+ this._capacityMultiplier = value;
58
+ }
59
+ get size() {
60
+ return this._size;
61
+ }
62
+ set size(value) {
63
+ this._size = value;
64
+ }
65
+ get table() {
66
+ return this._table;
67
+ }
68
+ set table(value) {
69
+ this._table = value;
70
+ }
71
+ get hashFn() {
72
+ return this._hashFn;
73
+ }
74
+ set hashFn(value) {
75
+ this._hashFn = value;
101
76
  }
102
77
  set(key, value) {
103
78
  const loadFactor = this.size / this.table.length;
@@ -167,6 +142,31 @@ class HashMap {
167
142
  isEmpty() {
168
143
  return this.size === 0;
169
144
  }
145
+ _hash(key) {
146
+ return this._hashFn(key);
147
+ }
148
+ /**
149
+ * The `resizeTable` function resizes the table used in a hash map by creating a new table with a specified capacity and
150
+ * rehashing the key-value pairs from the old table into the new table.
151
+ * @param {number} newCapacity - The newCapacity parameter is the desired capacity for the resized table. It represents
152
+ * the number of buckets that the new table should have.
153
+ */
154
+ resizeTable(newCapacity) {
155
+ const newTable = new Array(newCapacity);
156
+ for (const bucket of this._table) {
157
+ // Note that this is this._table
158
+ if (bucket) {
159
+ for (const [key, value] of bucket) {
160
+ const newIndex = this._hash(key) % newCapacity;
161
+ if (!newTable[newIndex]) {
162
+ newTable[newIndex] = [];
163
+ }
164
+ newTable[newIndex].push([key, value]);
165
+ }
166
+ }
167
+ }
168
+ this._table = newTable; // Again, here is this._table
169
+ }
170
170
  }
171
171
  exports.HashMap = HashMap;
172
172
  //# sourceMappingURL=hash-map.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hash-map.js","sourceRoot":"","sources":["../../../../src/data-structures/hash/hash-map.ts"],"names":[],"mappings":";;;AAEA;;;;;;GAMG;AACH,MAAa,OAAO;IAClB;;;;;;;;;;;OAWG;IACH,YAAY,eAAe,GAAG,EAAE,EAAE,UAAU,GAAG,IAAI,EAAE,MAAwB;QAC3E,IAAI,CAAC,gBAAgB,GAAG,eAAe,CAAC;QACxC,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;QAC9B,IAAI,CAAC,mBAAmB,GAAG,CAAC,CAAC;QAC7B,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;QACf,IAAI,CAAC,MAAM,GAAG,IAAI,KAAK,CAAC,eAAe,CAAC,CAAC;QACzC,IAAI,CAAC,OAAO;YACV,MAAM;gBACN,CAAC,CAAC,GAAM,EAAE,EAAE;oBACV,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;oBAC3B,IAAI,IAAI,GAAG,CAAC,CAAC;oBACb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;wBACtC,IAAI,IAAI,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;qBAC9B;oBACD,OAAO,IAAI,GAAG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,CAAC,CAAC;IACzB,CAAC;IAEO,KAAK,CAAC,GAAM;QAClB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC3B,CAAC;IAED;;;;;OAKG;IACK,WAAW,CAAC,WAAmB;QACrC,MAAM,QAAQ,GAAG,IAAI,KAAK,CAAC,WAAW,CAAC,CAAC;QACxC,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,MAAM,EAAE;YAChC,gCAAgC;YAChC,IAAI,MAAM,EAAE;gBACV,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,EAAE;oBACjC,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,WAAW,CAAC;oBAC/C,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;wBACvB,QAAQ,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC;qBACzB;oBACD,QAAQ,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;iBACvC;aACF;SACF;QACD,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,CAAC,6BAA6B;IACvD,CAAC;CACF;AAvMD,0BAuMC"}
@@ -17,113 +17,32 @@ class HashTableNode {
17
17
  }
18
18
  exports.HashTableNode = HashTableNode;
19
19
  class HashTable {
20
- get hashFn() {
21
- return this._hashFn;
22
- }
23
- set hashFn(value) {
24
- this._hashFn = value;
25
- }
26
- get buckets() {
27
- return this._buckets;
28
- }
29
- set buckets(value) {
30
- this._buckets = value;
31
- }
32
- get capacity() {
33
- return this._capacity;
34
- }
35
- set capacity(value) {
36
- this._capacity = value;
37
- }
38
20
  constructor(capacity = HashTable.DEFAULT_CAPACITY, hashFn) {
39
21
  this._hashFn = hashFn || this._defaultHashFn;
40
22
  this._capacity = Math.max(capacity, HashTable.DEFAULT_CAPACITY);
41
23
  this._size = 0;
42
24
  this._buckets = new Array(this._capacity).fill(null);
43
25
  }
44
- /**
45
- * The function `_defaultHashFn` calculates the hash value of a given key and returns the remainder when divided by the
46
- * capacity of the data structure.
47
- * @param {K} key - The `key` parameter is the input value that needs to be hashed. It can be of any type, but in this
48
- * code snippet, it is checked whether the key is a string or an object. If it is a string, the `_murmurStringHashFn`
49
- * function is used to
50
- * @returns the hash value of the key modulo the capacity of the data structure.
51
- */
52
- _defaultHashFn(key) {
53
- // Can be replaced with other hash functions as needed
54
- const hashValue = typeof key === 'string' ? this._murmurStringHashFn(key) : this._objectHash(key);
55
- return hashValue % this._capacity;
26
+ get capacity() {
27
+ return this._capacity;
56
28
  }
57
- /**
58
- * The `_multiplicativeStringHashFn` function calculates a hash value for a given string key using the multiplicative
59
- * string hash function.
60
- * @param {K} key - The `key` parameter is the input value for which we want to calculate the hash. It can be of any
61
- * type, as it is generic (`K`). The function converts the `key` to a string using the `String()` function.
62
- * @returns a number, which is the result of the multiplicative string hash function applied to the input key.
63
- */
64
- _multiplicativeStringHashFn(key) {
65
- const keyString = String(key);
66
- let hash = 0;
67
- for (let i = 0; i < keyString.length; i++) {
68
- const charCode = keyString.charCodeAt(i);
69
- // Some constants for adjusting the hash function
70
- const A = 0.618033988749895;
71
- const M = 1 << 30; // 2^30
72
- hash = (hash * A + charCode) % M;
73
- }
74
- return Math.abs(hash); // Take absolute value to ensure non-negative numbers
29
+ set capacity(value) {
30
+ this._capacity = value;
75
31
  }
76
- /**
77
- * The function `_murmurStringHashFn` calculates a hash value for a given string key using the MurmurHash algorithm.
78
- * @param {K} key - The `key` parameter is the input value for which you want to calculate the hash. It can be of any
79
- * type, but it will be converted to a string using the `String()` function before calculating the hash.
80
- * @returns a number, which is the hash value calculated for the given key.
81
- */
82
- _murmurStringHashFn(key) {
83
- const keyString = String(key);
84
- const seed = 0;
85
- let hash = seed;
86
- for (let i = 0; i < keyString.length; i++) {
87
- const char = keyString.charCodeAt(i);
88
- hash = (hash ^ char) * 0x5bd1e995;
89
- hash = (hash ^ (hash >>> 15)) * 0x27d4eb2d;
90
- hash = hash ^ (hash >>> 15);
91
- }
92
- return Math.abs(hash);
32
+ get size() {
33
+ return this._size;
93
34
  }
94
- /**
95
- * The _hash function takes a key and returns a number.
96
- * @param {K} key - The parameter "key" is of type K, which represents the type of the key that will be hashed.
97
- * @returns The hash function is returning a number.
98
- */
99
- _hash(key) {
100
- return this.hashFn(key);
35
+ get buckets() {
36
+ return this._buckets;
101
37
  }
102
- /**
103
- * The function calculates a hash value for a given string using the djb2 algorithm.
104
- * @param {string} key - The `key` parameter in the `stringHash` function is a string value that represents the input for
105
- * which we want to calculate the hash value.
106
- * @returns a number, which is the hash value of the input string.
107
- */
108
- _stringHash(key) {
109
- let hash = 0;
110
- for (let i = 0; i < key.length; i++) {
111
- hash = (hash * 31 + key.charCodeAt(i)) & 0xffffffff;
112
- }
113
- return hash;
38
+ set buckets(value) {
39
+ this._buckets = value;
114
40
  }
115
- /**
116
- * The function `_objectHash` takes a key and returns a hash value, using a custom hash function for objects.
117
- * @param {K} key - The parameter "key" is of type "K", which means it can be any type. It could be a string, number,
118
- * boolean, object, or any other type of value. The purpose of the objectHash function is to generate a hash value for
119
- * the key, which can be used for
120
- * @returns a number, which is the hash value of the key.
121
- */
122
- _objectHash(key) {
123
- // If the key is an object, you can write a custom hash function
124
- // For example, convert the object's properties to a string and use string hashing
125
- // This is just an example; you should write a specific object hash function as needed
126
- return this._stringHash(JSON.stringify(key));
41
+ get hashFn() {
42
+ return this._hashFn;
43
+ }
44
+ set hashFn(value) {
45
+ this._hashFn = value;
127
46
  }
128
47
  /**
129
48
  * The set function adds a key-value pair to the hash table, handling collisions and resizing if necessary.
@@ -208,6 +127,90 @@ class HashTable {
208
127
  currentNode = currentNode.next;
209
128
  }
210
129
  }
130
+ /**
131
+ * The function `_defaultHashFn` calculates the hash value of a given key and returns the remainder when divided by the
132
+ * capacity of the data structure.
133
+ * @param {K} key - The `key` parameter is the input value that needs to be hashed. It can be of any type, but in this
134
+ * code snippet, it is checked whether the key is a string or an object. If it is a string, the `_murmurStringHashFn`
135
+ * function is used to
136
+ * @returns the hash value of the key modulo the capacity of the data structure.
137
+ */
138
+ _defaultHashFn(key) {
139
+ // Can be replaced with other hash functions as needed
140
+ const hashValue = typeof key === 'string' ? this._murmurStringHashFn(key) : this._objectHash(key);
141
+ return hashValue % this._capacity;
142
+ }
143
+ /**
144
+ * The `_multiplicativeStringHashFn` function calculates a hash value for a given string key using the multiplicative
145
+ * string hash function.
146
+ * @param {K} key - The `key` parameter is the input value for which we want to calculate the hash. It can be of any
147
+ * type, as it is generic (`K`). The function converts the `key` to a string using the `String()` function.
148
+ * @returns a number, which is the result of the multiplicative string hash function applied to the input key.
149
+ */
150
+ _multiplicativeStringHashFn(key) {
151
+ const keyString = String(key);
152
+ let hash = 0;
153
+ for (let i = 0; i < keyString.length; i++) {
154
+ const charCode = keyString.charCodeAt(i);
155
+ // Some constants for adjusting the hash function
156
+ const A = 0.618033988749895;
157
+ const M = 1 << 30; // 2^30
158
+ hash = (hash * A + charCode) % M;
159
+ }
160
+ return Math.abs(hash); // Take absolute value to ensure non-negative numbers
161
+ }
162
+ /**
163
+ * The function `_murmurStringHashFn` calculates a hash value for a given string key using the MurmurHash algorithm.
164
+ * @param {K} key - The `key` parameter is the input value for which you want to calculate the hash. It can be of any
165
+ * type, but it will be converted to a string using the `String()` function before calculating the hash.
166
+ * @returns a number, which is the hash value calculated for the given key.
167
+ */
168
+ _murmurStringHashFn(key) {
169
+ const keyString = String(key);
170
+ const seed = 0;
171
+ let hash = seed;
172
+ for (let i = 0; i < keyString.length; i++) {
173
+ const char = keyString.charCodeAt(i);
174
+ hash = (hash ^ char) * 0x5bd1e995;
175
+ hash = (hash ^ (hash >>> 15)) * 0x27d4eb2d;
176
+ hash = hash ^ (hash >>> 15);
177
+ }
178
+ return Math.abs(hash);
179
+ }
180
+ /**
181
+ * The _hash function takes a key and returns a number.
182
+ * @param {K} key - The parameter "key" is of type K, which represents the type of the key that will be hashed.
183
+ * @returns The hash function is returning a number.
184
+ */
185
+ _hash(key) {
186
+ return this.hashFn(key);
187
+ }
188
+ /**
189
+ * The function calculates a hash value for a given string using the djb2 algorithm.
190
+ * @param {string} key - The `key` parameter in the `stringHash` function is a string value that represents the input for
191
+ * which we want to calculate the hash value.
192
+ * @returns a number, which is the hash value of the input string.
193
+ */
194
+ _stringHash(key) {
195
+ let hash = 0;
196
+ for (let i = 0; i < key.length; i++) {
197
+ hash = (hash * 31 + key.charCodeAt(i)) & 0xffffffff;
198
+ }
199
+ return hash;
200
+ }
201
+ /**
202
+ * The function `_objectHash` takes a key and returns a hash value, using a custom hash function for objects.
203
+ * @param {K} key - The parameter "key" is of type "K", which means it can be any type. It could be a string, number,
204
+ * boolean, object, or any other type of value. The purpose of the objectHash function is to generate a hash value for
205
+ * the key, which can be used for
206
+ * @returns a number, which is the hash value of the key.
207
+ */
208
+ _objectHash(key) {
209
+ // If the key is an object, you can write a custom hash function
210
+ // For example, convert the object's properties to a string and use string hashing
211
+ // This is just an example; you should write a specific object hash function as needed
212
+ return this._stringHash(JSON.stringify(key));
213
+ }
211
214
  /**
212
215
  * The `expand` function increases the capacity of a hash table by creating a new array of buckets with double the
213
216
  * capacity and rehashing all the existing key-value pairs into the new buckets.
@@ -236,9 +239,6 @@ class HashTable {
236
239
  this._buckets = newBuckets;
237
240
  this._capacity = newCapacity;
238
241
  }
239
- get size() {
240
- return this._size;
241
- }
242
242
  }
243
243
  exports.HashTable = HashTable;
244
244
  HashTable.DEFAULT_CAPACITY = 16;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hash-table.js","sourceRoot":"","sources":["../../../../src/data-structures/hash/hash-table.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,MAAa,aAAa;IAKxB,YAAY,GAAM,EAAE,GAAM;QACxB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACn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,mDAAiC;AACjC,mDAAiC;AACjC,6CAA2B;AAC3B,6CAA2B;AAC3B,6CAA2B"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tree-map.js","sourceRoot":"","sources":["../../../../src/data-structures/hash/tree-map.ts"],"names":[],"mappings":";;;AAAA,MAAa,OAAO;CAAG;AAAvB,0BAAuB"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tree-set.js","sourceRoot":"","sources":["../../../../src/data-structures/hash/tree-set.ts"],"names":[],"mappings":";;;AAAA,MAAa,OAAO;CAAG;AAAvB,0BAAuB"}