data-structure-typed 1.32.1 → 1.32.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (342) hide show
  1. package/.idea/data-structure-typed.iml +19 -0
  2. package/.idea/inspectionProfiles/Project_Default.xml +6 -0
  3. package/.idea/misc.xml +6 -0
  4. package/.idea/modules.xml +8 -0
  5. package/.idea/vcs.xml +6 -0
  6. package/CHANGELOG.md +1 -1
  7. package/README.md +415 -255
  8. package/coverage/coverage-final.json +4 -4
  9. package/docs/index.html +268 -21
  10. package/package.json +48 -16
  11. package/test/unit/data-structures/binary-tree/tree-multiset.test.ts +46 -1
  12. package/.auto-changelog-template.hbs +0 -36
  13. package/coverage/clover.xml +0 -3393
  14. package/coverage/lcov-report/base.css +0 -224
  15. package/coverage/lcov-report/block-navigation.js +0 -87
  16. package/coverage/lcov-report/favicon.png +0 -0
  17. package/coverage/lcov-report/index.html +0 -386
  18. package/coverage/lcov-report/prettify.css +0 -1
  19. package/coverage/lcov-report/prettify.js +0 -2
  20. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  21. package/coverage/lcov-report/sorter.js +0 -196
  22. package/coverage/lcov-report/src/data-structures/binary-tree/aa-tree.ts.html +0 -88
  23. package/coverage/lcov-report/src/data-structures/binary-tree/abstract-binary-tree.ts.html +0 -4978
  24. package/coverage/lcov-report/src/data-structures/binary-tree/avl-tree.ts.html +0 -1015
  25. package/coverage/lcov-report/src/data-structures/binary-tree/b-tree.ts.html +0 -88
  26. package/coverage/lcov-report/src/data-structures/binary-tree/binary-indexed-tree.ts.html +0 -313
  27. package/coverage/lcov-report/src/data-structures/binary-tree/binary-tree.ts.html +0 -226
  28. package/coverage/lcov-report/src/data-structures/binary-tree/bst.ts.html +0 -1696
  29. package/coverage/lcov-report/src/data-structures/binary-tree/index.html +0 -296
  30. package/coverage/lcov-report/src/data-structures/binary-tree/index.ts.html +0 -121
  31. package/coverage/lcov-report/src/data-structures/binary-tree/rb-tree.ts.html +0 -388
  32. package/coverage/lcov-report/src/data-structures/binary-tree/segment-tree.ts.html +0 -811
  33. package/coverage/lcov-report/src/data-structures/binary-tree/splay-tree.ts.html +0 -88
  34. package/coverage/lcov-report/src/data-structures/binary-tree/tree-multiset.ts.html +0 -2185
  35. package/coverage/lcov-report/src/data-structures/binary-tree/two-three-tree.ts.html +0 -88
  36. package/coverage/lcov-report/src/data-structures/graph/abstract-graph.ts.html +0 -3205
  37. package/coverage/lcov-report/src/data-structures/graph/directed-graph.ts.html +0 -1495
  38. package/coverage/lcov-report/src/data-structures/graph/index.html +0 -176
  39. package/coverage/lcov-report/src/data-structures/graph/index.ts.html +0 -97
  40. package/coverage/lcov-report/src/data-structures/graph/map-graph.ts.html +0 -472
  41. package/coverage/lcov-report/src/data-structures/graph/undirected-graph.ts.html +0 -907
  42. package/coverage/lcov-report/src/data-structures/hash/coordinate-map.ts.html +0 -286
  43. package/coverage/lcov-report/src/data-structures/hash/coordinate-set.ts.html +0 -253
  44. package/coverage/lcov-report/src/data-structures/hash/hash-table.ts.html +0 -88
  45. package/coverage/lcov-report/src/data-structures/hash/index.html +0 -206
  46. package/coverage/lcov-report/src/data-structures/hash/index.ts.html +0 -103
  47. package/coverage/lcov-report/src/data-structures/hash/pair.ts.html +0 -88
  48. package/coverage/lcov-report/src/data-structures/hash/tree-map.ts.html +0 -88
  49. package/coverage/lcov-report/src/data-structures/hash/tree-set.ts.html +0 -88
  50. package/coverage/lcov-report/src/data-structures/heap/heap.ts.html +0 -721
  51. package/coverage/lcov-report/src/data-structures/heap/index.html +0 -161
  52. package/coverage/lcov-report/src/data-structures/heap/index.ts.html +0 -94
  53. package/coverage/lcov-report/src/data-structures/heap/max-heap.ts.html +0 -178
  54. package/coverage/lcov-report/src/data-structures/heap/min-heap.ts.html +0 -181
  55. package/coverage/lcov-report/src/data-structures/index.html +0 -116
  56. package/coverage/lcov-report/src/data-structures/index.ts.html +0 -118
  57. package/coverage/lcov-report/src/data-structures/linked-list/doubly-linked-list.ts.html +0 -1804
  58. package/coverage/lcov-report/src/data-structures/linked-list/index.html +0 -161
  59. package/coverage/lcov-report/src/data-structures/linked-list/index.ts.html +0 -94
  60. package/coverage/lcov-report/src/data-structures/linked-list/singly-linked-list.ts.html +0 -1588
  61. package/coverage/lcov-report/src/data-structures/linked-list/skip-linked-list.ts.html +0 -88
  62. package/coverage/lcov-report/src/data-structures/matrix/index.html +0 -176
  63. package/coverage/lcov-report/src/data-structures/matrix/index.ts.html +0 -97
  64. package/coverage/lcov-report/src/data-structures/matrix/matrix.ts.html +0 -166
  65. package/coverage/lcov-report/src/data-structures/matrix/matrix2d.ts.html +0 -721
  66. package/coverage/lcov-report/src/data-structures/matrix/navigator.ts.html +0 -448
  67. package/coverage/lcov-report/src/data-structures/matrix/vector2d.ts.html +0 -1033
  68. package/coverage/lcov-report/src/data-structures/priority-queue/index.html +0 -161
  69. package/coverage/lcov-report/src/data-structures/priority-queue/index.ts.html +0 -94
  70. package/coverage/lcov-report/src/data-structures/priority-queue/max-priority-queue.ts.html +0 -253
  71. package/coverage/lcov-report/src/data-structures/priority-queue/min-priority-queue.ts.html +0 -256
  72. package/coverage/lcov-report/src/data-structures/priority-queue/priority-queue.ts.html +0 -1162
  73. package/coverage/lcov-report/src/data-structures/queue/deque.ts.html +0 -976
  74. package/coverage/lcov-report/src/data-structures/queue/index.html +0 -146
  75. package/coverage/lcov-report/src/data-structures/queue/index.ts.html +0 -91
  76. package/coverage/lcov-report/src/data-structures/queue/queue.ts.html +0 -658
  77. package/coverage/lcov-report/src/data-structures/stack/index.html +0 -131
  78. package/coverage/lcov-report/src/data-structures/stack/index.ts.html +0 -88
  79. package/coverage/lcov-report/src/data-structures/stack/stack.ts.html +0 -379
  80. package/coverage/lcov-report/src/data-structures/tree/index.html +0 -131
  81. package/coverage/lcov-report/src/data-structures/tree/index.ts.html +0 -88
  82. package/coverage/lcov-report/src/data-structures/tree/tree.ts.html +0 -292
  83. package/coverage/lcov-report/src/data-structures/trie/index.html +0 -131
  84. package/coverage/lcov-report/src/data-structures/trie/index.ts.html +0 -88
  85. package/coverage/lcov-report/src/data-structures/trie/trie.ts.html +0 -760
  86. package/coverage/lcov-report/src/index.html +0 -116
  87. package/coverage/lcov-report/src/index.ts.html +0 -97
  88. package/coverage/lcov-report/src/interfaces/index.html +0 -116
  89. package/coverage/lcov-report/src/interfaces/index.ts.html +0 -130
  90. package/coverage/lcov-report/src/types/data-structures/abstract-binary-tree.ts.html +0 -235
  91. package/coverage/lcov-report/src/types/data-structures/bst.ts.html +0 -124
  92. package/coverage/lcov-report/src/types/data-structures/directed-graph.ts.html +0 -109
  93. package/coverage/lcov-report/src/types/data-structures/index.html +0 -176
  94. package/coverage/lcov-report/src/types/data-structures/index.ts.html +0 -130
  95. package/coverage/lcov-report/src/types/data-structures/rb-tree.ts.html +0 -106
  96. package/coverage/lcov-report/src/types/index.html +0 -116
  97. package/coverage/lcov-report/src/types/index.ts.html +0 -94
  98. package/coverage/lcov-report/src/types/utils/index.html +0 -116
  99. package/coverage/lcov-report/src/types/utils/index.ts.html +0 -91
  100. package/coverage/lcov-report/src/utils/index.html +0 -131
  101. package/coverage/lcov-report/src/utils/index.ts.html +0 -88
  102. package/coverage/lcov-report/src/utils/utils.ts.html +0 -322
  103. package/coverage/lcov-report/test/utils/index.html +0 -146
  104. package/coverage/lcov-report/test/utils/index.ts.html +0 -91
  105. package/coverage/lcov-report/test/utils/magnitude.ts.html +0 -148
  106. package/coverage/lcov-report/test/utils/number.ts.html +0 -94
  107. package/coverage/lcov.info +0 -6676
  108. package/docs/assets/highlight.css +0 -127
  109. package/docs/assets/main.js +0 -58
  110. package/docs/assets/search.js +0 -1
  111. package/docs/assets/style.css +0 -1367
  112. package/docs/classes/AVLTree.html +0 -2182
  113. package/docs/classes/AVLTreeNode.html +0 -399
  114. package/docs/classes/AaTree.html +0 -202
  115. package/docs/classes/AbstractBinaryTree.html +0 -1836
  116. package/docs/classes/AbstractBinaryTreeNode.html +0 -441
  117. package/docs/classes/AbstractEdge.html +0 -345
  118. package/docs/classes/AbstractGraph.html +0 -1105
  119. package/docs/classes/AbstractVertex.html +0 -299
  120. package/docs/classes/ArrayDeque.html +0 -469
  121. package/docs/classes/BST.html +0 -2026
  122. package/docs/classes/BSTNode.html +0 -400
  123. package/docs/classes/BTree.html +0 -202
  124. package/docs/classes/BinaryIndexedTree.html +0 -371
  125. package/docs/classes/BinaryTree.html +0 -1867
  126. package/docs/classes/BinaryTreeNode.html +0 -399
  127. package/docs/classes/Character.html +0 -250
  128. package/docs/classes/CoordinateMap.html +0 -513
  129. package/docs/classes/CoordinateSet.html +0 -474
  130. package/docs/classes/Deque.html +0 -1005
  131. package/docs/classes/DirectedEdge.html +0 -404
  132. package/docs/classes/DirectedGraph.html +0 -1530
  133. package/docs/classes/DirectedVertex.html +0 -286
  134. package/docs/classes/DoublyLinkedList.html +0 -998
  135. package/docs/classes/DoublyLinkedListNode.html +0 -327
  136. package/docs/classes/HashTable.html +0 -202
  137. package/docs/classes/Heap.html +0 -647
  138. package/docs/classes/HeapItem.html +0 -296
  139. package/docs/classes/LinkedListQueue.html +0 -884
  140. package/docs/classes/MapEdge.html +0 -391
  141. package/docs/classes/MapGraph.html +0 -1583
  142. package/docs/classes/MapVertex.html +0 -356
  143. package/docs/classes/Matrix2D.html +0 -532
  144. package/docs/classes/MatrixNTI2D.html +0 -270
  145. package/docs/classes/MaxHeap.html +0 -671
  146. package/docs/classes/MaxPriorityQueue.html +0 -866
  147. package/docs/classes/MinHeap.html +0 -672
  148. package/docs/classes/MinPriorityQueue.html +0 -868
  149. package/docs/classes/Navigator.html +0 -343
  150. package/docs/classes/ObjectDeque.html +0 -527
  151. package/docs/classes/Pair.html +0 -202
  152. package/docs/classes/PriorityQueue.html +0 -790
  153. package/docs/classes/Queue.html +0 -521
  154. package/docs/classes/RBTree.html +0 -2024
  155. package/docs/classes/RBTreeNode.html +0 -431
  156. package/docs/classes/SegmentTree.html +0 -464
  157. package/docs/classes/SegmentTreeNode.html +0 -387
  158. package/docs/classes/SinglyLinkedList.html +0 -830
  159. package/docs/classes/SinglyLinkedListNode.html +0 -300
  160. package/docs/classes/SkipLinkedList.html +0 -202
  161. package/docs/classes/SplayTree.html +0 -202
  162. package/docs/classes/Stack.html +0 -398
  163. package/docs/classes/TreeMap.html +0 -202
  164. package/docs/classes/TreeMultiset.html +0 -2510
  165. package/docs/classes/TreeMultisetNode.html +0 -447
  166. package/docs/classes/TreeNode.html +0 -344
  167. package/docs/classes/TreeSet.html +0 -202
  168. package/docs/classes/Trie.html +0 -402
  169. package/docs/classes/TrieNode.html +0 -310
  170. package/docs/classes/TwoThreeTree.html +0 -202
  171. package/docs/classes/UndirectedEdge.html +0 -374
  172. package/docs/classes/UndirectedGraph.html +0 -1285
  173. package/docs/classes/UndirectedVertex.html +0 -284
  174. package/docs/classes/Vector2D.html +0 -835
  175. package/docs/enums/CP.html +0 -211
  176. package/docs/enums/FamilyPosition.html +0 -239
  177. package/docs/enums/LoopType.html +0 -212
  178. package/docs/enums/RBColor.html +0 -204
  179. package/docs/enums/TopologicalProperty.html +0 -211
  180. package/docs/functions/arrayRemove.html +0 -208
  181. package/docs/functions/isThunk.html +0 -186
  182. package/docs/functions/toThunk.html +0 -186
  183. package/docs/functions/trampoline.html +0 -186
  184. package/docs/functions/trampolineAsync.html +0 -186
  185. package/docs/functions/uuidV4.html +0 -181
  186. package/docs/interfaces/IAVLTree.html +0 -1245
  187. package/docs/interfaces/IAbstractBinaryTree.html +0 -1101
  188. package/docs/interfaces/IAbstractBinaryTreeNode.html +0 -335
  189. package/docs/interfaces/IAbstractGraph.html +0 -433
  190. package/docs/interfaces/IBST.html +0 -1245
  191. package/docs/interfaces/IDirectedGraph.html +0 -570
  192. package/docs/interfaces/IRBTree.html +0 -1247
  193. package/docs/interfaces/IUNDirectedGraph.html +0 -463
  194. package/docs/types/AVLTreeNodeNested.html +0 -182
  195. package/docs/types/AVLTreeOptions.html +0 -180
  196. package/docs/types/AbstractBinaryTreeNodeNested.html +0 -182
  197. package/docs/types/AbstractBinaryTreeNodeProperties.html +0 -182
  198. package/docs/types/AbstractBinaryTreeNodeProperty.html +0 -182
  199. package/docs/types/AbstractBinaryTreeOptions.html +0 -182
  200. package/docs/types/BSTComparator.html +0 -192
  201. package/docs/types/BSTNodeNested.html +0 -182
  202. package/docs/types/BSTOptions.html +0 -182
  203. package/docs/types/BinaryTreeDeletedResult.html +0 -189
  204. package/docs/types/BinaryTreeNodeId.html +0 -177
  205. package/docs/types/BinaryTreeNodeNested.html +0 -182
  206. package/docs/types/BinaryTreeNodePropertyName.html +0 -177
  207. package/docs/types/BinaryTreeOptions.html +0 -180
  208. package/docs/types/DFSOrderPattern.html +0 -177
  209. package/docs/types/DijkstraResult.html +0 -199
  210. package/docs/types/Direction.html +0 -177
  211. package/docs/types/DummyAny.html +0 -190
  212. package/docs/types/EdgeId.html +0 -177
  213. package/docs/types/HeapOptions.html +0 -198
  214. package/docs/types/IAVLTreeNode.html +0 -184
  215. package/docs/types/IBSTNode.html +0 -184
  216. package/docs/types/IBinaryTree.html +0 -182
  217. package/docs/types/IBinaryTreeNode.html +0 -184
  218. package/docs/types/IRBTreeNode.html +0 -184
  219. package/docs/types/ITreeMultiset.html +0 -182
  220. package/docs/types/ITreeMultisetNode.html +0 -184
  221. package/docs/types/KeyValueObject.html +0 -182
  222. package/docs/types/KeyValueObjectWithId.html +0 -184
  223. package/docs/types/MapGraphCoordinate.html +0 -177
  224. package/docs/types/NavigatorParams.html +0 -211
  225. package/docs/types/NodeOrPropertyName.html +0 -177
  226. package/docs/types/NonNumberNonObjectButDefined.html +0 -177
  227. package/docs/types/ObjectWithNonNumberId.html +0 -184
  228. package/docs/types/ObjectWithNumberId.html +0 -184
  229. package/docs/types/ObjectWithoutId.html +0 -177
  230. package/docs/types/PriorityQueueComparator.html +0 -197
  231. package/docs/types/PriorityQueueDFSOrderPattern.html +0 -177
  232. package/docs/types/PriorityQueueOptions.html +0 -191
  233. package/docs/types/RBTreeNodeNested.html +0 -182
  234. package/docs/types/RBTreeOptions.html +0 -180
  235. package/docs/types/RestrictValById.html +0 -177
  236. package/docs/types/SegmentTreeNodeVal.html +0 -177
  237. package/docs/types/SpecifyOptional.html +0 -184
  238. package/docs/types/Thunk.html +0 -185
  239. package/docs/types/ToThunkFn.html +0 -185
  240. package/docs/types/TopologicalStatus.html +0 -177
  241. package/docs/types/TreeMultisetNodeNested.html +0 -182
  242. package/docs/types/TreeMultisetOptions.html +0 -180
  243. package/docs/types/TrlAsyncFn.html +0 -190
  244. package/docs/types/TrlFn.html +0 -190
  245. package/docs/types/Turning.html +0 -177
  246. package/docs/types/VertexId.html +0 -177
  247. package/docs/variables/THUNK_SYMBOL.html +0 -177
  248. package/rename_clear_files.sh +0 -29
  249. package/src/data-structures/binary-tree/aa-tree.ts +0 -1
  250. package/src/data-structures/binary-tree/abstract-binary-tree.ts +0 -1631
  251. package/src/data-structures/binary-tree/avl-tree.ts +0 -310
  252. package/src/data-structures/binary-tree/b-tree.ts +0 -1
  253. package/src/data-structures/binary-tree/binary-indexed-tree.ts +0 -76
  254. package/src/data-structures/binary-tree/binary-tree.ts +0 -47
  255. package/src/data-structures/binary-tree/bst.ts +0 -537
  256. package/src/data-structures/binary-tree/index.ts +0 -12
  257. package/src/data-structures/binary-tree/rb-tree.ts +0 -101
  258. package/src/data-structures/binary-tree/segment-tree.ts +0 -242
  259. package/src/data-structures/binary-tree/splay-tree.ts +0 -1
  260. package/src/data-structures/binary-tree/tree-multiset.ts +0 -700
  261. package/src/data-structures/binary-tree/two-three-tree.ts +0 -1
  262. package/src/data-structures/diagrams/README.md +0 -5
  263. package/src/data-structures/graph/abstract-graph.ts +0 -1040
  264. package/src/data-structures/graph/directed-graph.ts +0 -470
  265. package/src/data-structures/graph/index.ts +0 -4
  266. package/src/data-structures/graph/map-graph.ts +0 -129
  267. package/src/data-structures/graph/undirected-graph.ts +0 -274
  268. package/src/data-structures/hash/coordinate-map.ts +0 -67
  269. package/src/data-structures/hash/coordinate-set.ts +0 -56
  270. package/src/data-structures/hash/hash-table.ts +0 -1
  271. package/src/data-structures/hash/index.ts +0 -6
  272. package/src/data-structures/hash/pair.ts +0 -1
  273. package/src/data-structures/hash/tree-map.ts +0 -1
  274. package/src/data-structures/hash/tree-set.ts +0 -1
  275. package/src/data-structures/heap/heap.ts +0 -212
  276. package/src/data-structures/heap/index.ts +0 -3
  277. package/src/data-structures/heap/max-heap.ts +0 -31
  278. package/src/data-structures/heap/min-heap.ts +0 -32
  279. package/src/data-structures/index.ts +0 -11
  280. package/src/data-structures/linked-list/doubly-linked-list.ts +0 -573
  281. package/src/data-structures/linked-list/index.ts +0 -3
  282. package/src/data-structures/linked-list/singly-linked-list.ts +0 -501
  283. package/src/data-structures/linked-list/skip-linked-list.ts +0 -1
  284. package/src/data-structures/matrix/index.ts +0 -4
  285. package/src/data-structures/matrix/matrix.ts +0 -27
  286. package/src/data-structures/matrix/matrix2d.ts +0 -212
  287. package/src/data-structures/matrix/navigator.ts +0 -121
  288. package/src/data-structures/matrix/vector2d.ts +0 -316
  289. package/src/data-structures/priority-queue/index.ts +0 -3
  290. package/src/data-structures/priority-queue/max-priority-queue.ts +0 -56
  291. package/src/data-structures/priority-queue/min-priority-queue.ts +0 -57
  292. package/src/data-structures/priority-queue/priority-queue.ts +0 -359
  293. package/src/data-structures/queue/deque.ts +0 -297
  294. package/src/data-structures/queue/index.ts +0 -2
  295. package/src/data-structures/queue/queue.ts +0 -191
  296. package/src/data-structures/stack/index.ts +0 -1
  297. package/src/data-structures/stack/stack.ts +0 -98
  298. package/src/data-structures/tree/index.ts +0 -1
  299. package/src/data-structures/tree/tree.ts +0 -69
  300. package/src/data-structures/trie/index.ts +0 -1
  301. package/src/data-structures/trie/trie.ts +0 -225
  302. package/src/index.ts +0 -4
  303. package/src/interfaces/abstract-binary-tree.ts +0 -191
  304. package/src/interfaces/abstract-graph.ts +0 -31
  305. package/src/interfaces/avl-tree.ts +0 -25
  306. package/src/interfaces/binary-tree.ts +0 -6
  307. package/src/interfaces/bst.ts +0 -31
  308. package/src/interfaces/directed-graph.ts +0 -20
  309. package/src/interfaces/doubly-linked-list.ts +0 -1
  310. package/src/interfaces/heap.ts +0 -1
  311. package/src/interfaces/index.ts +0 -15
  312. package/src/interfaces/navigator.ts +0 -1
  313. package/src/interfaces/priority-queue.ts +0 -1
  314. package/src/interfaces/rb-tree.ts +0 -9
  315. package/src/interfaces/segment-tree.ts +0 -1
  316. package/src/interfaces/singly-linked-list.ts +0 -1
  317. package/src/interfaces/tree-multiset.ts +0 -7
  318. package/src/interfaces/undirected-graph.ts +0 -6
  319. package/src/types/data-structures/abstract-binary-tree.ts +0 -50
  320. package/src/types/data-structures/abstract-graph.ts +0 -11
  321. package/src/types/data-structures/avl-tree.ts +0 -5
  322. package/src/types/data-structures/binary-tree.ts +0 -5
  323. package/src/types/data-structures/bst.ts +0 -13
  324. package/src/types/data-structures/directed-graph.ts +0 -8
  325. package/src/types/data-structures/doubly-linked-list.ts +0 -1
  326. package/src/types/data-structures/heap.ts +0 -5
  327. package/src/types/data-structures/index.ts +0 -15
  328. package/src/types/data-structures/map-graph.ts +0 -1
  329. package/src/types/data-structures/navigator.ts +0 -13
  330. package/src/types/data-structures/priority-queue.ts +0 -9
  331. package/src/types/data-structures/rb-tree.ts +0 -8
  332. package/src/types/data-structures/segment-tree.ts +0 -1
  333. package/src/types/data-structures/singly-linked-list.ts +0 -1
  334. package/src/types/data-structures/tree-multiset.ts +0 -6
  335. package/src/types/helpers.ts +0 -1
  336. package/src/types/index.ts +0 -3
  337. package/src/types/utils/index.ts +0 -2
  338. package/src/types/utils/utils.ts +0 -6
  339. package/src/types/utils/validate-type.ts +0 -35
  340. package/src/utils/index.ts +0 -1
  341. package/src/utils/utils.ts +0 -79
  342. package/tsconfig.build.json +0 -33
package/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ # Data Structure Typed
2
+
1
3
  ![License](https://img.shields.io/badge/License-MIT-blue.svg)
2
4
  ![Language](https://img.shields.io/github/languages/top/zrwusa/data-structure-typed)
3
5
  ![GitHub release (latest by date)](https://img.shields.io/github/v/release/zrwusa/data-structure-typed)
@@ -5,36 +7,50 @@
5
7
  ![npm](https://aleen42.github.io/badges/src/npm.svg)
6
8
  ![eslint](https://aleen42.github.io/badges/src/eslint.svg)
7
9
 
8
- [//]: # (![Typescript](https://img.shields.io/github/package-json/dependency-version/zrwusa/data-structure-typed/dev/typescript))
10
+ ## Brief
9
11
 
10
- [//]: # (![TypeDoc](https://img.shields.io/github/package-json/dependency-version/zrwusa/data-structure-typed/dev/typedoc))
12
+ Data Structures of Javascript & TypeScript.
11
13
 
12
- [//]: # (![Total Downloads](https://img.shields.io/github/downloads/zrwusa/data-structure-typed/total))
14
+ ## Built-in classic algorithms
13
15
 
14
- ## Brief
15
- Data Structures of Javascript & TypeScript.
16
+ DFS(Depth-First Search), DFSIterative, BFS(Breadth-First Search), morris, Bellman-Ford Algorithm, Dijkstra's Algorithm,
17
+ Floyd-Warshall Algorithm, Tarjan's Algorithm.
16
18
 
17
- ## Built-in classic algorithms
18
- DFS(Depth-First Search), DFSIterative, BFS(Breadth-First Search),
19
- morris, Bellman-Ford Algorithm, Dijkstra's Algorithm, Floyd-Warshall Algorithm,
20
- Tarjan's Algorithm.
19
+ ## Installation and Usage
21
20
 
22
- ## install
23
21
  ### npm
22
+
24
23
  ```bash
25
24
  npm install data-structure-typed --save
26
25
  ```
26
+
27
27
  ### yarn
28
+
28
29
  ```bash
29
30
  yarn add data-structure-typed
30
31
  ```
32
+
31
33
  ### CDN
34
+
32
35
  ```html
36
+
33
37
  <script src="https://cdn.jsdelivr.net/npm/data-structure-typed/umd/bundle.min.js"></script>
34
38
  ```
35
- ```javascript
39
+
40
+ ```js
36
41
  const {AVLTree} = dataStructureTyped;
37
- const {Heap, MinHeap, SinglyLinkedList, Stack, AVLTreeNode, BST, Trie, DirectedGraph, DirectedVertex, TreeMultiset} = dataStructureTyped;
42
+ const {
43
+ Heap,
44
+ MinHeap,
45
+ SinglyLinkedList,
46
+ Stack,
47
+ AVLTreeNode,
48
+ BST,
49
+ Trie,
50
+ DirectedGraph,
51
+ DirectedVertex,
52
+ TreeMultiset
53
+ } = dataStructureTyped;
38
54
  ```
39
55
 
40
56
  ![](https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/examples/videos/webp_output/binary-tree-array-to-binary-tree.webp)
@@ -54,159 +70,168 @@ const {Heap, MinHeap, SinglyLinkedList, Stack, AVLTreeNode, BST, Trie, DirectedG
54
70
  <a href="https://github.com/zrwusa/vivid-algorithm" target="_blank">Examples Repository</a>
55
71
 
56
72
  ## Code Snippet
73
+
57
74
  ### Binary Search Tree (BST) snippet
75
+
58
76
  #### TS
59
- ```typescript
60
- import {BST, BSTNode} from 'data-structure-typed';
61
-
62
- const bst = new BST();
63
- bst.add(11);
64
- bst.add(3);
65
- bst.addMany([15, 1, 8, 13, 16, 2, 6, 9, 12, 14, 4, 7, 10, 5]);
66
- bst.size === 16; // true
67
- bst.has(6); // true
68
- const node6 = bst.get(6); // BSTNode
69
- bst.getHeight(6) === 2; // true
70
- bst.getHeight() === 5; // true
71
- bst.getDepth(6) === 3; // true
72
-
73
- bst.getLeftMost()?.id === 1; // true
74
-
75
- bst.remove(6);
76
- bst.get(6); // null
77
- bst.isAVLBalanced(); // true
78
- bst.BFS()[0] === 11; // true
79
-
80
-
81
- const objBST = new BST<BSTNode<{ id: number, keyA: number }>>();
82
- objBST.add(11, {id: 11, keyA: 11});
83
- objBST.add(3, {id: 3, keyA: 3});
84
-
85
- objBST.addMany([{id: 15, keyA: 15}, {id: 1, keyA: 1}, {id: 8, keyA: 8},
86
- {id: 13, keyA: 13}, {id: 16, keyA: 16}, {id: 2, keyA: 2},
87
- {id: 6, keyA: 6}, {id: 9, keyA: 9}, {id: 12, keyA: 12},
88
- {id: 14, keyA: 14}, {id: 4, keyA: 4}, {id: 7, keyA: 7},
89
- {id: 10, keyA: 10}, {id: 5, keyA: 5}]);
90
-
91
- objBST.remove(11);
77
+
78
+ ```ts
79
+ import {BST, BSTNode} from 'data-structure-typed';
80
+
81
+ const bst = new BST();
82
+ bst.add(11);
83
+ bst.add(3);
84
+ bst.addMany([15, 1, 8, 13, 16, 2, 6, 9, 12, 14, 4, 7, 10, 5]);
85
+ bst.size === 16; // true
86
+ bst.has(6); // true
87
+ const node6 = bst.get(6); // BSTNode
88
+ bst.getHeight(6) === 2; // true
89
+ bst.getHeight() === 5; // true
90
+ bst.getDepth(6) === 3; // true
91
+
92
+ bst.getLeftMost()?.id === 1; // true
93
+
94
+ bst.remove(6);
95
+ bst.get(6); // null
96
+ bst.isAVLBalanced(); // true
97
+ bst.BFS()[0] === 11; // true
98
+
99
+ const objBST = new BST<BSTNode<{ id: number, keyA: number }>>();
100
+ objBST.add(11, {id: 11, keyA: 11});
101
+ objBST.add(3, {id: 3, keyA: 3});
102
+
103
+ objBST.addMany([{id: 15, keyA: 15}, {id: 1, keyA: 1}, {id: 8, keyA: 8},
104
+ {id: 13, keyA: 13}, {id: 16, keyA: 16}, {id: 2, keyA: 2},
105
+ {id: 6, keyA: 6}, {id: 9, keyA: 9}, {id: 12, keyA: 12},
106
+ {id: 14, keyA: 14}, {id: 4, keyA: 4}, {id: 7, keyA: 7},
107
+ {id: 10, keyA: 10}, {id: 5, keyA: 5}]);
108
+
109
+ objBST.remove(11);
92
110
  ```
111
+
93
112
  #### JS
94
- ```javascript
95
- const {BST, BSTNode} = require('data-structure-typed');
96
-
97
- const bst = new BST();
98
- bst.add(11);
99
- bst.add(3);
100
- bst.addMany([15, 1, 8, 13, 16, 2, 6, 9, 12, 14, 4, 7, 10, 5]);
101
- bst.size === 16; // true
102
- bst.has(6); // true
103
- const node6 = bst.get(6);
104
- bst.getHeight(6) === 2; // true
105
- bst.getHeight() === 5; // true
106
- bst.getDepth(6) === 3; // true
107
- const leftMost = bst.getLeftMost();
108
- leftMost?.id === 1; // true
109
- expect(leftMost?.id).toBe(1);
110
- bst.remove(6);
111
- bst.get(6); // null
112
- bst.isAVLBalanced(); // true or false
113
- const bfsIDs = bst.BFS();
114
- bfsIDs[0] === 11; // true
115
- expect(bfsIDs[0]).toBe(11);
116
-
117
- const objBST = new BST();
118
- objBST.add(11, {id: 11, keyA: 11});
119
- objBST.add(3, {id: 3, keyA: 3});
120
-
121
- objBST.addMany([{id: 15, keyA: 15}, {id: 1, keyA: 1}, {id: 8, keyA: 8},
122
- {id: 13, keyA: 13}, {id: 16, keyA: 16}, {id: 2, keyA: 2},
123
- {id: 6, keyA: 6}, {id: 9, keyA: 9}, {id: 12, keyA: 12},
124
- {id: 14, keyA: 14}, {id: 4, keyA: 4}, {id: 7, keyA: 7},
125
- {id: 10, keyA: 10}, {id: 5, keyA: 5}]);
126
-
127
- objBST.remove(11);
128
-
129
-
130
- const avlTree = new AVLTree();
131
- avlTree.addMany([11, 3, 15, 1, 8, 13, 16, 2, 6, 9, 12, 14, 4, 7, 10, 5])
132
- avlTree.isAVLBalanced(); // true
133
- avlTree.remove(10);
134
- avlTree.isAVLBalanced(); // true
135
113
 
114
+ ```js
115
+ const {BST, BSTNode} = require('data-structure-typed');
116
+
117
+ const bst = new BST();
118
+ bst.add(11);
119
+ bst.add(3);
120
+ bst.addMany([15, 1, 8, 13, 16, 2, 6, 9, 12, 14, 4, 7, 10, 5]);
121
+ bst.size === 16; // true
122
+ bst.has(6); // true
123
+ const node6 = bst.get(6);
124
+ bst.getHeight(6) === 2; // true
125
+ bst.getHeight() === 5; // true
126
+ bst.getDepth(6) === 3; // true
127
+ const leftMost = bst.getLeftMost();
128
+ leftMost?.id === 1; // true
129
+ expect(leftMost?.id).toBe(1);
130
+ bst.remove(6);
131
+ bst.get(6); // null
132
+ bst.isAVLBalanced(); // true or false
133
+ const bfsIDs = bst.BFS();
134
+ bfsIDs[0] === 11; // true
135
+ expect(bfsIDs[0]).toBe(11);
136
+
137
+ const objBST = new BST();
138
+ objBST.add(11, {id: 11, keyA: 11});
139
+ objBST.add(3, {id: 3, keyA: 3});
140
+
141
+ objBST.addMany([{id: 15, keyA: 15}, {id: 1, keyA: 1}, {id: 8, keyA: 8},
142
+ {id: 13, keyA: 13}, {id: 16, keyA: 16}, {id: 2, keyA: 2},
143
+ {id: 6, keyA: 6}, {id: 9, keyA: 9}, {id: 12, keyA: 12},
144
+ {id: 14, keyA: 14}, {id: 4, keyA: 4}, {id: 7, keyA: 7},
145
+ {id: 10, keyA: 10}, {id: 5, keyA: 5}]);
146
+
147
+ objBST.remove(11);
148
+
149
+ const avlTree = new AVLTree();
150
+ avlTree.addMany([11, 3, 15, 1, 8, 13, 16, 2, 6, 9, 12, 14, 4, 7, 10, 5])
151
+ avlTree.isAVLBalanced(); // true
152
+ avlTree.remove(10);
153
+ avlTree.isAVLBalanced(); // true
136
154
  ```
137
155
 
138
156
  ### AVLTree snippet
157
+
139
158
  #### TS
140
- ```typescript
141
- import {AVLTree} from 'data-structure-typed';
142
159
 
143
- const avlTree = new AVLTree();
144
- avlTree.addMany([11, 3, 15, 1, 8, 13, 16, 2, 6, 9, 12, 14, 4, 7, 10, 5])
145
- avlTree.isAVLBalanced(); // true
146
- avlTree.remove(10);
147
- avlTree.isAVLBalanced(); // true
160
+ ```ts
161
+ import {AVLTree} from 'data-structure-typed';
148
162
 
163
+ const avlTree = new AVLTree();
164
+ avlTree.addMany([11, 3, 15, 1, 8, 13, 16, 2, 6, 9, 12, 14, 4, 7, 10, 5])
165
+ avlTree.isAVLBalanced(); // true
166
+ avlTree.remove(10);
167
+ avlTree.isAVLBalanced(); // true
149
168
  ```
169
+
150
170
  #### JS
151
- ```javascript
152
- const {AVLTree} = require('data-structure-typed');
153
171
 
154
- const avlTree = new AVLTree();
155
- avlTree.addMany([11, 3, 15, 1, 8, 13, 16, 2, 6, 9, 12, 14, 4, 7, 10, 5])
156
- avlTree.isAVLBalanced(); // true
157
- avlTree.remove(10);
158
- avlTree.isAVLBalanced(); // true
172
+ ```js
173
+ const {AVLTree} = require('data-structure-typed');
159
174
 
175
+ const avlTree = new AVLTree();
176
+ avlTree.addMany([11, 3, 15, 1, 8, 13, 16, 2, 6, 9, 12, 14, 4, 7, 10, 5])
177
+ avlTree.isAVLBalanced(); // true
178
+ avlTree.remove(10);
179
+ avlTree.isAVLBalanced(); // true
160
180
  ```
161
181
 
162
182
  ### Directed Graph simple snippet
183
+
163
184
  #### TS or JS
164
- ```typescript
185
+
186
+ ```ts
165
187
  import {DirectedGraph} from 'data-structure-typed';
166
188
 
167
- const graph = new DirectedGraph();
168
-
169
- graph.addVertex('A');
170
- graph.addVertex('B');
171
-
172
- graph.hasVertex('A'); // true
173
- graph.hasVertex('B'); // true
174
- graph.hasVertex('C'); // false
175
-
176
- graph.addEdge('A', 'B');
177
- graph.hasEdge('A', 'B'); // true
178
- graph.hasEdge('B', 'A'); // false
179
-
180
- graph.removeEdgeSrcToDest('A', 'B');
181
- graph.hasEdge('A', 'B'); // false
182
-
183
- graph.addVertex('C');
184
-
185
- graph.addEdge('A', 'B');
186
- graph.addEdge('B', 'C');
187
-
188
- const topologicalOrderIds = graph.topologicalSort(); // ['A', 'B', 'C']
189
+ const graph = new DirectedGraph();
190
+
191
+ graph.addVertex('A');
192
+ graph.addVertex('B');
193
+
194
+ graph.hasVertex('A'); // true
195
+ graph.hasVertex('B'); // true
196
+ graph.hasVertex('C'); // false
197
+
198
+ graph.addEdge('A', 'B');
199
+ graph.hasEdge('A', 'B'); // true
200
+ graph.hasEdge('B', 'A'); // false
201
+
202
+ graph.removeEdgeSrcToDest('A', 'B');
203
+ graph.hasEdge('A', 'B'); // false
204
+
205
+ graph.addVertex('C');
206
+
207
+ graph.addEdge('A', 'B');
208
+ graph.addEdge('B', 'C');
209
+
210
+ const topologicalOrderIds = graph.topologicalSort(); // ['A', 'B', 'C']
189
211
  ```
190
212
 
191
213
  ### Undirected Graph snippet
214
+
192
215
  #### TS or JS
193
- ```typescript
216
+
217
+ ```ts
194
218
  import {UndirectedGraph} from 'data-structure-typed';
195
219
 
196
- const graph = new UndirectedGraph();
197
- graph.addVertex('A');
198
- graph.addVertex('B');
199
- graph.addVertex('C');
200
- graph.addVertex('D');
201
- graph.removeVertex('C');
202
- graph.addEdge('A', 'B');
203
- graph.addEdge('B', 'D');
204
-
205
- const dijkstraResult = graph.dijkstra('A');
206
- Array.from(dijkstraResult?.seen ?? []).map(vertex => vertex.id) // ['A', 'B', 'D']
220
+ const graph = new UndirectedGraph();
221
+ graph.addVertex('A');
222
+ graph.addVertex('B');
223
+ graph.addVertex('C');
224
+ graph.addVertex('D');
225
+ graph.removeVertex('C');
226
+ graph.addEdge('A', 'B');
227
+ graph.addEdge('B', 'D');
228
+
229
+ const dijkstraResult = graph.dijkstra('A');
230
+ Array.from(dijkstraResult?.seen ?? []).map(vertex => vertex.id) // ['A', 'B', 'D']
207
231
  ```
208
232
 
209
233
  ## Data Structures
234
+
210
235
  <table>
211
236
  <thead>
212
237
  <tr>
@@ -330,20 +355,6 @@ import {UndirectedGraph} from 'data-structure-typed';
330
355
  <td><a href="https://data-structure-typed-docs.vercel.app/classes/Stack.html"><span>Stack</span></a></td>
331
356
  <td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>
332
357
  </tr>
333
-
334
- [//]: # (<tr>)
335
-
336
- [//]: # (<td>Hash</td>)
337
-
338
- [//]: # (<td></td>)
339
-
340
- [//]: # (<td></td>)
341
-
342
- [//]: # (<td><a href="https://data-structure-typed-docs.vercel.app/classes/HashTable.html"><span>HashTable</span></a></td>)
343
-
344
- [//]: # (<td><img src="https://raw.githubusercontent.com/zrwusa/assets/master/images/data-structure-typed/assets/tick.svg" alt=""></td>)
345
-
346
- [//]: # (</tr>)
347
358
  <tr>
348
359
  <td>Coordinate Set</td>
349
360
  <td></td>
@@ -396,113 +407,16 @@ import {UndirectedGraph} from 'data-structure-typed';
396
407
  </tbody>
397
408
  </table>
398
409
 
399
- [//]: # (## API docs)
400
-
401
- [//]: # (<ul>)
402
-
403
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/AVLTree.html" rel="nofollow"><span>AVLTree</span></a></li>)
404
-
405
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/AVLTreeNode.html" rel="nofollow"><span>AVLTreeNode</span></a></li>)
406
-
407
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/AbstractEdge.html" rel="nofollow"><span>AbstractEdge</span></a></li>)
408
-
409
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/AbstractGraph.html" rel="nofollow"><span>AbstractGraph</span></a></li>)
410
-
411
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/AbstractVertex.html" rel="nofollow"><span>AbstractVertex</span></a></li>)
412
-
413
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/ArrayDeque.html" rel="nofollow"><span>ArrayDeque</span></a></li>)
414
-
415
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/BST.html" rel="nofollow"><span>BST</span></a></li>)
416
-
417
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/BSTNode.html" rel="nofollow"><span>BSTNode</span></a></li>)
418
-
419
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/BinaryIndexedTree.html" rel="nofollow"><span>BinaryIndexedTree</span></a></li>)
420
-
421
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/BinaryTree.html" rel="nofollow"><span>BinaryTree</span></a></li>)
422
-
423
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/BinaryTreeNode.html" rel="nofollow"><span>BinaryTreeNode</span></a></li>)
424
-
425
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/Character.html" rel="nofollow"><span>Character</span></a></li>)
426
-
427
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/CoordinateMap.html" rel="nofollow"><span>CoordinateMap</span></a></li>)
428
-
429
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/CoordinateSet.html" rel="nofollow"><span>CoordinateSet</span></a></li>)
430
-
431
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/Deque.html" rel="nofollow"><span>Deque</span></a></li>)
432
-
433
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/DirectedEdge.html" rel="nofollow"><span>DirectedEdge</span></a></li>)
434
-
435
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/DirectedGraph.html" rel="nofollow"><span>DirectedGraph</span></a></li>)
436
-
437
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/DirectedVertex.html" rel="nofollow"><span>DirectedVertex</span></a></li>)
438
-
439
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/DoublyLinkedList.html" rel="nofollow"><span>DoublyLinkedList</span></a></li>)
440
-
441
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/DoublyLinkedListNode.html" rel="nofollow"><span>DoublyLinkedListNode</span></a></li>)
442
-
443
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/Heap.html" rel="nofollow"><span>Heap</span></a></li>)
444
-
445
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/Matrix2D.html" rel="nofollow"><span>Matrix2D</span></a></li>)
446
-
447
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/MatrixNTI2D.html" rel="nofollow"><span>MatrixNTI2D</span></a></li>)
448
-
449
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/MaxHeap.html" rel="nofollow"><span>MaxHeap</span></a></li>)
450
-
451
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/MaxPriorityQueue.html" rel="nofollow"><span>MaxPriorityQueue</span></a></li>)
452
-
453
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/MinHeap.html" rel="nofollow"><span>MinHeap</span></a></li>)
454
-
455
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/MinPriorityQueue.html" rel="nofollow"><span>MinPriorityQueue</span></a></li>)
456
-
457
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/Navigator.html" rel="nofollow"><span>Navigator</span></a></li>)
458
-
459
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/ObjectDeque.html" rel="nofollow"><span>ObjectDeque</span></a></li>)
460
-
461
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/PriorityQueue.html" rel="nofollow"><span>PriorityQueue</span></a></li>)
462
-
463
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/Queue.html" rel="nofollow"><span>Queue</span></a></li>)
464
-
465
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/SegmentTree.html" rel="nofollow"><span>SegmentTree</span></a></li>)
466
-
467
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/SegmentTreeNode.html" rel="nofollow"><span>SegmentTreeNode</span></a></li>)
468
-
469
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/SinglyLinkedList.html" rel="nofollow"><span>SinglyLinkedList</span></a></li>)
470
-
471
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/SinglyLinkedListNode.html" rel="nofollow"><span>SinglyLinkedListNode</span></a></li>)
472
-
473
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/Stack.html" rel="nofollow"><span>Stack</span></a></li>)
474
-
475
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/TreeMultiSet.html" rel="nofollow"><span>TreeMultiSet</span></a></li>)
476
-
477
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/Trie.html" rel="nofollow"><span>Trie</span></a></li>)
478
-
479
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/TrieNode.html" rel="nofollow"><span>TrieNode</span></a></li>)
480
-
481
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/UndirectedEdge.html" rel="nofollow"><span>UndirectedEdge</span></a></li>)
482
-
483
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/UndirectedGraph.html" rel="nofollow"><span>UndirectedGraph</span></a></li>)
484
-
485
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/UndirectedVertex.html" rel="nofollow"><span>UndirectedVertex</span></a></li>)
486
-
487
- [//]: # (<li><a href="https://data-structure-typed-docs.vercel.app/classes/Vector2D.html" rel="nofollow"><span>Vector2D</span></a></li>)
488
-
489
- [//]: # (</ul>)
490
-
491
-
492
- [//]: # (![Statements]&#40;https://img.shields.io/badge/statements-55.31%25-red.svg?style=flat&#41;)
493
-
494
- [//]: # (![Branches]&#40;https://img.shields.io/badge/branches-47.04%25-red.svg?style=flat&#41;)
495
-
496
- [//]: # (![Functions]&#40;https://img.shields.io/badge/functions-48.29%25-red.svg?style=flat&#41;)
497
-
498
- [//]: # (![Lines]&#40;https://img.shields.io/badge/lines-56.92%25-red.svg?style=flat&#41;)
499
-
500
410
  ## Code design
501
- By strictly adhering to object-oriented design (BinaryTree -> BST -> AVLTree -> TreeMultiset), you can seamlessly inherit the existing data structures to implement the customized ones you need. Object-oriented design stands as the optimal approach to data structure design.
411
+
412
+ By strictly adhering to object-oriented design (BinaryTree -> BST -> AVLTree -> TreeMultiset), you can seamlessly
413
+ inherit the existing data structures to implement the customized ones you need. Object-oriented design stands as the
414
+ optimal approach to data structure design.
502
415
 
503
416
  ## Complexities
504
417
 
505
418
  ### performance of Big O
419
+
506
420
  <table>
507
421
  <thead>
508
422
  <tr>
@@ -567,6 +481,7 @@ By strictly adhering to object-oriented design (BinaryTree -> BST -> AVLTree ->
567
481
  </table>
568
482
 
569
483
  ### Data Structure Complexity
484
+
570
485
  <table>
571
486
  <thead>
572
487
  <tr>
@@ -663,6 +578,7 @@ By strictly adhering to object-oriented design (BinaryTree -> BST -> AVLTree ->
663
578
  </table>
664
579
 
665
580
  ### Sorting Complexity
581
+
666
582
  <table>
667
583
  <thead>
668
584
  <tr>
@@ -760,8 +676,252 @@ By strictly adhering to object-oriented design (BinaryTree -> BST -> AVLTree ->
760
676
  </tbody>
761
677
  </table>
762
678
 
763
- [//]: # (![overview diagram]&#40;https://github.com/zrwusa/assets/blob/master/images/data-structure-typed/assets/overview-diagram-of-data-structures.png?raw=true&#41;)
764
-
765
- ![complexities](https://github.com/zrwusa/assets/blob/master/images/data-structure-typed/assets/complexities-diff.jpg?raw=true)
766
679
 
767
- ![complexities of data structures](https://github.com/zrwusa/assets/blob/master/images/data-structure-typed/assets/data-structure-complexities.jpg?raw=true)
680
+ <table>
681
+ <tr>
682
+ <th>Data Structure</th>
683
+ <th>C++ STL</th>
684
+ <th>java.util</th>
685
+ <th>Python collections</th>
686
+ </tr>
687
+ <tr>
688
+ <td>Dynamic Array (ArrayList)</td>
689
+ <td>std::vector&lt;T&gt;</td>
690
+ <td>ArrayList&lt;E&gt;</td>
691
+ <td>list</td>
692
+ </tr>
693
+ <tr>
694
+ <td>Linked List</td>
695
+ <td>std::list&lt;T&gt;</td>
696
+ <td>LinkedList&lt;E&gt;</td>
697
+ <td>deque</td>
698
+ </tr>
699
+ <tr>
700
+ <td>Set</td>
701
+ <td>std::set&lt;T&gt;</td>
702
+ <td>HashSet&lt;E&gt;</td>
703
+ <td>set</td>
704
+ </tr>
705
+ <tr>
706
+ <td>Map</td>
707
+ <td>std::map&lt;K, V&gt;</td>
708
+ <td>HashMap&lt;K, V&gt;</td>
709
+ <td>dict</td>
710
+ </tr>
711
+ <tr>
712
+ <td>Stack</td>
713
+ <td>std::stack&lt;T&gt;</td>
714
+ <td>Stack&lt;E&gt;</td>
715
+ <td>N/A</td>
716
+ </tr>
717
+ <tr>
718
+ <td>Queue</td>
719
+ <td>std::queue&lt;T&gt;</td>
720
+ <td>LinkedList&lt;E&gt;</td>
721
+ <td>N/A</td>
722
+ </tr>
723
+ <tr>
724
+ <td>Priority Queue</td>
725
+ <td>std::priority_queue&lt;T&gt;</td>
726
+ <td>PriorityQueue&lt;E&gt;</td>
727
+ <td>N/A</td>
728
+ </tr>
729
+ <tr>
730
+ <td>Hash Table</td>
731
+ <td>N/A</td>
732
+ <td>N/A</td>
733
+ <td>defaultdict, Counter, etc.</td>
734
+ </tr>
735
+ <tr>
736
+ <td>Deque</td>
737
+ <td>std::deque&lt;T&gt;</td>
738
+ <td>N/A</td>
739
+ <td>N/A</td>
740
+ </tr>
741
+ <tr>
742
+ <td>Multiset</td>
743
+ <td>std::multiset&lt;T&gt;</td>
744
+ <td>N/A</td>
745
+ <td>N/A</td>
746
+ </tr>
747
+ <tr>
748
+ <td>Multimap</td>
749
+ <td>std::multimap&lt;K, V&gt;</td>
750
+ <td>N/A</td>
751
+ <td>N/A</td>
752
+ </tr>
753
+ <tr>
754
+ <td>Unordered Set</td>
755
+ <td>std::unordered_set&lt;T&gt;</td>
756
+ <td>HashSet&lt;E&gt;</td>
757
+ <td>N/A</td>
758
+ </tr>
759
+ <tr>
760
+ <td>Unordered Map</td>
761
+ <td>std::unordered_map&lt;K, V&gt;</td>
762
+ <td>HashMap&lt;K, V&gt;</td>
763
+ <td>N/A</td>
764
+ </tr>
765
+ <tr>
766
+ <td>Bitset</td>
767
+ <td>std::bitset&lt;N&gt;</td>
768
+ <td>N/A</td>
769
+ <td>N/A</td>
770
+ </tr>
771
+ <tr>
772
+ <td>Ordered Dictionary (OrderedDict)</td>
773
+ <td>N/A</td>
774
+ <td>N/A</td>
775
+ <td>OrderedDict</td>
776
+ </tr>
777
+ <tr>
778
+ <td>User-Defined Dictionary</td>
779
+ <td>N/A</td>
780
+ <td>N/A</td>
781
+ <td>UserDict</td>
782
+ </tr>
783
+ <tr>
784
+ <td>User-Defined List</td>
785
+ <td>N/A</td>
786
+ <td>N/A</td>
787
+ <td>UserList</td>
788
+ </tr>
789
+ <tr>
790
+ <td>User-Defined Set</td>
791
+ <td>N/A</td>
792
+ <td>N/A</td>
793
+ <td>UserSet</td>
794
+ </tr>
795
+ <tr>
796
+ <td>Double-Ended Queue (Deque)</td>
797
+ <td>std::deque&lt;T&gt;</td>
798
+ <td>N/A</td>
799
+ <td>N/A</td>
800
+ </tr>
801
+ <tr>
802
+ <td>Skip List</td>
803
+ <td>N/A</td>
804
+ <td>N/A</td>
805
+ <td>N/A</td>
806
+ </tr>
807
+ <tr>
808
+ <td>Circular Queue</td>
809
+ <td>N/A</td>
810
+ <td>N/A</td>
811
+ <td>N/A</td>
812
+ </tr>
813
+ <tr>
814
+ <td>Bit Array</td>
815
+ <td>N/A</td>
816
+ <td>N/A</td>
817
+ <td>N/A</td>
818
+ </tr>
819
+ <tr>
820
+ <td>Bloom Filter</td>
821
+ <td>N/A</td>
822
+ <td>N/A</td>
823
+ <td>N/A</td>
824
+ </tr>
825
+ <tr>
826
+ <td>Linked Hash Set</td>
827
+ <td>N/A</td>
828
+ <td>LinkedHashSet&lt;E&gt;</td>
829
+ <td>N/A</td>
830
+ </tr>
831
+ <tr>
832
+ <td>Linked Hash Map</td>
833
+ <td>N/A</td>
834
+ <td>LinkedHashMap&lt;K, V&gt;</td>
835
+ <td>N/A</td>
836
+ </tr>
837
+ <tr>
838
+ <td>Sorted Set</td>
839
+ <td>N/A</td>
840
+ <td>TreeSet&lt;E&gt;</td>
841
+ <td>N/A</td>
842
+ </tr>
843
+ <tr>
844
+ <td>Sorted Map</td>
845
+ <td>N/A</td>
846
+ <td>TreeMap&lt;K, V&gt;</td>
847
+ <td>N/A</td>
848
+ </tr>
849
+ <tr>
850
+ <td>Tree Set</td>
851
+ <td>N/A</td>
852
+ <td>N/A</td>
853
+ <td>N/A</td>
854
+ </tr>
855
+ <tr>
856
+ <td>Tree Map</td>
857
+ <td>N/A</td>
858
+ <td>N/A</td>
859
+ <td>N/A</td>
860
+ </tr>
861
+ <tr>
862
+ <td>Persistent Collections</td>
863
+ <td>N/A</td>
864
+ <td>N/A</td>
865
+ <td>N/A</td>
866
+ </tr>
867
+ <tr>
868
+ <td>std::unordered_multiset</td>
869
+ <td>std::unordered_multiset&lt;T&gt;</td>
870
+ <td>N/A</td>
871
+ <td>N/A</td>
872
+ </tr>
873
+ <tr>
874
+ <td>std::unordered_multimap</td>
875
+ <td>std::unordered_multimap&lt;K, V&gt;</td>
876
+ <td>N/A</td>
877
+ <td>N/A</td>
878
+ </tr>
879
+ <tr>
880
+ <td>N/A</td>
881
+ <td>TreeSet&lt;E&gt;</td>
882
+ <td>TreeSet&lt;E&gt;</td>
883
+ <td>N/A</td>
884
+ </tr>
885
+ <tr>
886
+ <td>N/A</td>
887
+ <td>TreeMap&lt;K, V&gt;</td>
888
+ <td>TreeMap&lt;K, V&gt;</td>
889
+ <td>N/A</td>
890
+ </tr>
891
+ <tr>
892
+ <td>N/A</td>
893
+ <td>LinkedBlockingQueue&lt;E&gt;</td>
894
+ <td>N/A</td>
895
+ <td>N/A</td>
896
+ </tr>
897
+ <tr>
898
+ <td>N/A</td>
899
+ <td>ConcurrentHashMap&lt;K, V&gt;</td>
900
+ <td>N/A</td>
901
+ <td>N/A</td>
902
+ </tr>
903
+ <tr>
904
+ <td>N/A</td>
905
+ <td>N/A</td>
906
+ <td>namedtuple</td>
907
+ <td>N/A</td>
908
+ </tr>
909
+ <tr>
910
+ <td>N/A</td>
911
+ <td>N/A</td>
912
+ <td>ChainMap</td>
913
+ <td>N/A</td>
914
+ </tr>
915
+ <tr>
916
+ <td>N/A</td>
917
+ <td>N/A</td>
918
+ <td>defaultdict</td>
919
+ <td>N/A</td>
920
+ </tr>
921
+ <tr>
922
+ <td>N/A</td>
923
+ <td>N/A</td>
924
+ <td>Counter</td>
925
+ <td>N/A</td>
926
+ </tr>
927
+ </table>