@raikuxq/alg-ds 1.2.4 → 2.0.0

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 (189) hide show
  1. package/README.md +0 -25
  2. package/lib/index.d.ts +1216 -3
  3. package/lib/index.mjs +1 -0
  4. package/package.json +78 -72
  5. package/lib/app/algorithms/binary-search.d.ts +0 -5
  6. package/lib/app/algorithms/binary-search.js +0 -27
  7. package/lib/app/algorithms/factorial.d.ts +0 -9
  8. package/lib/app/algorithms/factorial.js +0 -17
  9. package/lib/app/algorithms/fibonacci.d.ts +0 -9
  10. package/lib/app/algorithms/fibonacci.js +0 -17
  11. package/lib/app/algorithms/graph/iterator/AbstractGraphIterator.d.ts +0 -39
  12. package/lib/app/algorithms/graph/iterator/AbstractGraphIterator.js +0 -87
  13. package/lib/app/algorithms/graph/iterator/GraphIteratorBFS.d.ts +0 -28
  14. package/lib/app/algorithms/graph/iterator/GraphIteratorBFS.js +0 -70
  15. package/lib/app/algorithms/graph/iterator/GraphIteratorDFS.d.ts +0 -28
  16. package/lib/app/algorithms/graph/iterator/GraphIteratorDFS.js +0 -70
  17. package/lib/app/algorithms/graph/iterator/GraphIteratorDijkstra.d.ts +0 -32
  18. package/lib/app/algorithms/graph/iterator/GraphIteratorDijkstra.js +0 -97
  19. package/lib/app/algorithms/graph/iterator-strategy/BFSIterationStrategy.d.ts +0 -6
  20. package/lib/app/algorithms/graph/iterator-strategy/BFSIterationStrategy.js +0 -13
  21. package/lib/app/algorithms/graph/iterator-strategy/DFSIterationStrategy.d.ts +0 -6
  22. package/lib/app/algorithms/graph/iterator-strategy/DFSIterationStrategy.js +0 -13
  23. package/lib/app/algorithms/graph/iterator-strategy/DijkstraIterationStrategy.d.ts +0 -6
  24. package/lib/app/algorithms/graph/iterator-strategy/DijkstraIterationStrategy.js +0 -13
  25. package/lib/app/algorithms/graph/presenter/presenterAdjacencyLists.d.ts +0 -19
  26. package/lib/app/algorithms/graph/presenter/presenterAdjacencyLists.js +0 -28
  27. package/lib/app/algorithms/graph/presenter/presenterAdjacencyMatrix.d.ts +0 -32
  28. package/lib/app/algorithms/graph/presenter/presenterAdjacencyMatrix.js +0 -48
  29. package/lib/app/algorithms/graph/searching/hasPath.d.ts +0 -9
  30. package/lib/app/algorithms/graph/searching/hasPath.js +0 -30
  31. package/lib/app/algorithms/graph/searching/shortestPath.d.ts +0 -9
  32. package/lib/app/algorithms/graph/searching/shortestPath.js +0 -30
  33. package/lib/app/algorithms/graph/transposing/transposeDirectedGraph.d.ts +0 -2
  34. package/lib/app/algorithms/graph/transposing/transposeDirectedGraph.js +0 -14
  35. package/lib/app/algorithms/memoize.d.ts +0 -5
  36. package/lib/app/algorithms/memoize.js +0 -22
  37. package/lib/app/algorithms/sorts/bubble-sort.d.ts +0 -9
  38. package/lib/app/algorithms/sorts/bubble-sort.js +0 -23
  39. package/lib/app/algorithms/sorts/insertion-sort.d.ts +0 -9
  40. package/lib/app/algorithms/sorts/insertion-sort.js +0 -25
  41. package/lib/app/algorithms/sorts/merge-sort.d.ts +0 -9
  42. package/lib/app/algorithms/sorts/merge-sort.js +0 -61
  43. package/lib/app/algorithms/sorts/quick-sort.d.ts +0 -9
  44. package/lib/app/algorithms/sorts/quick-sort.js +0 -45
  45. package/lib/app/algorithms/sorts/select-sort.d.ts +0 -9
  46. package/lib/app/algorithms/sorts/select-sort.js +0 -20
  47. package/lib/app/algorithms/transpose-matrix.d.ts +0 -6
  48. package/lib/app/algorithms/transpose-matrix.js +0 -19
  49. package/lib/app/constants.d.ts +0 -2
  50. package/lib/app/constants.js +0 -6
  51. package/lib/app/data-structures/BinaryTree/AbstractBinaryTree/AbstractBinaryNode.d.ts +0 -15
  52. package/lib/app/data-structures/BinaryTree/AbstractBinaryTree/AbstractBinaryNode.js +0 -53
  53. package/lib/app/data-structures/BinaryTree/AbstractBinaryTree/AbstractBinaryTree.d.ts +0 -60
  54. package/lib/app/data-structures/BinaryTree/AbstractBinaryTree/AbstractBinaryTree.js +0 -35
  55. package/lib/app/data-structures/BinaryTree/BinarySearchTree/BinarySearchNode.d.ts +0 -13
  56. package/lib/app/data-structures/BinaryTree/BinarySearchTree/BinarySearchNode.js +0 -59
  57. package/lib/app/data-structures/BinaryTree/BinarySearchTree/BinarySearchTree.d.ts +0 -75
  58. package/lib/app/data-structures/BinaryTree/BinarySearchTree/BinarySearchTree.js +0 -276
  59. package/lib/app/data-structures/BinaryTree/RandBinarySearchTree/RandBinarySearchNode.d.ts +0 -16
  60. package/lib/app/data-structures/BinaryTree/RandBinarySearchTree/RandBinarySearchNode.js +0 -70
  61. package/lib/app/data-structures/BinaryTree/RandBinarySearchTree/RandBinarySearchTree.d.ts +0 -58
  62. package/lib/app/data-structures/BinaryTree/RandBinarySearchTree/RandBinarySearchTree.js +0 -236
  63. package/lib/app/data-structures/BinaryTree/_helpers/createBinaryTree.d.ts +0 -6
  64. package/lib/app/data-structures/BinaryTree/_helpers/createBinaryTree.js +0 -22
  65. package/lib/app/data-structures/Graph/AbstractGraph.d.ts +0 -84
  66. package/lib/app/data-structures/Graph/AbstractGraph.js +0 -143
  67. package/lib/app/data-structures/Graph/DirectedGraph.d.ts +0 -27
  68. package/lib/app/data-structures/Graph/DirectedGraph.js +0 -89
  69. package/lib/app/data-structures/Graph/GraphEdge.d.ts +0 -16
  70. package/lib/app/data-structures/Graph/GraphEdge.js +0 -43
  71. package/lib/app/data-structures/Graph/UndirectedGraph.d.ts +0 -31
  72. package/lib/app/data-structures/Graph/UndirectedGraph.js +0 -106
  73. package/lib/app/data-structures/Graph/_helpers/createGraph.d.ts +0 -6
  74. package/lib/app/data-structures/Graph/_helpers/createGraph.js +0 -22
  75. package/lib/app/data-structures/Graph/_helpers/createGraphFromMatrix.d.ts +0 -7
  76. package/lib/app/data-structures/Graph/_helpers/createGraphFromMatrix.js +0 -42
  77. package/lib/app/data-structures/Graph/_helpers/generateRandomGraph.d.ts +0 -4
  78. package/lib/app/data-structures/Graph/_helpers/generateRandomGraph.js +0 -67
  79. package/lib/app/data-structures/HashTable/HashTable.d.ts +0 -73
  80. package/lib/app/data-structures/HashTable/HashTable.js +0 -171
  81. package/lib/app/data-structures/HashTable/HashTableNode.d.ts +0 -11
  82. package/lib/app/data-structures/HashTable/HashTableNode.js +0 -39
  83. package/lib/app/data-structures/LinkedList/AbstractLinkedList/AbstractLinkedList.d.ts +0 -134
  84. package/lib/app/data-structures/LinkedList/AbstractLinkedList/AbstractLinkedList.js +0 -247
  85. package/lib/app/data-structures/LinkedList/AbstractLinkedList/AbstractLinkedNode.d.ts +0 -20
  86. package/lib/app/data-structures/LinkedList/AbstractLinkedList/AbstractLinkedNode.js +0 -41
  87. package/lib/app/data-structures/LinkedList/DoubleLinkedList/DoubleLinkedList.d.ts +0 -42
  88. package/lib/app/data-structures/LinkedList/DoubleLinkedList/DoubleLinkedList.js +0 -98
  89. package/lib/app/data-structures/LinkedList/DoubleLinkedList/DoubleLinkedNode.d.ts +0 -25
  90. package/lib/app/data-structures/LinkedList/DoubleLinkedList/DoubleLinkedNode.js +0 -65
  91. package/lib/app/data-structures/LinkedList/DoubleLinkedList/IterableDoubleLinkedList.d.ts +0 -18
  92. package/lib/app/data-structures/LinkedList/DoubleLinkedList/IterableDoubleLinkedList.js +0 -86
  93. package/lib/app/data-structures/LinkedList/SingleLinkedList/IterableSingleLinkedList.d.ts +0 -18
  94. package/lib/app/data-structures/LinkedList/SingleLinkedList/IterableSingleLinkedList.js +0 -68
  95. package/lib/app/data-structures/LinkedList/SingleLinkedList/SingleLinkedList.d.ts +0 -46
  96. package/lib/app/data-structures/LinkedList/SingleLinkedList/SingleLinkedList.js +0 -103
  97. package/lib/app/data-structures/LinkedList/SingleLinkedList/SingleLinkedNode.d.ts +0 -7
  98. package/lib/app/data-structures/LinkedList/SingleLinkedList/SingleLinkedNode.js +0 -29
  99. package/lib/app/data-structures/LinkedList/_helpers/createLinkedList.d.ts +0 -3
  100. package/lib/app/data-structures/LinkedList/_helpers/createLinkedList.js +0 -34
  101. package/lib/app/data-structures/LoopedArray/LoopedArray.d.ts +0 -86
  102. package/lib/app/data-structures/LoopedArray/LoopedArray.js +0 -165
  103. package/lib/app/data-structures/Queue/Queue.d.ts +0 -50
  104. package/lib/app/data-structures/Queue/Queue.js +0 -85
  105. package/lib/app/data-structures/Stack/Stack.d.ts +0 -50
  106. package/lib/app/data-structures/Stack/Stack.js +0 -85
  107. package/lib/app/exceptions/CollectionIsEmptyException.d.ts +0 -4
  108. package/lib/app/exceptions/CollectionIsEmptyException.js +0 -28
  109. package/lib/app/exceptions/CollectionIsFullException.d.ts +0 -4
  110. package/lib/app/exceptions/CollectionIsFullException.js +0 -28
  111. package/lib/app/exceptions/IndexOutOfBoundsException.d.ts +0 -4
  112. package/lib/app/exceptions/IndexOutOfBoundsException.js +0 -28
  113. package/lib/app/exceptions/IsAlreadyExistsException.d.ts +0 -4
  114. package/lib/app/exceptions/IsAlreadyExistsException.js +0 -28
  115. package/lib/app/exceptions/IsNotFoundException.d.ts +0 -4
  116. package/lib/app/exceptions/IsNotFoundException.js +0 -28
  117. package/lib/app/exceptions/ValueOutOfRangeException.d.ts +0 -4
  118. package/lib/app/exceptions/ValueOutOfRangeException.js +0 -28
  119. package/lib/app/exceptions/base/IllegalArgumentException.d.ts +0 -3
  120. package/lib/app/exceptions/base/IllegalArgumentException.js +0 -27
  121. package/lib/app/exceptions/base/IllegalStateException.d.ts +0 -3
  122. package/lib/app/exceptions/base/IllegalStateException.js +0 -27
  123. package/lib/app/types/EnumBinarySearchTreeType.d.ts +0 -4
  124. package/lib/app/types/EnumBinarySearchTreeType.js +0 -9
  125. package/lib/app/types/EnumGraphTraversalType.d.ts +0 -5
  126. package/lib/app/types/EnumGraphTraversalType.js +0 -10
  127. package/lib/app/types/EnumGraphType.d.ts +0 -4
  128. package/lib/app/types/EnumGraphType.js +0 -9
  129. package/lib/app/types/EnumLinkedListType.d.ts +0 -4
  130. package/lib/app/types/EnumLinkedListType.js +0 -9
  131. package/lib/app/types/EnumRandomGenerationFormat.d.ts +0 -4
  132. package/lib/app/types/EnumRandomGenerationFormat.js +0 -9
  133. package/lib/app/types/EnumSortType.d.ts +0 -7
  134. package/lib/app/types/EnumSortType.js +0 -12
  135. package/lib/app/types/EnumTreeTraversalType.d.ts +0 -5
  136. package/lib/app/types/EnumTreeTraversalType.js +0 -10
  137. package/lib/app/types/FnCompareTwo.d.ts +0 -1
  138. package/lib/app/types/FnCompareTwo.js +0 -3
  139. package/lib/app/types/FnToMemoize.d.ts +0 -1
  140. package/lib/app/types/FnToMemoize.js +0 -3
  141. package/lib/app/types/IArrayFacade.d.ts +0 -4
  142. package/lib/app/types/IArrayFacade.js +0 -3
  143. package/lib/app/types/IBiDirectIterable.d.ts +0 -5
  144. package/lib/app/types/IBiDirectIterable.js +0 -3
  145. package/lib/app/types/IBiDirectIterator.d.ts +0 -11
  146. package/lib/app/types/IBiDirectIterator.js +0 -3
  147. package/lib/app/types/IBinaryTree.d.ts +0 -12
  148. package/lib/app/types/IBinaryTree.js +0 -3
  149. package/lib/app/types/IConvertableToArray.d.ts +0 -4
  150. package/lib/app/types/IConvertableToArray.js +0 -3
  151. package/lib/app/types/IGraph.d.ts +0 -14
  152. package/lib/app/types/IGraph.js +0 -3
  153. package/lib/app/types/IGraphIterationStrategy.d.ts +0 -5
  154. package/lib/app/types/IGraphIterationStrategy.js +0 -3
  155. package/lib/app/types/IGraphIterator.d.ts +0 -11
  156. package/lib/app/types/IGraphIterator.js +0 -3
  157. package/lib/app/types/IIterable.d.ts +0 -4
  158. package/lib/app/types/IIterable.js +0 -3
  159. package/lib/app/types/IIterator.d.ts +0 -14
  160. package/lib/app/types/IIterator.js +0 -3
  161. package/lib/app/types/IKeyValueStorage.d.ts +0 -8
  162. package/lib/app/types/IKeyValueStorage.js +0 -3
  163. package/lib/app/types/ILinearStorage.d.ts +0 -11
  164. package/lib/app/types/ILinearStorage.js +0 -3
  165. package/lib/app/types/ILinearStorageRA.d.ts +0 -13
  166. package/lib/app/types/ILinearStorageRA.js +0 -3
  167. package/lib/app/types/ILinkedList.d.ts +0 -4
  168. package/lib/app/types/ILinkedList.js +0 -3
  169. package/lib/app/types/TypeArrayMatrix.d.ts +0 -1
  170. package/lib/app/types/TypeArrayMatrix.js +0 -3
  171. package/lib/app/utils.d.ts +0 -37
  172. package/lib/app/utils.js +0 -115
  173. package/lib/exports/algorithms.d.ts +0 -16
  174. package/lib/exports/algorithms.js +0 -36
  175. package/lib/exports/constants.d.ts +0 -2
  176. package/lib/exports/constants.js +0 -7
  177. package/lib/exports/data-structures.d.ts +0 -13
  178. package/lib/exports/data-structures.js +0 -28
  179. package/lib/exports/helpers.d.ts +0 -6
  180. package/lib/exports/helpers.js +0 -14
  181. package/lib/exports/sorts.d.ts +0 -6
  182. package/lib/exports/sorts.js +0 -14
  183. package/lib/exports/types.d.ts +0 -16
  184. package/lib/exports/types.js +0 -34
  185. package/lib/exports/utils.d.ts +0 -3
  186. package/lib/exports/utils.js +0 -14
  187. package/lib/exports.d.ts +0 -55
  188. package/lib/exports.js +0 -109
  189. package/lib/index.js +0 -5
package/README.md CHANGED
@@ -30,11 +30,9 @@ Clone this repository and install dependencies by using `yarn` command.
30
30
  + [Sorting algorithms](#sorting-algorithms)
31
31
  + [Linear data structures](#linear-data-structures)
32
32
  + [Linked list](#linked-list)
33
- + [Looped array](#looped-array)
34
33
  + [Stack](#stack)
35
34
  + [Queue](#queue)
36
35
  + [Non-linear data structures](#non-linear-data-structures)
37
- + [HASH table](#hash-table)
38
36
  + [Graph](#graph)
39
37
  + [Binary tree](#binary-trees)
40
38
 
@@ -109,18 +107,6 @@ Implements [IIterable](src/app/types/IIterable.ts) interface.
109
107
  — Extends double linked list with implementation of two-way linking.
110
108
  Implements [IBiDirectIterable](src/app/types/IBiDirectIterable.ts) interface.
111
109
 
112
-
113
- ## Looped Array
114
-
115
- ### Interfaces
116
- [IArrayFacade](src/app/types/IArrayFacade.ts) — Contains basic array operations.
117
- Extends [ILinearStorageRA](src/app/types/ILinearStorageRA.ts) interface.
118
- Extends [IConvertableToArray](src/app/types/IConvertableToArray.ts) interface.
119
-
120
- ### Implementation
121
- [LoopedArray](src/app/data-structures/LoopedArray/LoopedArray.ts)[ [ tests ]](test/unit/data-structures/looped-array/looped-array.test.ts)
122
- — Overwrites data on capacity overflow.
123
-
124
110
  ## Stack
125
111
 
126
112
  ### Implementation
@@ -137,17 +123,6 @@ Extends [IConvertableToArray](src/app/types/IConvertableToArray.ts) interface.
137
123
 
138
124
  # Non linear data structures
139
125
 
140
- ## HASH Table
141
- ### Interfaces
142
- [IKeyValueStorage](src/app/types/IKeyValueStorage.ts) — Contains basic key-value storages operations.
143
-
144
- ### Implementation
145
- [HashTableNode](src/app/data-structures/HashTable/HashTableNode.ts) — Contains key, data and isDeleted properties.
146
-
147
- [HashTable](src/app/data-structures/HashTable/HashTable.ts) [ [ tests ] ](test/unit/data-structures/hash-table/hash-table.test.ts) — Implementation of open addressing hash table using quadratic probing
148
-
149
-
150
-
151
126
  ## Graph
152
127
  ### Interfaces
153
128
  [IGraph](src/app/types/IGraph.ts) — Contains basic graph operations.