data-structure-typed 1.41.5 → 1.41.6

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 (774) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/README.md +15 -535
  3. package/benchmark/report.html +14 -12
  4. package/benchmark/report.json +117 -117
  5. package/dist/cjs/{data-structures → src/data-structures}/binary-tree/avl-tree.d.ts +1 -1
  6. package/dist/cjs/{data-structures → src/data-structures}/binary-tree/avl-tree.js +2 -2
  7. package/dist/cjs/src/data-structures/binary-tree/avl-tree.js.map +1 -0
  8. package/dist/cjs/src/data-structures/binary-tree/binary-indexed-tree.js.map +1 -0
  9. package/dist/cjs/{data-structures → src/data-structures}/binary-tree/binary-tree.d.ts +4 -3
  10. package/dist/cjs/{data-structures → src/data-structures}/binary-tree/binary-tree.js +19 -18
  11. package/dist/cjs/src/data-structures/binary-tree/binary-tree.js.map +1 -0
  12. package/dist/{mjs → cjs/src}/data-structures/binary-tree/bst.d.ts +1 -20
  13. package/dist/cjs/{data-structures → src/data-structures}/binary-tree/bst.js +5 -27
  14. package/dist/cjs/src/data-structures/binary-tree/bst.js.map +1 -0
  15. package/dist/cjs/src/data-structures/binary-tree/index.js.map +1 -0
  16. package/dist/cjs/src/data-structures/binary-tree/rb-tree.js.map +1 -0
  17. package/dist/cjs/src/data-structures/binary-tree/segment-tree.js.map +1 -0
  18. package/dist/{mjs → cjs/src}/data-structures/binary-tree/tree-multiset.d.ts +1 -1
  19. package/dist/cjs/{data-structures → src/data-structures}/binary-tree/tree-multiset.js +2 -2
  20. package/dist/cjs/src/data-structures/binary-tree/tree-multiset.js.map +1 -0
  21. package/dist/cjs/src/data-structures/graph/abstract-graph.js.map +1 -0
  22. package/dist/cjs/src/data-structures/graph/directed-graph.js.map +1 -0
  23. package/dist/cjs/src/data-structures/graph/index.js.map +1 -0
  24. package/dist/cjs/src/data-structures/graph/map-graph.js.map +1 -0
  25. package/dist/cjs/src/data-structures/graph/undirected-graph.js.map +1 -0
  26. package/dist/cjs/src/data-structures/hash/coordinate-map.js.map +1 -0
  27. package/dist/cjs/src/data-structures/hash/coordinate-set.js.map +1 -0
  28. package/dist/cjs/src/data-structures/hash/hash-map.js.map +1 -0
  29. package/dist/cjs/src/data-structures/hash/hash-table.js.map +1 -0
  30. package/dist/cjs/src/data-structures/hash/index.js.map +1 -0
  31. package/dist/cjs/src/data-structures/hash/tree-map.js.map +1 -0
  32. package/dist/cjs/src/data-structures/hash/tree-set.js.map +1 -0
  33. package/dist/cjs/src/data-structures/heap/heap.js.map +1 -0
  34. package/dist/cjs/src/data-structures/heap/index.js.map +1 -0
  35. package/dist/cjs/src/data-structures/heap/max-heap.js.map +1 -0
  36. package/dist/cjs/src/data-structures/heap/min-heap.js.map +1 -0
  37. package/dist/cjs/src/data-structures/index.js.map +1 -0
  38. package/dist/cjs/src/data-structures/linked-list/doubly-linked-list.js.map +1 -0
  39. package/dist/cjs/src/data-structures/linked-list/index.js.map +1 -0
  40. package/dist/cjs/src/data-structures/linked-list/singly-linked-list.js.map +1 -0
  41. package/dist/cjs/src/data-structures/linked-list/skip-linked-list.js.map +1 -0
  42. package/dist/cjs/src/data-structures/matrix/index.js.map +1 -0
  43. package/dist/cjs/src/data-structures/matrix/matrix.js.map +1 -0
  44. package/dist/cjs/src/data-structures/matrix/matrix2d.js.map +1 -0
  45. package/dist/cjs/src/data-structures/matrix/navigator.js.map +1 -0
  46. package/dist/cjs/src/data-structures/matrix/vector2d.js.map +1 -0
  47. package/dist/cjs/src/data-structures/priority-queue/index.js.map +1 -0
  48. package/dist/cjs/src/data-structures/priority-queue/max-priority-queue.js.map +1 -0
  49. package/dist/cjs/src/data-structures/priority-queue/min-priority-queue.js.map +1 -0
  50. package/dist/cjs/src/data-structures/priority-queue/priority-queue.js.map +1 -0
  51. package/dist/cjs/src/data-structures/queue/deque.js.map +1 -0
  52. package/dist/cjs/src/data-structures/queue/index.js.map +1 -0
  53. package/dist/cjs/src/data-structures/queue/queue.js.map +1 -0
  54. package/dist/cjs/src/data-structures/stack/index.js.map +1 -0
  55. package/dist/cjs/src/data-structures/stack/stack.js.map +1 -0
  56. package/dist/cjs/src/data-structures/tree/index.js.map +1 -0
  57. package/dist/cjs/src/data-structures/tree/tree.js.map +1 -0
  58. package/dist/cjs/src/data-structures/trie/index.js.map +1 -0
  59. package/dist/cjs/src/data-structures/trie/trie.js.map +1 -0
  60. package/dist/cjs/src/index.js.map +1 -0
  61. package/dist/cjs/src/interfaces/binary-tree.js.map +1 -0
  62. package/dist/cjs/src/interfaces/doubly-linked-list.js.map +1 -0
  63. package/dist/cjs/{interfaces → src/interfaces}/graph.js.map +1 -1
  64. package/dist/cjs/{interfaces → src/interfaces}/heap.js.map +1 -1
  65. package/dist/cjs/src/interfaces/index.js.map +1 -0
  66. package/dist/cjs/src/interfaces/navigator.js.map +1 -0
  67. package/dist/cjs/src/interfaces/priority-queue.js.map +1 -0
  68. package/dist/cjs/src/interfaces/segment-tree.js.map +1 -0
  69. package/dist/cjs/src/interfaces/singly-linked-list.js.map +1 -0
  70. package/dist/cjs/src/types/data-structures/binary-tree/avl-tree.js.map +1 -0
  71. package/dist/cjs/src/types/data-structures/binary-tree/binary-indexed-tree.js.map +1 -0
  72. package/dist/cjs/src/types/data-structures/binary-tree/binary-tree.js.map +1 -0
  73. package/dist/cjs/src/types/data-structures/binary-tree/bst.js.map +1 -0
  74. package/dist/cjs/src/types/data-structures/binary-tree/index.js.map +1 -0
  75. package/dist/cjs/src/types/data-structures/binary-tree/rb-tree.js.map +1 -0
  76. package/dist/cjs/src/types/data-structures/binary-tree/segment-tree.js.map +1 -0
  77. package/dist/cjs/src/types/data-structures/binary-tree/tree-multiset.js.map +1 -0
  78. package/dist/cjs/src/types/data-structures/graph/abstract-graph.js.map +1 -0
  79. package/dist/cjs/src/types/data-structures/graph/directed-graph.js.map +1 -0
  80. package/dist/cjs/src/types/data-structures/graph/index.js.map +1 -0
  81. package/dist/cjs/src/types/data-structures/graph/map-graph.js.map +1 -0
  82. package/dist/cjs/src/types/data-structures/graph/undirected-graph.js.map +1 -0
  83. package/dist/cjs/src/types/data-structures/hash/coordinate-map.js.map +1 -0
  84. package/dist/cjs/src/types/data-structures/hash/coordinate-set.js.map +1 -0
  85. package/dist/cjs/src/types/data-structures/hash/hash-map.js.map +1 -0
  86. package/dist/cjs/src/types/data-structures/hash/hash-table.js.map +1 -0
  87. package/dist/cjs/src/types/data-structures/hash/index.js.map +1 -0
  88. package/dist/cjs/src/types/data-structures/hash/tree-map.js.map +1 -0
  89. package/dist/cjs/src/types/data-structures/hash/tree-set.js.map +1 -0
  90. package/dist/cjs/src/types/data-structures/heap/heap.js.map +1 -0
  91. package/dist/cjs/src/types/data-structures/heap/index.js.map +1 -0
  92. package/dist/cjs/src/types/data-structures/heap/max-heap.js.map +1 -0
  93. package/dist/cjs/src/types/data-structures/heap/min-heap.js.map +1 -0
  94. package/dist/cjs/src/types/data-structures/index.js.map +1 -0
  95. package/dist/cjs/src/types/data-structures/linked-list/doubly-linked-list.js.map +1 -0
  96. package/dist/cjs/src/types/data-structures/linked-list/index.js.map +1 -0
  97. package/dist/cjs/src/types/data-structures/linked-list/singly-linked-list.js.map +1 -0
  98. package/dist/cjs/src/types/data-structures/linked-list/skip-linked-list.js.map +1 -0
  99. package/dist/cjs/src/types/data-structures/matrix/index.js.map +1 -0
  100. package/dist/cjs/src/types/data-structures/matrix/matrix.js.map +1 -0
  101. package/dist/cjs/src/types/data-structures/matrix/matrix2d.js.map +1 -0
  102. package/dist/cjs/src/types/data-structures/matrix/navigator.js.map +1 -0
  103. package/dist/cjs/src/types/data-structures/matrix/vector2d.js.map +1 -0
  104. package/dist/cjs/src/types/data-structures/priority-queue/index.js.map +1 -0
  105. package/dist/cjs/src/types/data-structures/priority-queue/max-priority-queue.js.map +1 -0
  106. package/dist/cjs/src/types/data-structures/priority-queue/min-priority-queue.js.map +1 -0
  107. package/dist/cjs/src/types/data-structures/priority-queue/priority-queue.js.map +1 -0
  108. package/dist/cjs/src/types/data-structures/queue/deque.js.map +1 -0
  109. package/dist/cjs/src/types/data-structures/queue/index.js.map +1 -0
  110. package/dist/cjs/src/types/data-structures/queue/queue.js.map +1 -0
  111. package/dist/cjs/src/types/data-structures/stack/index.js.map +1 -0
  112. package/dist/cjs/src/types/data-structures/stack/stack.js.map +1 -0
  113. package/dist/cjs/src/types/data-structures/tree/index.js.map +1 -0
  114. package/dist/cjs/src/types/data-structures/tree/tree.js.map +1 -0
  115. package/dist/cjs/src/types/data-structures/trie/index.js.map +1 -0
  116. package/dist/cjs/src/types/data-structures/trie/trie.js.map +1 -0
  117. package/dist/cjs/src/types/helpers.js.map +1 -0
  118. package/dist/cjs/src/types/index.js.map +1 -0
  119. package/dist/cjs/src/types/utils/index.js.map +1 -0
  120. package/dist/cjs/{types → src/types}/utils/utils.js.map +1 -1
  121. package/dist/cjs/src/types/utils/validate-type.js.map +1 -0
  122. package/dist/cjs/src/utils/index.js.map +1 -0
  123. package/dist/cjs/src/utils/utils.js.map +1 -0
  124. package/dist/mjs/{data-structures → src/data-structures}/binary-tree/avl-tree.d.ts +1 -1
  125. package/dist/mjs/{data-structures → src/data-structures}/binary-tree/avl-tree.js +2 -2
  126. package/dist/mjs/{data-structures → src/data-structures}/binary-tree/binary-tree.d.ts +4 -3
  127. package/dist/mjs/{data-structures → src/data-structures}/binary-tree/binary-tree.js +19 -18
  128. package/dist/{cjs → mjs/src}/data-structures/binary-tree/bst.d.ts +1 -20
  129. package/dist/mjs/{data-structures → src/data-structures}/binary-tree/bst.js +5 -26
  130. package/dist/{cjs → mjs/src}/data-structures/binary-tree/tree-multiset.d.ts +1 -1
  131. package/dist/mjs/{data-structures → src/data-structures}/binary-tree/tree-multiset.js +2 -2
  132. package/dist/umd/data-structure-typed.min.js +1 -1
  133. package/dist/umd/data-structure-typed.min.js.map +1 -1
  134. package/package.json +8 -8
  135. package/src/data-structures/binary-tree/avl-tree.ts +2 -2
  136. package/src/data-structures/binary-tree/binary-tree.ts +20 -18
  137. package/src/data-structures/binary-tree/bst.ts +6 -33
  138. package/src/data-structures/binary-tree/tree-multiset.ts +2 -2
  139. package/tsconfig-base.json +20 -24
  140. package/tsconfig-cjs.json +5 -1
  141. package/tsconfig-mjs.json +12 -0
  142. package/dist/cjs/data-structures/binary-tree/avl-tree.js.map +0 -1
  143. package/dist/cjs/data-structures/binary-tree/binary-indexed-tree.js.map +0 -1
  144. package/dist/cjs/data-structures/binary-tree/binary-tree.js.map +0 -1
  145. package/dist/cjs/data-structures/binary-tree/bst.js.map +0 -1
  146. package/dist/cjs/data-structures/binary-tree/index.js.map +0 -1
  147. package/dist/cjs/data-structures/binary-tree/rb-tree.js.map +0 -1
  148. package/dist/cjs/data-structures/binary-tree/segment-tree.js.map +0 -1
  149. package/dist/cjs/data-structures/binary-tree/tree-multiset.js.map +0 -1
  150. package/dist/cjs/data-structures/graph/abstract-graph.js.map +0 -1
  151. package/dist/cjs/data-structures/graph/directed-graph.js.map +0 -1
  152. package/dist/cjs/data-structures/graph/index.js.map +0 -1
  153. package/dist/cjs/data-structures/graph/map-graph.js.map +0 -1
  154. package/dist/cjs/data-structures/graph/undirected-graph.js.map +0 -1
  155. package/dist/cjs/data-structures/hash/coordinate-map.js.map +0 -1
  156. package/dist/cjs/data-structures/hash/coordinate-set.js.map +0 -1
  157. package/dist/cjs/data-structures/hash/hash-map.js.map +0 -1
  158. package/dist/cjs/data-structures/hash/hash-table.js.map +0 -1
  159. package/dist/cjs/data-structures/hash/index.js.map +0 -1
  160. package/dist/cjs/data-structures/hash/tree-map.js.map +0 -1
  161. package/dist/cjs/data-structures/hash/tree-set.js.map +0 -1
  162. package/dist/cjs/data-structures/heap/heap.js.map +0 -1
  163. package/dist/cjs/data-structures/heap/index.js.map +0 -1
  164. package/dist/cjs/data-structures/heap/max-heap.js.map +0 -1
  165. package/dist/cjs/data-structures/heap/min-heap.js.map +0 -1
  166. package/dist/cjs/data-structures/index.js.map +0 -1
  167. package/dist/cjs/data-structures/linked-list/doubly-linked-list.js.map +0 -1
  168. package/dist/cjs/data-structures/linked-list/index.js.map +0 -1
  169. package/dist/cjs/data-structures/linked-list/singly-linked-list.js.map +0 -1
  170. package/dist/cjs/data-structures/linked-list/skip-linked-list.js.map +0 -1
  171. package/dist/cjs/data-structures/matrix/index.js.map +0 -1
  172. package/dist/cjs/data-structures/matrix/matrix.js.map +0 -1
  173. package/dist/cjs/data-structures/matrix/matrix2d.js.map +0 -1
  174. package/dist/cjs/data-structures/matrix/navigator.js.map +0 -1
  175. package/dist/cjs/data-structures/matrix/vector2d.js.map +0 -1
  176. package/dist/cjs/data-structures/priority-queue/index.js.map +0 -1
  177. package/dist/cjs/data-structures/priority-queue/max-priority-queue.js.map +0 -1
  178. package/dist/cjs/data-structures/priority-queue/min-priority-queue.js.map +0 -1
  179. package/dist/cjs/data-structures/priority-queue/priority-queue.js.map +0 -1
  180. package/dist/cjs/data-structures/queue/deque.js.map +0 -1
  181. package/dist/cjs/data-structures/queue/index.js.map +0 -1
  182. package/dist/cjs/data-structures/queue/queue.js.map +0 -1
  183. package/dist/cjs/data-structures/stack/index.js.map +0 -1
  184. package/dist/cjs/data-structures/stack/stack.js.map +0 -1
  185. package/dist/cjs/data-structures/tree/index.js.map +0 -1
  186. package/dist/cjs/data-structures/tree/tree.js.map +0 -1
  187. package/dist/cjs/data-structures/trie/index.js.map +0 -1
  188. package/dist/cjs/data-structures/trie/trie.js.map +0 -1
  189. package/dist/cjs/index.js.map +0 -1
  190. package/dist/cjs/interfaces/binary-tree.js.map +0 -1
  191. package/dist/cjs/interfaces/doubly-linked-list.js.map +0 -1
  192. package/dist/cjs/interfaces/index.js.map +0 -1
  193. package/dist/cjs/interfaces/navigator.js.map +0 -1
  194. package/dist/cjs/interfaces/priority-queue.js.map +0 -1
  195. package/dist/cjs/interfaces/segment-tree.js.map +0 -1
  196. package/dist/cjs/interfaces/singly-linked-list.js.map +0 -1
  197. package/dist/cjs/types/data-structures/binary-tree/avl-tree.js.map +0 -1
  198. package/dist/cjs/types/data-structures/binary-tree/binary-indexed-tree.js.map +0 -1
  199. package/dist/cjs/types/data-structures/binary-tree/binary-tree.js.map +0 -1
  200. package/dist/cjs/types/data-structures/binary-tree/bst.js.map +0 -1
  201. package/dist/cjs/types/data-structures/binary-tree/index.js.map +0 -1
  202. package/dist/cjs/types/data-structures/binary-tree/rb-tree.js.map +0 -1
  203. package/dist/cjs/types/data-structures/binary-tree/segment-tree.js.map +0 -1
  204. package/dist/cjs/types/data-structures/binary-tree/tree-multiset.js.map +0 -1
  205. package/dist/cjs/types/data-structures/graph/abstract-graph.js.map +0 -1
  206. package/dist/cjs/types/data-structures/graph/directed-graph.js.map +0 -1
  207. package/dist/cjs/types/data-structures/graph/index.js.map +0 -1
  208. package/dist/cjs/types/data-structures/graph/map-graph.js.map +0 -1
  209. package/dist/cjs/types/data-structures/graph/undirected-graph.js.map +0 -1
  210. package/dist/cjs/types/data-structures/hash/coordinate-map.js.map +0 -1
  211. package/dist/cjs/types/data-structures/hash/coordinate-set.js.map +0 -1
  212. package/dist/cjs/types/data-structures/hash/hash-map.js.map +0 -1
  213. package/dist/cjs/types/data-structures/hash/hash-table.js.map +0 -1
  214. package/dist/cjs/types/data-structures/hash/index.js.map +0 -1
  215. package/dist/cjs/types/data-structures/hash/tree-map.js.map +0 -1
  216. package/dist/cjs/types/data-structures/hash/tree-set.js.map +0 -1
  217. package/dist/cjs/types/data-structures/heap/heap.js.map +0 -1
  218. package/dist/cjs/types/data-structures/heap/index.js.map +0 -1
  219. package/dist/cjs/types/data-structures/heap/max-heap.js.map +0 -1
  220. package/dist/cjs/types/data-structures/heap/min-heap.js.map +0 -1
  221. package/dist/cjs/types/data-structures/index.js.map +0 -1
  222. package/dist/cjs/types/data-structures/linked-list/doubly-linked-list.js.map +0 -1
  223. package/dist/cjs/types/data-structures/linked-list/index.js.map +0 -1
  224. package/dist/cjs/types/data-structures/linked-list/singly-linked-list.js.map +0 -1
  225. package/dist/cjs/types/data-structures/linked-list/skip-linked-list.js.map +0 -1
  226. package/dist/cjs/types/data-structures/matrix/index.js.map +0 -1
  227. package/dist/cjs/types/data-structures/matrix/matrix.js.map +0 -1
  228. package/dist/cjs/types/data-structures/matrix/matrix2d.js.map +0 -1
  229. package/dist/cjs/types/data-structures/matrix/navigator.js.map +0 -1
  230. package/dist/cjs/types/data-structures/matrix/vector2d.js.map +0 -1
  231. package/dist/cjs/types/data-structures/priority-queue/index.js.map +0 -1
  232. package/dist/cjs/types/data-structures/priority-queue/max-priority-queue.js.map +0 -1
  233. package/dist/cjs/types/data-structures/priority-queue/min-priority-queue.js.map +0 -1
  234. package/dist/cjs/types/data-structures/priority-queue/priority-queue.js.map +0 -1
  235. package/dist/cjs/types/data-structures/queue/deque.js.map +0 -1
  236. package/dist/cjs/types/data-structures/queue/index.js.map +0 -1
  237. package/dist/cjs/types/data-structures/queue/queue.js.map +0 -1
  238. package/dist/cjs/types/data-structures/stack/index.js.map +0 -1
  239. package/dist/cjs/types/data-structures/stack/stack.js.map +0 -1
  240. package/dist/cjs/types/data-structures/tree/index.js.map +0 -1
  241. package/dist/cjs/types/data-structures/tree/tree.js.map +0 -1
  242. package/dist/cjs/types/data-structures/trie/index.js.map +0 -1
  243. package/dist/cjs/types/data-structures/trie/trie.js.map +0 -1
  244. package/dist/cjs/types/helpers.js.map +0 -1
  245. package/dist/cjs/types/index.js.map +0 -1
  246. package/dist/cjs/types/utils/index.js.map +0 -1
  247. package/dist/cjs/types/utils/validate-type.js.map +0 -1
  248. package/dist/cjs/utils/index.js.map +0 -1
  249. package/dist/cjs/utils/utils.js.map +0 -1
  250. package/test/config.ts +0 -1
  251. package/test/integration/avl-tree.test.ts +0 -110
  252. package/test/integration/bst.test.ts +0 -385
  253. package/test/integration/heap.test.js +0 -16
  254. package/test/integration/index.html +0 -51
  255. package/test/performance/data-structures/binary-tree/avl-tree.test.ts +0 -36
  256. package/test/performance/data-structures/binary-tree/binary-index-tree.test.ts +0 -0
  257. package/test/performance/data-structures/binary-tree/binary-tree.test.ts +0 -45
  258. package/test/performance/data-structures/binary-tree/bst.test.ts +0 -36
  259. package/test/performance/data-structures/binary-tree/overall.test.ts +0 -0
  260. package/test/performance/data-structures/binary-tree/rb-tree.test.ts +0 -0
  261. package/test/performance/data-structures/binary-tree/segment-tree.test.ts +0 -0
  262. package/test/performance/data-structures/binary-tree/tree-multiset.test.ts +0 -0
  263. package/test/performance/data-structures/graph/abstract-graph.test.ts +0 -0
  264. package/test/performance/data-structures/graph/directed-graph.test.ts +0 -49
  265. package/test/performance/data-structures/graph/map-graph.test.ts +0 -0
  266. package/test/performance/data-structures/graph/overall.test.ts +0 -0
  267. package/test/performance/data-structures/graph/undirected-graph.test.ts +0 -0
  268. package/test/performance/data-structures/hash/coordinate-map.test.ts +0 -0
  269. package/test/performance/data-structures/hash/coordinate-set.test.ts +0 -0
  270. package/test/performance/data-structures/hash/hash-map.test.ts +0 -0
  271. package/test/performance/data-structures/hash/hash-table.test.ts +0 -0
  272. package/test/performance/data-structures/heap/heap.test.ts +0 -30
  273. package/test/performance/data-structures/heap/max-heap.test.ts +0 -0
  274. package/test/performance/data-structures/heap/min-heap.test.ts +0 -0
  275. package/test/performance/data-structures/linked-list/doubly-linked-list.test.ts +0 -40
  276. package/test/performance/data-structures/linked-list/linked-list.test.ts +0 -0
  277. package/test/performance/data-structures/linked-list/singly-linked-list.test.ts +0 -34
  278. package/test/performance/data-structures/linked-list/skip-linked-list.test.ts +0 -0
  279. package/test/performance/data-structures/linked-list/skip-list.test.ts +0 -0
  280. package/test/performance/data-structures/matrix/matrix.test.ts +0 -0
  281. package/test/performance/data-structures/matrix/matrix2d.test.ts +0 -0
  282. package/test/performance/data-structures/matrix/navigator.test.ts +0 -0
  283. package/test/performance/data-structures/matrix/vector2d.test.ts +0 -0
  284. package/test/performance/data-structures/priority-queue/max-priority-queue.test.ts +0 -19
  285. package/test/performance/data-structures/priority-queue/min-priority-queue.test.ts +0 -0
  286. package/test/performance/data-structures/priority-queue/priority-queue.test.ts +0 -0
  287. package/test/performance/data-structures/queue/deque.test.ts +0 -21
  288. package/test/performance/data-structures/queue/queue.test.ts +0 -25
  289. package/test/performance/data-structures/stack/stack.test.ts +0 -0
  290. package/test/performance/data-structures/tree/tree.test.ts +0 -0
  291. package/test/performance/data-structures/trie/trie.test.ts +0 -22
  292. package/test/performance/reportor.ts +0 -183
  293. package/test/performance/types/index.ts +0 -1
  294. package/test/performance/types/reportor.ts +0 -3
  295. package/test/types/index.ts +0 -1
  296. package/test/types/utils/big-o.ts +0 -1
  297. package/test/types/utils/index.ts +0 -2
  298. package/test/types/utils/json2html.ts +0 -1
  299. package/test/unit/data-structures/binary-tree/avl-tree.test.ts +0 -269
  300. package/test/unit/data-structures/binary-tree/binary-index-tree.test.ts +0 -320
  301. package/test/unit/data-structures/binary-tree/binary-tree.test.ts +0 -486
  302. package/test/unit/data-structures/binary-tree/bst.test.ts +0 -840
  303. package/test/unit/data-structures/binary-tree/overall.test.ts +0 -66
  304. package/test/unit/data-structures/binary-tree/rb-tree.test.ts +0 -435
  305. package/test/unit/data-structures/binary-tree/segment-tree.test.ts +0 -50
  306. package/test/unit/data-structures/binary-tree/tree-multiset.test.ts +0 -542
  307. package/test/unit/data-structures/graph/abstract-graph.test.ts +0 -100
  308. package/test/unit/data-structures/graph/directed-graph.test.ts +0 -564
  309. package/test/unit/data-structures/graph/map-graph.test.ts +0 -126
  310. package/test/unit/data-structures/graph/overall.test.ts +0 -49
  311. package/test/unit/data-structures/graph/undirected-graph.test.ts +0 -149
  312. package/test/unit/data-structures/hash/coordinate-map.test.ts +0 -74
  313. package/test/unit/data-structures/hash/coordinate-set.test.ts +0 -66
  314. package/test/unit/data-structures/hash/hash-map.test.ts +0 -103
  315. package/test/unit/data-structures/hash/hash-table.test.ts +0 -186
  316. package/test/unit/data-structures/heap/heap.test.ts +0 -254
  317. package/test/unit/data-structures/heap/max-heap.test.ts +0 -52
  318. package/test/unit/data-structures/heap/min-heap.test.ts +0 -52
  319. package/test/unit/data-structures/linked-list/doubly-linked-list.test.ts +0 -400
  320. package/test/unit/data-structures/linked-list/linked-list.test.ts +0 -8
  321. package/test/unit/data-structures/linked-list/singly-linked-list.test.ts +0 -474
  322. package/test/unit/data-structures/linked-list/skip-linked-list.test.ts +0 -13
  323. package/test/unit/data-structures/linked-list/skip-list.test.ts +0 -86
  324. package/test/unit/data-structures/matrix/matrix.test.ts +0 -54
  325. package/test/unit/data-structures/matrix/matrix2d.test.ts +0 -345
  326. package/test/unit/data-structures/matrix/navigator.test.ts +0 -244
  327. package/test/unit/data-structures/matrix/vector2d.test.ts +0 -171
  328. package/test/unit/data-structures/priority-queue/max-priority-queue.test.ts +0 -73
  329. package/test/unit/data-structures/priority-queue/min-priority-queue.test.ts +0 -63
  330. package/test/unit/data-structures/priority-queue/priority-queue.test.ts +0 -53
  331. package/test/unit/data-structures/queue/deque.test.ts +0 -410
  332. package/test/unit/data-structures/queue/queue.test.ts +0 -207
  333. package/test/unit/data-structures/stack/stack.test.ts +0 -67
  334. package/test/unit/data-structures/tree/tree.test.ts +0 -39
  335. package/test/unit/data-structures/trie/trie.test.ts +0 -825
  336. package/test/utils/array.ts +0 -5514
  337. package/test/utils/big-o.ts +0 -207
  338. package/test/utils/console.ts +0 -31
  339. package/test/utils/index.ts +0 -7
  340. package/test/utils/is.ts +0 -56
  341. package/test/utils/json2html.ts +0 -322
  342. package/test/utils/number.ts +0 -13
  343. package/test/utils/string.ts +0 -1
  344. package/umd/bundle.min.js +0 -3
  345. package/umd/bundle.min.js.LICENSE.txt +0 -28
  346. package/umd/bundle.min.js.map +0 -1
  347. /package/dist/cjs/{data-structures → src/data-structures}/binary-tree/binary-indexed-tree.d.ts +0 -0
  348. /package/dist/cjs/{data-structures → src/data-structures}/binary-tree/binary-indexed-tree.js +0 -0
  349. /package/dist/cjs/{data-structures → src/data-structures}/binary-tree/index.d.ts +0 -0
  350. /package/dist/cjs/{data-structures → src/data-structures}/binary-tree/index.js +0 -0
  351. /package/dist/cjs/{data-structures → src/data-structures}/binary-tree/rb-tree.d.ts +0 -0
  352. /package/dist/cjs/{data-structures → src/data-structures}/binary-tree/rb-tree.js +0 -0
  353. /package/dist/cjs/{data-structures → src/data-structures}/binary-tree/segment-tree.d.ts +0 -0
  354. /package/dist/cjs/{data-structures → src/data-structures}/binary-tree/segment-tree.js +0 -0
  355. /package/dist/cjs/{data-structures → src/data-structures}/graph/abstract-graph.d.ts +0 -0
  356. /package/dist/cjs/{data-structures → src/data-structures}/graph/abstract-graph.js +0 -0
  357. /package/dist/cjs/{data-structures → src/data-structures}/graph/directed-graph.d.ts +0 -0
  358. /package/dist/cjs/{data-structures → src/data-structures}/graph/directed-graph.js +0 -0
  359. /package/dist/cjs/{data-structures → src/data-structures}/graph/index.d.ts +0 -0
  360. /package/dist/cjs/{data-structures → src/data-structures}/graph/index.js +0 -0
  361. /package/dist/cjs/{data-structures → src/data-structures}/graph/map-graph.d.ts +0 -0
  362. /package/dist/cjs/{data-structures → src/data-structures}/graph/map-graph.js +0 -0
  363. /package/dist/cjs/{data-structures → src/data-structures}/graph/undirected-graph.d.ts +0 -0
  364. /package/dist/cjs/{data-structures → src/data-structures}/graph/undirected-graph.js +0 -0
  365. /package/dist/cjs/{data-structures → src/data-structures}/hash/coordinate-map.d.ts +0 -0
  366. /package/dist/cjs/{data-structures → src/data-structures}/hash/coordinate-map.js +0 -0
  367. /package/dist/cjs/{data-structures → src/data-structures}/hash/coordinate-set.d.ts +0 -0
  368. /package/dist/cjs/{data-structures → src/data-structures}/hash/coordinate-set.js +0 -0
  369. /package/dist/cjs/{data-structures → src/data-structures}/hash/hash-map.d.ts +0 -0
  370. /package/dist/cjs/{data-structures → src/data-structures}/hash/hash-map.js +0 -0
  371. /package/dist/cjs/{data-structures → src/data-structures}/hash/hash-table.d.ts +0 -0
  372. /package/dist/cjs/{data-structures → src/data-structures}/hash/hash-table.js +0 -0
  373. /package/dist/cjs/{data-structures → src/data-structures}/hash/index.d.ts +0 -0
  374. /package/dist/cjs/{data-structures → src/data-structures}/hash/index.js +0 -0
  375. /package/dist/cjs/{data-structures → src/data-structures}/hash/tree-map.d.ts +0 -0
  376. /package/dist/cjs/{data-structures → src/data-structures}/hash/tree-map.js +0 -0
  377. /package/dist/cjs/{data-structures → src/data-structures}/hash/tree-set.d.ts +0 -0
  378. /package/dist/cjs/{data-structures → src/data-structures}/hash/tree-set.js +0 -0
  379. /package/dist/cjs/{data-structures → src/data-structures}/heap/heap.d.ts +0 -0
  380. /package/dist/cjs/{data-structures → src/data-structures}/heap/heap.js +0 -0
  381. /package/dist/cjs/{data-structures → src/data-structures}/heap/index.d.ts +0 -0
  382. /package/dist/cjs/{data-structures → src/data-structures}/heap/index.js +0 -0
  383. /package/dist/cjs/{data-structures → src/data-structures}/heap/max-heap.d.ts +0 -0
  384. /package/dist/cjs/{data-structures → src/data-structures}/heap/max-heap.js +0 -0
  385. /package/dist/cjs/{data-structures → src/data-structures}/heap/min-heap.d.ts +0 -0
  386. /package/dist/cjs/{data-structures → src/data-structures}/heap/min-heap.js +0 -0
  387. /package/dist/cjs/{data-structures → src/data-structures}/index.d.ts +0 -0
  388. /package/dist/cjs/{data-structures → src/data-structures}/index.js +0 -0
  389. /package/dist/cjs/{data-structures → src/data-structures}/linked-list/doubly-linked-list.d.ts +0 -0
  390. /package/dist/cjs/{data-structures → src/data-structures}/linked-list/doubly-linked-list.js +0 -0
  391. /package/dist/cjs/{data-structures → src/data-structures}/linked-list/index.d.ts +0 -0
  392. /package/dist/cjs/{data-structures → src/data-structures}/linked-list/index.js +0 -0
  393. /package/dist/cjs/{data-structures → src/data-structures}/linked-list/singly-linked-list.d.ts +0 -0
  394. /package/dist/cjs/{data-structures → src/data-structures}/linked-list/singly-linked-list.js +0 -0
  395. /package/dist/cjs/{data-structures → src/data-structures}/linked-list/skip-linked-list.d.ts +0 -0
  396. /package/dist/cjs/{data-structures → src/data-structures}/linked-list/skip-linked-list.js +0 -0
  397. /package/dist/cjs/{data-structures → src/data-structures}/matrix/index.d.ts +0 -0
  398. /package/dist/cjs/{data-structures → src/data-structures}/matrix/index.js +0 -0
  399. /package/dist/cjs/{data-structures → src/data-structures}/matrix/matrix.d.ts +0 -0
  400. /package/dist/cjs/{data-structures → src/data-structures}/matrix/matrix.js +0 -0
  401. /package/dist/cjs/{data-structures → src/data-structures}/matrix/matrix2d.d.ts +0 -0
  402. /package/dist/cjs/{data-structures → src/data-structures}/matrix/matrix2d.js +0 -0
  403. /package/dist/cjs/{data-structures → src/data-structures}/matrix/navigator.d.ts +0 -0
  404. /package/dist/cjs/{data-structures → src/data-structures}/matrix/navigator.js +0 -0
  405. /package/dist/cjs/{data-structures → src/data-structures}/matrix/vector2d.d.ts +0 -0
  406. /package/dist/cjs/{data-structures → src/data-structures}/matrix/vector2d.js +0 -0
  407. /package/dist/cjs/{data-structures → src/data-structures}/priority-queue/index.d.ts +0 -0
  408. /package/dist/cjs/{data-structures → src/data-structures}/priority-queue/index.js +0 -0
  409. /package/dist/cjs/{data-structures → src/data-structures}/priority-queue/max-priority-queue.d.ts +0 -0
  410. /package/dist/cjs/{data-structures → src/data-structures}/priority-queue/max-priority-queue.js +0 -0
  411. /package/dist/cjs/{data-structures → src/data-structures}/priority-queue/min-priority-queue.d.ts +0 -0
  412. /package/dist/cjs/{data-structures → src/data-structures}/priority-queue/min-priority-queue.js +0 -0
  413. /package/dist/cjs/{data-structures → src/data-structures}/priority-queue/priority-queue.d.ts +0 -0
  414. /package/dist/cjs/{data-structures → src/data-structures}/priority-queue/priority-queue.js +0 -0
  415. /package/dist/cjs/{data-structures → src/data-structures}/queue/deque.d.ts +0 -0
  416. /package/dist/cjs/{data-structures → src/data-structures}/queue/deque.js +0 -0
  417. /package/dist/cjs/{data-structures → src/data-structures}/queue/index.d.ts +0 -0
  418. /package/dist/cjs/{data-structures → src/data-structures}/queue/index.js +0 -0
  419. /package/dist/cjs/{data-structures → src/data-structures}/queue/queue.d.ts +0 -0
  420. /package/dist/cjs/{data-structures → src/data-structures}/queue/queue.js +0 -0
  421. /package/dist/cjs/{data-structures → src/data-structures}/stack/index.d.ts +0 -0
  422. /package/dist/cjs/{data-structures → src/data-structures}/stack/index.js +0 -0
  423. /package/dist/cjs/{data-structures → src/data-structures}/stack/stack.d.ts +0 -0
  424. /package/dist/cjs/{data-structures → src/data-structures}/stack/stack.js +0 -0
  425. /package/dist/cjs/{data-structures → src/data-structures}/tree/index.d.ts +0 -0
  426. /package/dist/cjs/{data-structures → src/data-structures}/tree/index.js +0 -0
  427. /package/dist/cjs/{data-structures → src/data-structures}/tree/tree.d.ts +0 -0
  428. /package/dist/cjs/{data-structures → src/data-structures}/tree/tree.js +0 -0
  429. /package/dist/cjs/{data-structures → src/data-structures}/trie/index.d.ts +0 -0
  430. /package/dist/cjs/{data-structures → src/data-structures}/trie/index.js +0 -0
  431. /package/dist/cjs/{data-structures → src/data-structures}/trie/trie.d.ts +0 -0
  432. /package/dist/cjs/{data-structures → src/data-structures}/trie/trie.js +0 -0
  433. /package/dist/cjs/{index.d.ts → src/index.d.ts} +0 -0
  434. /package/dist/cjs/{index.js → src/index.js} +0 -0
  435. /package/dist/cjs/{interfaces → src/interfaces}/binary-tree.d.ts +0 -0
  436. /package/dist/cjs/{interfaces → src/interfaces}/binary-tree.js +0 -0
  437. /package/dist/cjs/{interfaces → src/interfaces}/doubly-linked-list.d.ts +0 -0
  438. /package/dist/cjs/{interfaces → src/interfaces}/doubly-linked-list.js +0 -0
  439. /package/dist/cjs/{interfaces → src/interfaces}/graph.d.ts +0 -0
  440. /package/dist/cjs/{interfaces → src/interfaces}/graph.js +0 -0
  441. /package/dist/cjs/{interfaces → src/interfaces}/heap.d.ts +0 -0
  442. /package/dist/cjs/{interfaces → src/interfaces}/heap.js +0 -0
  443. /package/dist/cjs/{interfaces → src/interfaces}/index.d.ts +0 -0
  444. /package/dist/cjs/{interfaces → src/interfaces}/index.js +0 -0
  445. /package/dist/cjs/{interfaces → src/interfaces}/navigator.d.ts +0 -0
  446. /package/dist/cjs/{interfaces → src/interfaces}/navigator.js +0 -0
  447. /package/dist/cjs/{interfaces → src/interfaces}/priority-queue.d.ts +0 -0
  448. /package/dist/cjs/{interfaces → src/interfaces}/priority-queue.js +0 -0
  449. /package/dist/cjs/{interfaces → src/interfaces}/segment-tree.d.ts +0 -0
  450. /package/dist/cjs/{interfaces → src/interfaces}/segment-tree.js +0 -0
  451. /package/dist/cjs/{interfaces → src/interfaces}/singly-linked-list.d.ts +0 -0
  452. /package/dist/cjs/{interfaces → src/interfaces}/singly-linked-list.js +0 -0
  453. /package/dist/cjs/{types → src/types}/data-structures/binary-tree/avl-tree.d.ts +0 -0
  454. /package/dist/cjs/{types → src/types}/data-structures/binary-tree/avl-tree.js +0 -0
  455. /package/dist/cjs/{types → src/types}/data-structures/binary-tree/binary-indexed-tree.d.ts +0 -0
  456. /package/dist/cjs/{types → src/types}/data-structures/binary-tree/binary-indexed-tree.js +0 -0
  457. /package/dist/cjs/{types → src/types}/data-structures/binary-tree/binary-tree.d.ts +0 -0
  458. /package/dist/cjs/{types → src/types}/data-structures/binary-tree/binary-tree.js +0 -0
  459. /package/dist/cjs/{types → src/types}/data-structures/binary-tree/bst.d.ts +0 -0
  460. /package/dist/cjs/{types → src/types}/data-structures/binary-tree/bst.js +0 -0
  461. /package/dist/cjs/{types → src/types}/data-structures/binary-tree/index.d.ts +0 -0
  462. /package/dist/cjs/{types → src/types}/data-structures/binary-tree/index.js +0 -0
  463. /package/dist/cjs/{types → src/types}/data-structures/binary-tree/rb-tree.d.ts +0 -0
  464. /package/dist/cjs/{types → src/types}/data-structures/binary-tree/rb-tree.js +0 -0
  465. /package/dist/cjs/{types → src/types}/data-structures/binary-tree/segment-tree.d.ts +0 -0
  466. /package/dist/cjs/{types → src/types}/data-structures/binary-tree/segment-tree.js +0 -0
  467. /package/dist/cjs/{types → src/types}/data-structures/binary-tree/tree-multiset.d.ts +0 -0
  468. /package/dist/cjs/{types → src/types}/data-structures/binary-tree/tree-multiset.js +0 -0
  469. /package/dist/cjs/{types → src/types}/data-structures/graph/abstract-graph.d.ts +0 -0
  470. /package/dist/cjs/{types → src/types}/data-structures/graph/abstract-graph.js +0 -0
  471. /package/dist/cjs/{types → src/types}/data-structures/graph/directed-graph.d.ts +0 -0
  472. /package/dist/cjs/{types → src/types}/data-structures/graph/directed-graph.js +0 -0
  473. /package/dist/cjs/{types → src/types}/data-structures/graph/index.d.ts +0 -0
  474. /package/dist/cjs/{types → src/types}/data-structures/graph/index.js +0 -0
  475. /package/dist/cjs/{types → src/types}/data-structures/graph/map-graph.d.ts +0 -0
  476. /package/dist/cjs/{types → src/types}/data-structures/graph/map-graph.js +0 -0
  477. /package/dist/cjs/{types → src/types}/data-structures/graph/undirected-graph.d.ts +0 -0
  478. /package/dist/cjs/{types → src/types}/data-structures/graph/undirected-graph.js +0 -0
  479. /package/dist/cjs/{types → src/types}/data-structures/hash/coordinate-map.d.ts +0 -0
  480. /package/dist/cjs/{types → src/types}/data-structures/hash/coordinate-map.js +0 -0
  481. /package/dist/cjs/{types → src/types}/data-structures/hash/coordinate-set.d.ts +0 -0
  482. /package/dist/cjs/{types → src/types}/data-structures/hash/coordinate-set.js +0 -0
  483. /package/dist/cjs/{types → src/types}/data-structures/hash/hash-map.d.ts +0 -0
  484. /package/dist/cjs/{types → src/types}/data-structures/hash/hash-map.js +0 -0
  485. /package/dist/cjs/{types → src/types}/data-structures/hash/hash-table.d.ts +0 -0
  486. /package/dist/cjs/{types → src/types}/data-structures/hash/hash-table.js +0 -0
  487. /package/dist/cjs/{types → src/types}/data-structures/hash/index.d.ts +0 -0
  488. /package/dist/cjs/{types → src/types}/data-structures/hash/index.js +0 -0
  489. /package/dist/cjs/{types → src/types}/data-structures/hash/tree-map.d.ts +0 -0
  490. /package/dist/cjs/{types → src/types}/data-structures/hash/tree-map.js +0 -0
  491. /package/dist/cjs/{types → src/types}/data-structures/hash/tree-set.d.ts +0 -0
  492. /package/dist/cjs/{types → src/types}/data-structures/hash/tree-set.js +0 -0
  493. /package/dist/cjs/{types → src/types}/data-structures/heap/heap.d.ts +0 -0
  494. /package/dist/cjs/{types → src/types}/data-structures/heap/heap.js +0 -0
  495. /package/dist/cjs/{types → src/types}/data-structures/heap/index.d.ts +0 -0
  496. /package/dist/cjs/{types → src/types}/data-structures/heap/index.js +0 -0
  497. /package/dist/cjs/{types → src/types}/data-structures/heap/max-heap.d.ts +0 -0
  498. /package/dist/cjs/{types → src/types}/data-structures/heap/max-heap.js +0 -0
  499. /package/dist/cjs/{types → src/types}/data-structures/heap/min-heap.d.ts +0 -0
  500. /package/dist/cjs/{types → src/types}/data-structures/heap/min-heap.js +0 -0
  501. /package/dist/cjs/{types → src/types}/data-structures/index.d.ts +0 -0
  502. /package/dist/cjs/{types → src/types}/data-structures/index.js +0 -0
  503. /package/dist/cjs/{types → src/types}/data-structures/linked-list/doubly-linked-list.d.ts +0 -0
  504. /package/dist/cjs/{types → src/types}/data-structures/linked-list/doubly-linked-list.js +0 -0
  505. /package/dist/cjs/{types → src/types}/data-structures/linked-list/index.d.ts +0 -0
  506. /package/dist/cjs/{types → src/types}/data-structures/linked-list/index.js +0 -0
  507. /package/dist/cjs/{types → src/types}/data-structures/linked-list/singly-linked-list.d.ts +0 -0
  508. /package/dist/cjs/{types → src/types}/data-structures/linked-list/singly-linked-list.js +0 -0
  509. /package/dist/cjs/{types → src/types}/data-structures/linked-list/skip-linked-list.d.ts +0 -0
  510. /package/dist/cjs/{types → src/types}/data-structures/linked-list/skip-linked-list.js +0 -0
  511. /package/dist/cjs/{types → src/types}/data-structures/matrix/index.d.ts +0 -0
  512. /package/dist/cjs/{types → src/types}/data-structures/matrix/index.js +0 -0
  513. /package/dist/cjs/{types → src/types}/data-structures/matrix/matrix.d.ts +0 -0
  514. /package/dist/cjs/{types → src/types}/data-structures/matrix/matrix.js +0 -0
  515. /package/dist/cjs/{types → src/types}/data-structures/matrix/matrix2d.d.ts +0 -0
  516. /package/dist/cjs/{types → src/types}/data-structures/matrix/matrix2d.js +0 -0
  517. /package/dist/cjs/{types → src/types}/data-structures/matrix/navigator.d.ts +0 -0
  518. /package/dist/cjs/{types → src/types}/data-structures/matrix/navigator.js +0 -0
  519. /package/dist/cjs/{types → src/types}/data-structures/matrix/vector2d.d.ts +0 -0
  520. /package/dist/cjs/{types → src/types}/data-structures/matrix/vector2d.js +0 -0
  521. /package/dist/cjs/{types → src/types}/data-structures/priority-queue/index.d.ts +0 -0
  522. /package/dist/cjs/{types → src/types}/data-structures/priority-queue/index.js +0 -0
  523. /package/dist/cjs/{types → src/types}/data-structures/priority-queue/max-priority-queue.d.ts +0 -0
  524. /package/dist/cjs/{types → src/types}/data-structures/priority-queue/max-priority-queue.js +0 -0
  525. /package/dist/cjs/{types → src/types}/data-structures/priority-queue/min-priority-queue.d.ts +0 -0
  526. /package/dist/cjs/{types → src/types}/data-structures/priority-queue/min-priority-queue.js +0 -0
  527. /package/dist/cjs/{types → src/types}/data-structures/priority-queue/priority-queue.d.ts +0 -0
  528. /package/dist/cjs/{types → src/types}/data-structures/priority-queue/priority-queue.js +0 -0
  529. /package/dist/cjs/{types → src/types}/data-structures/queue/deque.d.ts +0 -0
  530. /package/dist/cjs/{types → src/types}/data-structures/queue/deque.js +0 -0
  531. /package/dist/cjs/{types → src/types}/data-structures/queue/index.d.ts +0 -0
  532. /package/dist/cjs/{types → src/types}/data-structures/queue/index.js +0 -0
  533. /package/dist/cjs/{types → src/types}/data-structures/queue/queue.d.ts +0 -0
  534. /package/dist/cjs/{types → src/types}/data-structures/queue/queue.js +0 -0
  535. /package/dist/cjs/{types → src/types}/data-structures/stack/index.d.ts +0 -0
  536. /package/dist/cjs/{types → src/types}/data-structures/stack/index.js +0 -0
  537. /package/dist/cjs/{types → src/types}/data-structures/stack/stack.d.ts +0 -0
  538. /package/dist/cjs/{types → src/types}/data-structures/stack/stack.js +0 -0
  539. /package/dist/cjs/{types → src/types}/data-structures/tree/index.d.ts +0 -0
  540. /package/dist/cjs/{types → src/types}/data-structures/tree/index.js +0 -0
  541. /package/dist/cjs/{types → src/types}/data-structures/tree/tree.d.ts +0 -0
  542. /package/dist/cjs/{types → src/types}/data-structures/tree/tree.js +0 -0
  543. /package/dist/cjs/{types → src/types}/data-structures/trie/index.d.ts +0 -0
  544. /package/dist/cjs/{types → src/types}/data-structures/trie/index.js +0 -0
  545. /package/dist/cjs/{types → src/types}/data-structures/trie/trie.d.ts +0 -0
  546. /package/dist/cjs/{types → src/types}/data-structures/trie/trie.js +0 -0
  547. /package/dist/cjs/{types → src/types}/helpers.d.ts +0 -0
  548. /package/dist/cjs/{types → src/types}/helpers.js +0 -0
  549. /package/dist/cjs/{types → src/types}/index.d.ts +0 -0
  550. /package/dist/cjs/{types → src/types}/index.js +0 -0
  551. /package/dist/cjs/{types → src/types}/utils/index.d.ts +0 -0
  552. /package/dist/cjs/{types → src/types}/utils/index.js +0 -0
  553. /package/dist/cjs/{types → src/types}/utils/utils.d.ts +0 -0
  554. /package/dist/cjs/{types → src/types}/utils/utils.js +0 -0
  555. /package/dist/cjs/{types → src/types}/utils/validate-type.d.ts +0 -0
  556. /package/dist/cjs/{types → src/types}/utils/validate-type.js +0 -0
  557. /package/dist/cjs/{utils → src/utils}/index.d.ts +0 -0
  558. /package/dist/cjs/{utils → src/utils}/index.js +0 -0
  559. /package/dist/cjs/{utils → src/utils}/utils.d.ts +0 -0
  560. /package/dist/cjs/{utils → src/utils}/utils.js +0 -0
  561. /package/dist/mjs/{data-structures → src/data-structures}/binary-tree/binary-indexed-tree.d.ts +0 -0
  562. /package/dist/mjs/{data-structures → src/data-structures}/binary-tree/binary-indexed-tree.js +0 -0
  563. /package/dist/mjs/{data-structures → src/data-structures}/binary-tree/index.d.ts +0 -0
  564. /package/dist/mjs/{data-structures → src/data-structures}/binary-tree/index.js +0 -0
  565. /package/dist/mjs/{data-structures → src/data-structures}/binary-tree/rb-tree.d.ts +0 -0
  566. /package/dist/mjs/{data-structures → src/data-structures}/binary-tree/rb-tree.js +0 -0
  567. /package/dist/mjs/{data-structures → src/data-structures}/binary-tree/segment-tree.d.ts +0 -0
  568. /package/dist/mjs/{data-structures → src/data-structures}/binary-tree/segment-tree.js +0 -0
  569. /package/dist/mjs/{data-structures → src/data-structures}/graph/abstract-graph.d.ts +0 -0
  570. /package/dist/mjs/{data-structures → src/data-structures}/graph/abstract-graph.js +0 -0
  571. /package/dist/mjs/{data-structures → src/data-structures}/graph/directed-graph.d.ts +0 -0
  572. /package/dist/mjs/{data-structures → src/data-structures}/graph/directed-graph.js +0 -0
  573. /package/dist/mjs/{data-structures → src/data-structures}/graph/index.d.ts +0 -0
  574. /package/dist/mjs/{data-structures → src/data-structures}/graph/index.js +0 -0
  575. /package/dist/mjs/{data-structures → src/data-structures}/graph/map-graph.d.ts +0 -0
  576. /package/dist/mjs/{data-structures → src/data-structures}/graph/map-graph.js +0 -0
  577. /package/dist/mjs/{data-structures → src/data-structures}/graph/undirected-graph.d.ts +0 -0
  578. /package/dist/mjs/{data-structures → src/data-structures}/graph/undirected-graph.js +0 -0
  579. /package/dist/mjs/{data-structures → src/data-structures}/hash/coordinate-map.d.ts +0 -0
  580. /package/dist/mjs/{data-structures → src/data-structures}/hash/coordinate-map.js +0 -0
  581. /package/dist/mjs/{data-structures → src/data-structures}/hash/coordinate-set.d.ts +0 -0
  582. /package/dist/mjs/{data-structures → src/data-structures}/hash/coordinate-set.js +0 -0
  583. /package/dist/mjs/{data-structures → src/data-structures}/hash/hash-map.d.ts +0 -0
  584. /package/dist/mjs/{data-structures → src/data-structures}/hash/hash-map.js +0 -0
  585. /package/dist/mjs/{data-structures → src/data-structures}/hash/hash-table.d.ts +0 -0
  586. /package/dist/mjs/{data-structures → src/data-structures}/hash/hash-table.js +0 -0
  587. /package/dist/mjs/{data-structures → src/data-structures}/hash/index.d.ts +0 -0
  588. /package/dist/mjs/{data-structures → src/data-structures}/hash/index.js +0 -0
  589. /package/dist/mjs/{data-structures → src/data-structures}/hash/tree-map.d.ts +0 -0
  590. /package/dist/mjs/{data-structures → src/data-structures}/hash/tree-map.js +0 -0
  591. /package/dist/mjs/{data-structures → src/data-structures}/hash/tree-set.d.ts +0 -0
  592. /package/dist/mjs/{data-structures → src/data-structures}/hash/tree-set.js +0 -0
  593. /package/dist/mjs/{data-structures → src/data-structures}/heap/heap.d.ts +0 -0
  594. /package/dist/mjs/{data-structures → src/data-structures}/heap/heap.js +0 -0
  595. /package/dist/mjs/{data-structures → src/data-structures}/heap/index.d.ts +0 -0
  596. /package/dist/mjs/{data-structures → src/data-structures}/heap/index.js +0 -0
  597. /package/dist/mjs/{data-structures → src/data-structures}/heap/max-heap.d.ts +0 -0
  598. /package/dist/mjs/{data-structures → src/data-structures}/heap/max-heap.js +0 -0
  599. /package/dist/mjs/{data-structures → src/data-structures}/heap/min-heap.d.ts +0 -0
  600. /package/dist/mjs/{data-structures → src/data-structures}/heap/min-heap.js +0 -0
  601. /package/dist/mjs/{data-structures → src/data-structures}/index.d.ts +0 -0
  602. /package/dist/mjs/{data-structures → src/data-structures}/index.js +0 -0
  603. /package/dist/mjs/{data-structures → src/data-structures}/linked-list/doubly-linked-list.d.ts +0 -0
  604. /package/dist/mjs/{data-structures → src/data-structures}/linked-list/doubly-linked-list.js +0 -0
  605. /package/dist/mjs/{data-structures → src/data-structures}/linked-list/index.d.ts +0 -0
  606. /package/dist/mjs/{data-structures → src/data-structures}/linked-list/index.js +0 -0
  607. /package/dist/mjs/{data-structures → src/data-structures}/linked-list/singly-linked-list.d.ts +0 -0
  608. /package/dist/mjs/{data-structures → src/data-structures}/linked-list/singly-linked-list.js +0 -0
  609. /package/dist/mjs/{data-structures → src/data-structures}/linked-list/skip-linked-list.d.ts +0 -0
  610. /package/dist/mjs/{data-structures → src/data-structures}/linked-list/skip-linked-list.js +0 -0
  611. /package/dist/mjs/{data-structures → src/data-structures}/matrix/index.d.ts +0 -0
  612. /package/dist/mjs/{data-structures → src/data-structures}/matrix/index.js +0 -0
  613. /package/dist/mjs/{data-structures → src/data-structures}/matrix/matrix.d.ts +0 -0
  614. /package/dist/mjs/{data-structures → src/data-structures}/matrix/matrix.js +0 -0
  615. /package/dist/mjs/{data-structures → src/data-structures}/matrix/matrix2d.d.ts +0 -0
  616. /package/dist/mjs/{data-structures → src/data-structures}/matrix/matrix2d.js +0 -0
  617. /package/dist/mjs/{data-structures → src/data-structures}/matrix/navigator.d.ts +0 -0
  618. /package/dist/mjs/{data-structures → src/data-structures}/matrix/navigator.js +0 -0
  619. /package/dist/mjs/{data-structures → src/data-structures}/matrix/vector2d.d.ts +0 -0
  620. /package/dist/mjs/{data-structures → src/data-structures}/matrix/vector2d.js +0 -0
  621. /package/dist/mjs/{data-structures → src/data-structures}/priority-queue/index.d.ts +0 -0
  622. /package/dist/mjs/{data-structures → src/data-structures}/priority-queue/index.js +0 -0
  623. /package/dist/mjs/{data-structures → src/data-structures}/priority-queue/max-priority-queue.d.ts +0 -0
  624. /package/dist/mjs/{data-structures → src/data-structures}/priority-queue/max-priority-queue.js +0 -0
  625. /package/dist/mjs/{data-structures → src/data-structures}/priority-queue/min-priority-queue.d.ts +0 -0
  626. /package/dist/mjs/{data-structures → src/data-structures}/priority-queue/min-priority-queue.js +0 -0
  627. /package/dist/mjs/{data-structures → src/data-structures}/priority-queue/priority-queue.d.ts +0 -0
  628. /package/dist/mjs/{data-structures → src/data-structures}/priority-queue/priority-queue.js +0 -0
  629. /package/dist/mjs/{data-structures → src/data-structures}/queue/deque.d.ts +0 -0
  630. /package/dist/mjs/{data-structures → src/data-structures}/queue/deque.js +0 -0
  631. /package/dist/mjs/{data-structures → src/data-structures}/queue/index.d.ts +0 -0
  632. /package/dist/mjs/{data-structures → src/data-structures}/queue/index.js +0 -0
  633. /package/dist/mjs/{data-structures → src/data-structures}/queue/queue.d.ts +0 -0
  634. /package/dist/mjs/{data-structures → src/data-structures}/queue/queue.js +0 -0
  635. /package/dist/mjs/{data-structures → src/data-structures}/stack/index.d.ts +0 -0
  636. /package/dist/mjs/{data-structures → src/data-structures}/stack/index.js +0 -0
  637. /package/dist/mjs/{data-structures → src/data-structures}/stack/stack.d.ts +0 -0
  638. /package/dist/mjs/{data-structures → src/data-structures}/stack/stack.js +0 -0
  639. /package/dist/mjs/{data-structures → src/data-structures}/tree/index.d.ts +0 -0
  640. /package/dist/mjs/{data-structures → src/data-structures}/tree/index.js +0 -0
  641. /package/dist/mjs/{data-structures → src/data-structures}/tree/tree.d.ts +0 -0
  642. /package/dist/mjs/{data-structures → src/data-structures}/tree/tree.js +0 -0
  643. /package/dist/mjs/{data-structures → src/data-structures}/trie/index.d.ts +0 -0
  644. /package/dist/mjs/{data-structures → src/data-structures}/trie/index.js +0 -0
  645. /package/dist/mjs/{data-structures → src/data-structures}/trie/trie.d.ts +0 -0
  646. /package/dist/mjs/{data-structures → src/data-structures}/trie/trie.js +0 -0
  647. /package/dist/mjs/{index.d.ts → src/index.d.ts} +0 -0
  648. /package/dist/mjs/{index.js → src/index.js} +0 -0
  649. /package/dist/mjs/{interfaces → src/interfaces}/binary-tree.d.ts +0 -0
  650. /package/dist/mjs/{interfaces → src/interfaces}/binary-tree.js +0 -0
  651. /package/dist/mjs/{interfaces → src/interfaces}/doubly-linked-list.d.ts +0 -0
  652. /package/dist/mjs/{interfaces → src/interfaces}/doubly-linked-list.js +0 -0
  653. /package/dist/mjs/{interfaces → src/interfaces}/graph.d.ts +0 -0
  654. /package/dist/mjs/{interfaces → src/interfaces}/graph.js +0 -0
  655. /package/dist/mjs/{interfaces → src/interfaces}/heap.d.ts +0 -0
  656. /package/dist/mjs/{interfaces → src/interfaces}/heap.js +0 -0
  657. /package/dist/mjs/{interfaces → src/interfaces}/index.d.ts +0 -0
  658. /package/dist/mjs/{interfaces → src/interfaces}/index.js +0 -0
  659. /package/dist/mjs/{interfaces → src/interfaces}/navigator.d.ts +0 -0
  660. /package/dist/mjs/{interfaces → src/interfaces}/navigator.js +0 -0
  661. /package/dist/mjs/{interfaces → src/interfaces}/priority-queue.d.ts +0 -0
  662. /package/dist/mjs/{interfaces → src/interfaces}/priority-queue.js +0 -0
  663. /package/dist/mjs/{interfaces → src/interfaces}/segment-tree.d.ts +0 -0
  664. /package/dist/mjs/{interfaces → src/interfaces}/segment-tree.js +0 -0
  665. /package/dist/mjs/{interfaces → src/interfaces}/singly-linked-list.d.ts +0 -0
  666. /package/dist/mjs/{interfaces → src/interfaces}/singly-linked-list.js +0 -0
  667. /package/dist/mjs/{types → src/types}/data-structures/binary-tree/avl-tree.d.ts +0 -0
  668. /package/dist/mjs/{types → src/types}/data-structures/binary-tree/avl-tree.js +0 -0
  669. /package/dist/mjs/{types → src/types}/data-structures/binary-tree/binary-indexed-tree.d.ts +0 -0
  670. /package/dist/mjs/{types → src/types}/data-structures/binary-tree/binary-indexed-tree.js +0 -0
  671. /package/dist/mjs/{types → src/types}/data-structures/binary-tree/binary-tree.d.ts +0 -0
  672. /package/dist/mjs/{types → src/types}/data-structures/binary-tree/binary-tree.js +0 -0
  673. /package/dist/mjs/{types → src/types}/data-structures/binary-tree/bst.d.ts +0 -0
  674. /package/dist/mjs/{types → src/types}/data-structures/binary-tree/bst.js +0 -0
  675. /package/dist/mjs/{types → src/types}/data-structures/binary-tree/index.d.ts +0 -0
  676. /package/dist/mjs/{types → src/types}/data-structures/binary-tree/index.js +0 -0
  677. /package/dist/mjs/{types → src/types}/data-structures/binary-tree/rb-tree.d.ts +0 -0
  678. /package/dist/mjs/{types → src/types}/data-structures/binary-tree/rb-tree.js +0 -0
  679. /package/dist/mjs/{types → src/types}/data-structures/binary-tree/segment-tree.d.ts +0 -0
  680. /package/dist/mjs/{types → src/types}/data-structures/binary-tree/segment-tree.js +0 -0
  681. /package/dist/mjs/{types → src/types}/data-structures/binary-tree/tree-multiset.d.ts +0 -0
  682. /package/dist/mjs/{types → src/types}/data-structures/binary-tree/tree-multiset.js +0 -0
  683. /package/dist/mjs/{types → src/types}/data-structures/graph/abstract-graph.d.ts +0 -0
  684. /package/dist/mjs/{types → src/types}/data-structures/graph/abstract-graph.js +0 -0
  685. /package/dist/mjs/{types → src/types}/data-structures/graph/directed-graph.d.ts +0 -0
  686. /package/dist/mjs/{types → src/types}/data-structures/graph/directed-graph.js +0 -0
  687. /package/dist/mjs/{types → src/types}/data-structures/graph/index.d.ts +0 -0
  688. /package/dist/mjs/{types → src/types}/data-structures/graph/index.js +0 -0
  689. /package/dist/mjs/{types → src/types}/data-structures/graph/map-graph.d.ts +0 -0
  690. /package/dist/mjs/{types → src/types}/data-structures/graph/map-graph.js +0 -0
  691. /package/dist/mjs/{types → src/types}/data-structures/graph/undirected-graph.d.ts +0 -0
  692. /package/dist/mjs/{types → src/types}/data-structures/graph/undirected-graph.js +0 -0
  693. /package/dist/mjs/{types → src/types}/data-structures/hash/coordinate-map.d.ts +0 -0
  694. /package/dist/mjs/{types → src/types}/data-structures/hash/coordinate-map.js +0 -0
  695. /package/dist/mjs/{types → src/types}/data-structures/hash/coordinate-set.d.ts +0 -0
  696. /package/dist/mjs/{types → src/types}/data-structures/hash/coordinate-set.js +0 -0
  697. /package/dist/mjs/{types → src/types}/data-structures/hash/hash-map.d.ts +0 -0
  698. /package/dist/mjs/{types → src/types}/data-structures/hash/hash-map.js +0 -0
  699. /package/dist/mjs/{types → src/types}/data-structures/hash/hash-table.d.ts +0 -0
  700. /package/dist/mjs/{types → src/types}/data-structures/hash/hash-table.js +0 -0
  701. /package/dist/mjs/{types → src/types}/data-structures/hash/index.d.ts +0 -0
  702. /package/dist/mjs/{types → src/types}/data-structures/hash/index.js +0 -0
  703. /package/dist/mjs/{types → src/types}/data-structures/hash/tree-map.d.ts +0 -0
  704. /package/dist/mjs/{types → src/types}/data-structures/hash/tree-map.js +0 -0
  705. /package/dist/mjs/{types → src/types}/data-structures/hash/tree-set.d.ts +0 -0
  706. /package/dist/mjs/{types → src/types}/data-structures/hash/tree-set.js +0 -0
  707. /package/dist/mjs/{types → src/types}/data-structures/heap/heap.d.ts +0 -0
  708. /package/dist/mjs/{types → src/types}/data-structures/heap/heap.js +0 -0
  709. /package/dist/mjs/{types → src/types}/data-structures/heap/index.d.ts +0 -0
  710. /package/dist/mjs/{types → src/types}/data-structures/heap/index.js +0 -0
  711. /package/dist/mjs/{types → src/types}/data-structures/heap/max-heap.d.ts +0 -0
  712. /package/dist/mjs/{types → src/types}/data-structures/heap/max-heap.js +0 -0
  713. /package/dist/mjs/{types → src/types}/data-structures/heap/min-heap.d.ts +0 -0
  714. /package/dist/mjs/{types → src/types}/data-structures/heap/min-heap.js +0 -0
  715. /package/dist/mjs/{types → src/types}/data-structures/index.d.ts +0 -0
  716. /package/dist/mjs/{types → src/types}/data-structures/index.js +0 -0
  717. /package/dist/mjs/{types → src/types}/data-structures/linked-list/doubly-linked-list.d.ts +0 -0
  718. /package/dist/mjs/{types → src/types}/data-structures/linked-list/doubly-linked-list.js +0 -0
  719. /package/dist/mjs/{types → src/types}/data-structures/linked-list/index.d.ts +0 -0
  720. /package/dist/mjs/{types → src/types}/data-structures/linked-list/index.js +0 -0
  721. /package/dist/mjs/{types → src/types}/data-structures/linked-list/singly-linked-list.d.ts +0 -0
  722. /package/dist/mjs/{types → src/types}/data-structures/linked-list/singly-linked-list.js +0 -0
  723. /package/dist/mjs/{types → src/types}/data-structures/linked-list/skip-linked-list.d.ts +0 -0
  724. /package/dist/mjs/{types → src/types}/data-structures/linked-list/skip-linked-list.js +0 -0
  725. /package/dist/mjs/{types → src/types}/data-structures/matrix/index.d.ts +0 -0
  726. /package/dist/mjs/{types → src/types}/data-structures/matrix/index.js +0 -0
  727. /package/dist/mjs/{types → src/types}/data-structures/matrix/matrix.d.ts +0 -0
  728. /package/dist/mjs/{types → src/types}/data-structures/matrix/matrix.js +0 -0
  729. /package/dist/mjs/{types → src/types}/data-structures/matrix/matrix2d.d.ts +0 -0
  730. /package/dist/mjs/{types → src/types}/data-structures/matrix/matrix2d.js +0 -0
  731. /package/dist/mjs/{types → src/types}/data-structures/matrix/navigator.d.ts +0 -0
  732. /package/dist/mjs/{types → src/types}/data-structures/matrix/navigator.js +0 -0
  733. /package/dist/mjs/{types → src/types}/data-structures/matrix/vector2d.d.ts +0 -0
  734. /package/dist/mjs/{types → src/types}/data-structures/matrix/vector2d.js +0 -0
  735. /package/dist/mjs/{types → src/types}/data-structures/priority-queue/index.d.ts +0 -0
  736. /package/dist/mjs/{types → src/types}/data-structures/priority-queue/index.js +0 -0
  737. /package/dist/mjs/{types → src/types}/data-structures/priority-queue/max-priority-queue.d.ts +0 -0
  738. /package/dist/mjs/{types → src/types}/data-structures/priority-queue/max-priority-queue.js +0 -0
  739. /package/dist/mjs/{types → src/types}/data-structures/priority-queue/min-priority-queue.d.ts +0 -0
  740. /package/dist/mjs/{types → src/types}/data-structures/priority-queue/min-priority-queue.js +0 -0
  741. /package/dist/mjs/{types → src/types}/data-structures/priority-queue/priority-queue.d.ts +0 -0
  742. /package/dist/mjs/{types → src/types}/data-structures/priority-queue/priority-queue.js +0 -0
  743. /package/dist/mjs/{types → src/types}/data-structures/queue/deque.d.ts +0 -0
  744. /package/dist/mjs/{types → src/types}/data-structures/queue/deque.js +0 -0
  745. /package/dist/mjs/{types → src/types}/data-structures/queue/index.d.ts +0 -0
  746. /package/dist/mjs/{types → src/types}/data-structures/queue/index.js +0 -0
  747. /package/dist/mjs/{types → src/types}/data-structures/queue/queue.d.ts +0 -0
  748. /package/dist/mjs/{types → src/types}/data-structures/queue/queue.js +0 -0
  749. /package/dist/mjs/{types → src/types}/data-structures/stack/index.d.ts +0 -0
  750. /package/dist/mjs/{types → src/types}/data-structures/stack/index.js +0 -0
  751. /package/dist/mjs/{types → src/types}/data-structures/stack/stack.d.ts +0 -0
  752. /package/dist/mjs/{types → src/types}/data-structures/stack/stack.js +0 -0
  753. /package/dist/mjs/{types → src/types}/data-structures/tree/index.d.ts +0 -0
  754. /package/dist/mjs/{types → src/types}/data-structures/tree/index.js +0 -0
  755. /package/dist/mjs/{types → src/types}/data-structures/tree/tree.d.ts +0 -0
  756. /package/dist/mjs/{types → src/types}/data-structures/tree/tree.js +0 -0
  757. /package/dist/mjs/{types → src/types}/data-structures/trie/index.d.ts +0 -0
  758. /package/dist/mjs/{types → src/types}/data-structures/trie/index.js +0 -0
  759. /package/dist/mjs/{types → src/types}/data-structures/trie/trie.d.ts +0 -0
  760. /package/dist/mjs/{types → src/types}/data-structures/trie/trie.js +0 -0
  761. /package/dist/mjs/{types → src/types}/helpers.d.ts +0 -0
  762. /package/dist/mjs/{types → src/types}/helpers.js +0 -0
  763. /package/dist/mjs/{types → src/types}/index.d.ts +0 -0
  764. /package/dist/mjs/{types → src/types}/index.js +0 -0
  765. /package/dist/mjs/{types → src/types}/utils/index.d.ts +0 -0
  766. /package/dist/mjs/{types → src/types}/utils/index.js +0 -0
  767. /package/dist/mjs/{types → src/types}/utils/utils.d.ts +0 -0
  768. /package/dist/mjs/{types → src/types}/utils/utils.js +0 -0
  769. /package/dist/mjs/{types → src/types}/utils/validate-type.d.ts +0 -0
  770. /package/dist/mjs/{types → src/types}/utils/validate-type.js +0 -0
  771. /package/dist/mjs/{utils → src/utils}/index.d.ts +0 -0
  772. /package/dist/mjs/{utils → src/utils}/index.js +0 -0
  773. /package/dist/mjs/{utils → src/utils}/utils.d.ts +0 -0
  774. /package/dist/mjs/{utils → src/utils}/utils.js +0 -0
@@ -1,49 +0,0 @@
1
- import {DirectedGraph, UndirectedGraph} from '../../../../src';
2
-
3
- describe('Overall Graph Operation Test', () => {
4
- it('Overall DirectedGraph Operation Test', () => {
5
- const graph = new DirectedGraph();
6
-
7
- graph.addVertex('A');
8
- graph.addVertex('B');
9
-
10
- graph.hasVertex('A'); // true
11
- graph.hasVertex('B'); // true
12
- graph.hasVertex('C'); // false
13
- expect(graph.hasVertex('A')).toBe(true); // true
14
- expect(graph.hasVertex('B')).toBe(true); // true
15
- expect(graph.hasVertex('C')).toBe(false); // false
16
-
17
- graph.addEdge('A', 'B');
18
- graph.hasEdge('A', 'B'); // true
19
- graph.hasEdge('B', 'A'); // false
20
- expect(graph.hasEdge('A', 'B')).toBe(true); // true
21
- expect(graph.hasEdge('B', 'A')).toBe(false); // false
22
-
23
- graph.deleteEdgeSrcToDest('A', 'B');
24
- graph.hasEdge('A', 'B'); // false
25
- expect(graph.hasEdge('A', 'B')).toBe(false); // false
26
-
27
- graph.addVertex('C');
28
-
29
- graph.addEdge('A', 'B');
30
- graph.addEdge('B', 'C');
31
-
32
- const topologicalOrderKeys = graph.topologicalSort();
33
- expect(topologicalOrderKeys).toEqual(['A', 'B', 'C']);
34
- });
35
- it('Overall UndirectedGraph Operation Test', () => {
36
- const graph = new UndirectedGraph();
37
- graph.addVertex('A');
38
- graph.addVertex('B');
39
- graph.addVertex('C');
40
- graph.addVertex('D');
41
- graph.deleteVertex('C');
42
- graph.addEdge('A', 'B');
43
- graph.addEdge('B', 'D');
44
-
45
- const dijkstraResult = graph.dijkstra('A');
46
- Array.from(dijkstraResult?.seen ?? []).map(vertex => vertex.key); // ['A', 'B', 'D']
47
- expect(Array.from(dijkstraResult?.seen ?? []).map(vertex => vertex.key)).toEqual(['A', 'B', 'D']);
48
- });
49
- });
@@ -1,149 +0,0 @@
1
- import {UndirectedEdge, UndirectedGraph, UndirectedVertex} from '../../../../src';
2
-
3
- describe('UndirectedGraph Operation Test', () => {
4
- let graph: UndirectedGraph;
5
-
6
- beforeEach(() => {
7
- graph = new UndirectedGraph();
8
- });
9
-
10
- it('should edge cases', () => {
11
- expect(graph.deleteEdge(new UndirectedEdge('c', 'd'))).toBe(null);
12
- expect(graph.deleteEdgeBetween('c', 'd')).toBe(null);
13
- expect(graph.degreeOf('c')).toBe(0);
14
- expect(graph.edgesOf('c').length).toBe(0);
15
- expect(graph.getEndsOfEdge(new UndirectedEdge('c', 'd'))).toBe(null);
16
- });
17
-
18
- it('should add vertices', () => {
19
- const vertex1 = new UndirectedVertex('A');
20
- const vertex2 = new UndirectedVertex('B');
21
-
22
- graph.addVertex(vertex1);
23
- graph.addVertex(vertex2);
24
-
25
- expect(graph.hasVertex(vertex1)).toBe(true);
26
- expect(graph.hasVertex(vertex2)).toBe(true);
27
- });
28
-
29
- it('should add edges', () => {
30
- const vertex1 = new UndirectedVertex('A');
31
- const vertex2 = new UndirectedVertex('B');
32
- const edge = new UndirectedEdge('A', 'B');
33
-
34
- graph.addVertex(vertex1);
35
- graph.addVertex(vertex2);
36
- graph.addEdge(edge);
37
-
38
- expect(graph.hasEdge('A', 'B')).toBe(true);
39
- expect(graph.hasEdge('B', 'A')).toBe(true);
40
- });
41
-
42
- it('should delete edges', () => {
43
- const vertex1 = new UndirectedVertex('A');
44
- const vertex2 = new UndirectedVertex('B');
45
- const edge = new UndirectedEdge('A', 'B');
46
-
47
- graph.addVertex(vertex1);
48
- graph.addVertex(vertex2);
49
- graph.addEdge(edge);
50
-
51
- expect(graph.deleteEdge(edge)).toBe(edge);
52
- expect(graph.hasEdge('A', 'B')).toBe(false);
53
- });
54
-
55
- it('should perform topological sort', () => {
56
- graph.addVertex('A');
57
- graph.addVertex('B');
58
- graph.addVertex('C');
59
- graph.addVertex('D');
60
- graph.deleteVertex('C');
61
- graph.addEdge('A', 'B');
62
- graph.addEdge('B', 'D');
63
-
64
- const dijkstraResult = graph.dijkstra('A');
65
- expect(Array.from(dijkstraResult?.seen ?? []).map(vertex => vertex.key)).toEqual(['A', 'B', 'D']);
66
- });
67
- });
68
-
69
- describe('UndirectedGraph', () => {
70
- let undirectedGraph: UndirectedGraph<string, string>;
71
-
72
- beforeEach(() => {
73
- // Create a new UndirectedGraph instance before each test
74
- undirectedGraph = new UndirectedGraph<string, string>();
75
- });
76
-
77
- // Test adding vertices to the graph
78
- it('should add vertices to the graph', () => {
79
- const vertexA = new UndirectedVertex('A', 'Location A');
80
- const vertexB = new UndirectedVertex('B', 'Location B');
81
-
82
- undirectedGraph.addVertex(vertexA);
83
- undirectedGraph.addVertex(vertexB);
84
-
85
- expect(undirectedGraph.hasVertex('A')).toBe(true);
86
- expect(undirectedGraph.hasVertex('B')).toBe(true);
87
- });
88
-
89
- // Test adding edges to the graph
90
- it('should add edges to the graph', () => {
91
- const vertexA = new UndirectedVertex('A', 'Location A');
92
- const vertexB = new UndirectedVertex('B', 'Location B');
93
- const edgeAB = new UndirectedEdge('A', 'B', 1, 'Edge between A and B');
94
-
95
- undirectedGraph.addVertex(vertexA);
96
- undirectedGraph.addVertex(vertexB);
97
- undirectedGraph.addEdge(edgeAB);
98
-
99
- expect(undirectedGraph.hasEdge('A', 'B')).toBe(true);
100
- });
101
-
102
- // Test getting neighbors of a vertex
103
- it('should return the neighbors of a vertex', () => {
104
- const vertexA = new UndirectedVertex('A', 'Location A');
105
- const vertexB = new UndirectedVertex('B', 'Location B');
106
- const vertexC = new UndirectedVertex('C', 'Location C');
107
- const edgeAB = new UndirectedEdge('A', 'B', 1, 'Edge between A and B');
108
- const edgeBC = new UndirectedEdge('B', 'C', 2, 'Edge between B and C');
109
-
110
- undirectedGraph.addVertex(vertexA);
111
- undirectedGraph.addVertex(vertexB);
112
- undirectedGraph.addVertex(vertexC);
113
- undirectedGraph.addEdge(edgeAB);
114
- undirectedGraph.addEdge(edgeBC);
115
-
116
- const neighborsOfA = undirectedGraph.getNeighbors('A');
117
- const neighborsOfB = undirectedGraph.getNeighbors('B');
118
-
119
- expect(neighborsOfA).toEqual([vertexB]);
120
- expect(neighborsOfB).toEqual([vertexA, vertexC]);
121
- });
122
-
123
- // Test degree of a vertex
124
- it('should return the degree of a vertex', () => {
125
- const vertexA = new UndirectedVertex('A', 'Location A');
126
- const vertexB = new UndirectedVertex('B', 'Location B');
127
- const vertexC = new UndirectedVertex('C', 'Location C');
128
- const edgeAB = new UndirectedEdge('A', 'B', 3, 'Edge between A and B');
129
- const edgeBC = new UndirectedEdge('B', 'C', 4, 'Edge between B and C');
130
-
131
- edgeAB.vertices = edgeAB.vertices;
132
- expect(undirectedGraph.edges.size).toBe(0);
133
- undirectedGraph.addVertex(vertexA);
134
- undirectedGraph.addVertex(vertexB);
135
- undirectedGraph.addVertex(vertexC);
136
- undirectedGraph.addEdge(edgeAB);
137
- undirectedGraph.addEdge(edgeBC);
138
-
139
- const degreeOfA = undirectedGraph.degreeOf('A');
140
- const degreeOfB = undirectedGraph.degreeOf('B');
141
- const degreeOfC = undirectedGraph.degreeOf('C');
142
- expect(undirectedGraph.edgeSet().length).toBe(2);
143
- expect(undirectedGraph.getEndsOfEdge(edgeBC)?.length).toBe(2);
144
-
145
- expect(degreeOfA).toBe(1);
146
- expect(degreeOfB).toBe(2);
147
- expect(degreeOfC).toBe(1);
148
- });
149
- });
@@ -1,74 +0,0 @@
1
- import {CoordinateMap} from '../../../../src';
2
-
3
- describe('CoordinateMap', () => {
4
- it('should set and get values correctly', () => {
5
- const coordinateMap = new CoordinateMap<string>();
6
- const key = [1, 2, 3];
7
- const value = 'TestValue';
8
-
9
- coordinateMap.set(key, value);
10
- const retrievedValue = coordinateMap.get(key);
11
-
12
- expect(retrievedValue).toBe(value);
13
- });
14
-
15
- it('should return true when key exists', () => {
16
- const coordinateMap = new CoordinateMap<string>();
17
- const key = [1, 2, 3];
18
- const value = 'TestValue';
19
-
20
- coordinateMap.set(key, value);
21
-
22
- expect(coordinateMap.has(key)).toBe(true);
23
- });
24
-
25
- it('should return false when key does not exist', () => {
26
- const coordinateMap = new CoordinateMap<string>();
27
- const key = [1, 2, 3];
28
-
29
- expect(coordinateMap.has(key)).toBe(false);
30
- });
31
-
32
- it('should delete key-value pair correctly', () => {
33
- const coordinateMap = new CoordinateMap<string>();
34
- const key = [1, 2, 3];
35
- const value = 'TestValue';
36
-
37
- coordinateMap.set(key, value);
38
- coordinateMap.delete(key);
39
-
40
- expect(coordinateMap.has(key)).toBe(false);
41
- });
42
-
43
- it('should allow changing the joint character', () => {
44
- const coordinateMap = new CoordinateMap<string>();
45
- const key = [1, 2, 3];
46
- const value = 'TestValue';
47
-
48
- coordinateMap.set(key, value);
49
- const newKey = [1, 2, 3];
50
- const retrievedValue = coordinateMap.get(newKey);
51
-
52
- expect(retrievedValue).toBe(value);
53
- });
54
- });
55
-
56
- describe('CoordinateMap', () => {
57
- class MyCoordinateMap<V = any> extends CoordinateMap<V> {
58
- constructor(joint?: string) {
59
- super(joint);
60
- this._joint = joint += '-';
61
- }
62
- }
63
-
64
- const cMap = new MyCoordinateMap<number>('*');
65
-
66
- beforeEach(() => {
67
- cMap.set([0, 0], 0);
68
- cMap.set([0, 1], 1);
69
- cMap.set([1, 1], 11);
70
- });
71
- it('should joint to be *-', () => {
72
- expect(cMap.joint).toBe('*-');
73
- });
74
- });
@@ -1,66 +0,0 @@
1
- import {CoordinateSet} from '../../../../src';
2
-
3
- describe('CoordinateSet', () => {
4
- it('should add and check values correctly', () => {
5
- const coordinateSet = new CoordinateSet();
6
- const value = [1, 2, 3];
7
-
8
- coordinateSet.add(value);
9
- const hasValue = coordinateSet.has(value);
10
-
11
- expect(hasValue).toBe(true);
12
- });
13
-
14
- it('should return false when value does not exist', () => {
15
- const coordinateSet = new CoordinateSet();
16
- const value = [1, 2, 3];
17
-
18
- expect(coordinateSet.has(value)).toBe(false);
19
- });
20
-
21
- it('should delete value correctly', () => {
22
- const coordinateSet = new CoordinateSet();
23
- const value = [1, 2, 3];
24
-
25
- coordinateSet.add(value);
26
- coordinateSet.delete(value);
27
-
28
- expect(coordinateSet.has(value)).toBe(false);
29
- });
30
-
31
- it('should allow changing the joint character', () => {
32
- const coordinateSet = new CoordinateSet();
33
- const value = [1, 2, 3];
34
-
35
- coordinateSet.add(value);
36
- const newValue = [1, 2, 3];
37
- const hasValue = coordinateSet.has(newValue);
38
-
39
- expect(hasValue).toBe(true);
40
- });
41
- });
42
-
43
- describe('MyCoordinateSet', () => {
44
- class MyCoordinateSet extends CoordinateSet {
45
- constructor(joint?: string) {
46
- super(joint);
47
- this._joint = joint += '-';
48
- }
49
- }
50
-
51
- const mySet = new MyCoordinateSet('*');
52
-
53
- beforeEach(() => {
54
- mySet.add([0, 0]);
55
- mySet.add([0, 1]);
56
- mySet.add([1, 1]);
57
- });
58
- it('should joint to be *-', () => {
59
- expect(mySet.joint).toBe('*-');
60
- });
61
-
62
- it('should has, delete', () => {
63
- mySet.delete([0, 1]);
64
- expect(mySet.has([0, 1])).toBe(false);
65
- });
66
- });
@@ -1,103 +0,0 @@
1
- import {HashMap} from '../../../../src';
2
-
3
- describe('HashMap', () => {
4
- let hashMap: HashMap<string, number>;
5
-
6
- beforeEach(() => {
7
- hashMap = new HashMap<string, number>();
8
- });
9
-
10
- it('should initialize correctly', () => {
11
- expect(hashMap.size).toBe(0);
12
- expect(hashMap.table.length).toBe(16);
13
- expect(hashMap.loadFactor).toBe(0.75);
14
- expect(hashMap.capacityMultiplier).toBe(2);
15
- expect(hashMap.initialCapacity).toBe(16);
16
- expect(hashMap.isEmpty()).toBe(true);
17
- });
18
-
19
- it('should put and get values', () => {
20
- hashMap.set('one', 1);
21
- hashMap.set('two', 2);
22
- hashMap.set('three', 3);
23
-
24
- expect(hashMap.get('one')).toBe(1);
25
- expect(hashMap.get('two')).toBe(2);
26
- expect(hashMap.get('three')).toBe(3);
27
- });
28
-
29
- it('should handle key collisions', () => {
30
- // Force a collision by setting two different keys to the same bucket
31
- hashMap.set('key1', 1);
32
- hashMap.set('key2', 2);
33
-
34
- expect(hashMap.get('key1')).toBe(1);
35
- expect(hashMap.get('key2')).toBe(2);
36
- });
37
-
38
- it('should delete values', () => {
39
- hashMap.set('one', 1);
40
- hashMap.set('two', 2);
41
-
42
- hashMap.delete('one');
43
- expect(hashMap.get('one')).toBeUndefined();
44
- expect(hashMap.size).toBe(1);
45
- });
46
-
47
- it('should clear the HashMap', () => {
48
- hashMap.set('one', 1);
49
- hashMap.set('two', 2);
50
-
51
- hashMap.clear();
52
- expect(hashMap.size).toBe(0);
53
- expect(hashMap.isEmpty()).toBe(true);
54
- });
55
-
56
- it('should iterate over entries', () => {
57
- hashMap.set('one', 1);
58
- hashMap.set('two', 2);
59
- hashMap.set('three', 3);
60
-
61
- const entries = Array.from(hashMap.entries());
62
- expect(entries).toEqual(
63
- expect.arrayContaining([
64
- ['one', 1],
65
- ['two', 2],
66
- ['three', 3]
67
- ])
68
- );
69
- });
70
-
71
- it('should resize the table when load factor is exceeded', () => {
72
- // Set a small initial capacity for testing resizing
73
- hashMap = new HashMap<string, number>(4, 0.5);
74
-
75
- hashMap.set('one', 1);
76
- hashMap.set('two', 2);
77
- hashMap.set('three', 3);
78
- hashMap.set('four', 4); // This should trigger a resize
79
-
80
- expect(hashMap.table.length).toBe(8);
81
- expect(hashMap.get('one')).toBe(1);
82
- expect(hashMap.get('two')).toBe(2);
83
- expect(hashMap.get('three')).toBe(3);
84
- expect(hashMap.get('four')).toBe(4);
85
- });
86
-
87
- it('should allow using a custom hash function', () => {
88
- const customHashFn = () => {
89
- // A simple custom hash function that always returns 0
90
- return 0;
91
- };
92
- hashMap = new HashMap<string, number>(16, 0.75, customHashFn);
93
-
94
- hashMap.set('one', 1);
95
- hashMap.set('two', 2);
96
-
97
- expect(hashMap.get('one')).toBe(1);
98
- expect(hashMap.get('two')).toBe(2);
99
- // Since the custom hash function always returns 0, these keys will collide.
100
- // Make sure they are stored separately.
101
- expect(hashMap.table[0].length).toBe(2);
102
- });
103
- });
@@ -1,186 +0,0 @@
1
- import {HashTable, HashTableNode} from '../../../../src';
2
-
3
- describe('HashNode', () => {
4
- it('should create a HashNode with key and value', () => {
5
- const key = 'testKey';
6
- const value = 'testValue';
7
- const hashNode = new HashTableNode(key, value);
8
-
9
- expect(hashNode.key).toBe(key);
10
- expect(hashNode.value).toBe(value);
11
- expect(hashNode.next).toBe(null);
12
- });
13
- });
14
-
15
- describe('HashTable', () => {
16
- it('should initialize with default capacity', () => {
17
- const hashTable = new HashTable<string, string>();
18
- expect(hashTable.capacity).toBe(16);
19
- expect(hashTable.buckets).toEqual(new Array(16).fill(null));
20
- expect(hashTable.hashFn('a')).toBe(6);
21
- expect(hashTable.capacity).toBe(16);
22
- expect(hashTable.size).toBe(0);
23
- expect(hashTable.buckets.length).toBe(16);
24
- });
25
-
26
- it('should initialize with custom capacity', () => {
27
- const customCapacity = 500;
28
- const hashTable = new HashTable<string, string>(customCapacity);
29
-
30
- expect(hashTable.capacity).toBe(customCapacity);
31
- expect(hashTable.size).toBe(0);
32
- expect(hashTable.buckets.length).toBe(customCapacity);
33
- });
34
-
35
- it('should put and get values correctly', () => {
36
- const hashTable = new HashTable<string, string>();
37
- const key = 'testKey';
38
- const value = 'testValue';
39
-
40
- hashTable.set(key, value);
41
- const retrievedValue = hashTable.get(key);
42
-
43
- expect(retrievedValue).toBe(value);
44
- });
45
-
46
- it('should handle collisions by chaining', () => {
47
- const hashTable = new HashTable<string, string>();
48
- const key1 = 'testKey1';
49
- const value1 = 'testValue1';
50
- const key2 = 'testKey2';
51
- const value2 = 'testValue2';
52
-
53
- hashTable.set(key1, value1);
54
- hashTable.set(key2, value2);
55
-
56
- const retrievedValue1 = hashTable.get(key1);
57
- const retrievedValue2 = hashTable.get(key2);
58
-
59
- expect(retrievedValue1).toBe(value1);
60
- expect(retrievedValue2).toBe(value2);
61
- });
62
-
63
- it('should update value for an existing key', () => {
64
- const hashTable = new HashTable<string, string>();
65
- const key = 'testKey';
66
- const initialValue = 'testValue1';
67
- const updatedValue = 'testValue2';
68
-
69
- hashTable.set(key, initialValue);
70
- hashTable.set(key, updatedValue);
71
-
72
- const retrievedValue = hashTable.get(key);
73
-
74
- expect(retrievedValue).toBe(updatedValue);
75
- });
76
-
77
- it('should return undefined for non-existent key', () => {
78
- const hashTable = new HashTable<string, string>();
79
- const key = 'nonExistentKey';
80
-
81
- const retrievedValue = hashTable.get(key);
82
-
83
- expect(retrievedValue).toBeUndefined();
84
- });
85
-
86
- it('should delete key-value pair correctly', () => {
87
- const hashTable = new HashTable<string, string>();
88
- const key = 'testKey';
89
- const value = 'testValue';
90
-
91
- hashTable.set(key, value);
92
- hashTable.delete(key);
93
-
94
- const retrievedValue = hashTable.get(key);
95
-
96
- expect(retrievedValue).toBeUndefined();
97
- expect(hashTable.size).toBe(0);
98
- });
99
- });
100
-
101
- describe('HashTable', () => {
102
- let hashTable: HashTable<string, number>;
103
-
104
- beforeEach(() => {
105
- hashTable = new HashTable<string, number>();
106
- });
107
-
108
- it('should insert and retrieve values correctly', () => {
109
- hashTable.set('one', 1);
110
- hashTable.set('two', 2);
111
-
112
- expect(hashTable.get('one')).toBe(1);
113
- expect(hashTable.get('two')).toBe(2);
114
- });
115
-
116
- it('should update values correctly', () => {
117
- hashTable.set('one', 1);
118
- expect(hashTable.get('one')).toBe(1);
119
-
120
- hashTable.set('one', 100); // Update the value
121
- expect(hashTable.get('one')).toBe(100);
122
- });
123
-
124
- it('should handle collisions correctly', () => {
125
- hashTable = new HashTable<string, number>(1); // Set a small capacity to force collisions
126
- hashTable.set('one', 1);
127
- hashTable.set('two', 2);
128
-
129
- expect(hashTable.get('one')).toBe(1);
130
- expect(hashTable.get('two')).toBe(2);
131
- });
132
-
133
- it('should delete values correctly', () => {
134
- hashTable.set('one', 1);
135
- hashTable.set('two', 2);
136
- hashTable.delete('one');
137
-
138
- expect(hashTable.get('one')).toBeUndefined();
139
- expect(hashTable.get('two')).toBe(2);
140
- });
141
-
142
- it('should handle non-existent keys correctly', () => {
143
- expect(hashTable.get('non-existent')).toBeUndefined();
144
- hashTable.delete('non-existent'); // Removing a non-existent key should not cause errors
145
- });
146
-
147
- it('should handle custom hash function correctly', () => {
148
- // const customHashFn = () => {
149
- // // Custom hash function that returns a fixed value for all keys
150
- // return 42;
151
- // };
152
-
153
- hashTable = new HashTable<string, number>(16);
154
- hashTable.set('one', 1);
155
- expect(hashTable.get('one')).toBe(1);
156
- expect(hashTable.get('two')).toBeUndefined();
157
- });
158
-
159
- it('should expand when load factor exceeds threshold', () => {
160
- hashTable = new HashTable<string, number>(2); // Set a small capacity to trigger expansion
161
- hashTable.set('one', 1);
162
- hashTable.set('two', 2);
163
- hashTable.set('three', 3); // This should trigger an expansion
164
-
165
- expect(hashTable.capacity).toBe(16);
166
- expect(hashTable.get('one')).toBe(1);
167
- expect(hashTable.get('two')).toBe(2);
168
- expect(hashTable.get('three')).toBe(3);
169
- });
170
- });
171
-
172
- describe('HashTable performance', function () {
173
- it('Items set performance', function () {
174
- const mag = 100000;
175
- const ht = new HashTable();
176
- // const s = performance.now();
177
- for (let i = 0; i < mag; i++) {
178
- ht.set(i, i);
179
- }
180
- // const s1 = performance.now();
181
- const map = new Map();
182
- for (let i = 0; i < mag; i++) {
183
- map.set(i, i);
184
- }
185
- });
186
- });