@raikuxq/alg-ds 1.2.5 → 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.
- package/README.md +0 -25
- package/lib/index.d.ts +1216 -3
- package/lib/index.mjs +1 -0
- package/package.json +78 -72
- package/lib/app/algorithms/binary-search.d.ts +0 -5
- package/lib/app/algorithms/binary-search.js +0 -27
- package/lib/app/algorithms/factorial.d.ts +0 -9
- package/lib/app/algorithms/factorial.js +0 -17
- package/lib/app/algorithms/fibonacci.d.ts +0 -9
- package/lib/app/algorithms/fibonacci.js +0 -17
- package/lib/app/algorithms/graph/iterator/AbstractGraphIterator.d.ts +0 -39
- package/lib/app/algorithms/graph/iterator/AbstractGraphIterator.js +0 -87
- package/lib/app/algorithms/graph/iterator/GraphIteratorBFS.d.ts +0 -28
- package/lib/app/algorithms/graph/iterator/GraphIteratorBFS.js +0 -70
- package/lib/app/algorithms/graph/iterator/GraphIteratorDFS.d.ts +0 -28
- package/lib/app/algorithms/graph/iterator/GraphIteratorDFS.js +0 -70
- package/lib/app/algorithms/graph/iterator/GraphIteratorDijkstra.d.ts +0 -32
- package/lib/app/algorithms/graph/iterator/GraphIteratorDijkstra.js +0 -97
- package/lib/app/algorithms/graph/iterator-strategy/BFSIterationStrategy.d.ts +0 -6
- package/lib/app/algorithms/graph/iterator-strategy/BFSIterationStrategy.js +0 -13
- package/lib/app/algorithms/graph/iterator-strategy/DFSIterationStrategy.d.ts +0 -6
- package/lib/app/algorithms/graph/iterator-strategy/DFSIterationStrategy.js +0 -13
- package/lib/app/algorithms/graph/iterator-strategy/DijkstraIterationStrategy.d.ts +0 -6
- package/lib/app/algorithms/graph/iterator-strategy/DijkstraIterationStrategy.js +0 -13
- package/lib/app/algorithms/graph/presenter/presenterAdjacencyLists.d.ts +0 -19
- package/lib/app/algorithms/graph/presenter/presenterAdjacencyLists.js +0 -28
- package/lib/app/algorithms/graph/presenter/presenterAdjacencyMatrix.d.ts +0 -32
- package/lib/app/algorithms/graph/presenter/presenterAdjacencyMatrix.js +0 -48
- package/lib/app/algorithms/graph/searching/hasPath.d.ts +0 -9
- package/lib/app/algorithms/graph/searching/hasPath.js +0 -30
- package/lib/app/algorithms/graph/searching/shortestPath.d.ts +0 -9
- package/lib/app/algorithms/graph/searching/shortestPath.js +0 -30
- package/lib/app/algorithms/graph/transposing/transposeDirectedGraph.d.ts +0 -2
- package/lib/app/algorithms/graph/transposing/transposeDirectedGraph.js +0 -14
- package/lib/app/algorithms/memoize.d.ts +0 -5
- package/lib/app/algorithms/memoize.js +0 -22
- package/lib/app/algorithms/sorts/bubble-sort.d.ts +0 -9
- package/lib/app/algorithms/sorts/bubble-sort.js +0 -23
- package/lib/app/algorithms/sorts/insertion-sort.d.ts +0 -9
- package/lib/app/algorithms/sorts/insertion-sort.js +0 -25
- package/lib/app/algorithms/sorts/merge-sort.d.ts +0 -9
- package/lib/app/algorithms/sorts/merge-sort.js +0 -61
- package/lib/app/algorithms/sorts/quick-sort.d.ts +0 -9
- package/lib/app/algorithms/sorts/quick-sort.js +0 -45
- package/lib/app/algorithms/sorts/select-sort.d.ts +0 -9
- package/lib/app/algorithms/sorts/select-sort.js +0 -20
- package/lib/app/algorithms/transpose-matrix.d.ts +0 -6
- package/lib/app/algorithms/transpose-matrix.js +0 -19
- package/lib/app/constants.d.ts +0 -2
- package/lib/app/constants.js +0 -6
- package/lib/app/data-structures/BinaryTree/AbstractBinaryTree/AbstractBinaryNode.d.ts +0 -15
- package/lib/app/data-structures/BinaryTree/AbstractBinaryTree/AbstractBinaryNode.js +0 -53
- package/lib/app/data-structures/BinaryTree/AbstractBinaryTree/AbstractBinaryTree.d.ts +0 -60
- package/lib/app/data-structures/BinaryTree/AbstractBinaryTree/AbstractBinaryTree.js +0 -35
- package/lib/app/data-structures/BinaryTree/BinarySearchTree/BinarySearchNode.d.ts +0 -13
- package/lib/app/data-structures/BinaryTree/BinarySearchTree/BinarySearchNode.js +0 -59
- package/lib/app/data-structures/BinaryTree/BinarySearchTree/BinarySearchTree.d.ts +0 -75
- package/lib/app/data-structures/BinaryTree/BinarySearchTree/BinarySearchTree.js +0 -276
- package/lib/app/data-structures/BinaryTree/RandBinarySearchTree/RandBinarySearchNode.d.ts +0 -16
- package/lib/app/data-structures/BinaryTree/RandBinarySearchTree/RandBinarySearchNode.js +0 -70
- package/lib/app/data-structures/BinaryTree/RandBinarySearchTree/RandBinarySearchTree.d.ts +0 -58
- package/lib/app/data-structures/BinaryTree/RandBinarySearchTree/RandBinarySearchTree.js +0 -236
- package/lib/app/data-structures/BinaryTree/_helpers/createBinaryTree.d.ts +0 -6
- package/lib/app/data-structures/BinaryTree/_helpers/createBinaryTree.js +0 -22
- package/lib/app/data-structures/Graph/AbstractGraph.d.ts +0 -84
- package/lib/app/data-structures/Graph/AbstractGraph.js +0 -143
- package/lib/app/data-structures/Graph/DirectedGraph.d.ts +0 -27
- package/lib/app/data-structures/Graph/DirectedGraph.js +0 -89
- package/lib/app/data-structures/Graph/GraphEdge.d.ts +0 -16
- package/lib/app/data-structures/Graph/GraphEdge.js +0 -43
- package/lib/app/data-structures/Graph/UndirectedGraph.d.ts +0 -31
- package/lib/app/data-structures/Graph/UndirectedGraph.js +0 -106
- package/lib/app/data-structures/Graph/_helpers/createGraph.d.ts +0 -6
- package/lib/app/data-structures/Graph/_helpers/createGraph.js +0 -22
- package/lib/app/data-structures/Graph/_helpers/createGraphFromMatrix.d.ts +0 -7
- package/lib/app/data-structures/Graph/_helpers/createGraphFromMatrix.js +0 -42
- package/lib/app/data-structures/Graph/_helpers/generateRandomGraph.d.ts +0 -4
- package/lib/app/data-structures/Graph/_helpers/generateRandomGraph.js +0 -67
- package/lib/app/data-structures/HashTable/HashTable.d.ts +0 -73
- package/lib/app/data-structures/HashTable/HashTable.js +0 -171
- package/lib/app/data-structures/HashTable/HashTableNode.d.ts +0 -11
- package/lib/app/data-structures/HashTable/HashTableNode.js +0 -39
- package/lib/app/data-structures/LinkedList/AbstractLinkedList/AbstractLinkedList.d.ts +0 -134
- package/lib/app/data-structures/LinkedList/AbstractLinkedList/AbstractLinkedList.js +0 -247
- package/lib/app/data-structures/LinkedList/AbstractLinkedList/AbstractLinkedNode.d.ts +0 -20
- package/lib/app/data-structures/LinkedList/AbstractLinkedList/AbstractLinkedNode.js +0 -41
- package/lib/app/data-structures/LinkedList/DoubleLinkedList/DoubleLinkedList.d.ts +0 -42
- package/lib/app/data-structures/LinkedList/DoubleLinkedList/DoubleLinkedList.js +0 -98
- package/lib/app/data-structures/LinkedList/DoubleLinkedList/DoubleLinkedNode.d.ts +0 -25
- package/lib/app/data-structures/LinkedList/DoubleLinkedList/DoubleLinkedNode.js +0 -65
- package/lib/app/data-structures/LinkedList/DoubleLinkedList/IterableDoubleLinkedList.d.ts +0 -18
- package/lib/app/data-structures/LinkedList/DoubleLinkedList/IterableDoubleLinkedList.js +0 -86
- package/lib/app/data-structures/LinkedList/SingleLinkedList/IterableSingleLinkedList.d.ts +0 -18
- package/lib/app/data-structures/LinkedList/SingleLinkedList/IterableSingleLinkedList.js +0 -68
- package/lib/app/data-structures/LinkedList/SingleLinkedList/SingleLinkedList.d.ts +0 -46
- package/lib/app/data-structures/LinkedList/SingleLinkedList/SingleLinkedList.js +0 -103
- package/lib/app/data-structures/LinkedList/SingleLinkedList/SingleLinkedNode.d.ts +0 -7
- package/lib/app/data-structures/LinkedList/SingleLinkedList/SingleLinkedNode.js +0 -29
- package/lib/app/data-structures/LinkedList/_helpers/createLinkedList.d.ts +0 -3
- package/lib/app/data-structures/LinkedList/_helpers/createLinkedList.js +0 -34
- package/lib/app/data-structures/LoopedArray/LoopedArray.d.ts +0 -86
- package/lib/app/data-structures/LoopedArray/LoopedArray.js +0 -165
- package/lib/app/data-structures/Queue/Queue.d.ts +0 -50
- package/lib/app/data-structures/Queue/Queue.js +0 -85
- package/lib/app/data-structures/Stack/Stack.d.ts +0 -50
- package/lib/app/data-structures/Stack/Stack.js +0 -85
- package/lib/app/exceptions/CollectionIsEmptyException.d.ts +0 -4
- package/lib/app/exceptions/CollectionIsEmptyException.js +0 -28
- package/lib/app/exceptions/CollectionIsFullException.d.ts +0 -4
- package/lib/app/exceptions/CollectionIsFullException.js +0 -28
- package/lib/app/exceptions/IndexOutOfBoundsException.d.ts +0 -4
- package/lib/app/exceptions/IndexOutOfBoundsException.js +0 -28
- package/lib/app/exceptions/IsAlreadyExistsException.d.ts +0 -4
- package/lib/app/exceptions/IsAlreadyExistsException.js +0 -28
- package/lib/app/exceptions/IsNotFoundException.d.ts +0 -4
- package/lib/app/exceptions/IsNotFoundException.js +0 -28
- package/lib/app/exceptions/ValueOutOfRangeException.d.ts +0 -4
- package/lib/app/exceptions/ValueOutOfRangeException.js +0 -28
- package/lib/app/exceptions/base/IllegalArgumentException.d.ts +0 -3
- package/lib/app/exceptions/base/IllegalArgumentException.js +0 -27
- package/lib/app/exceptions/base/IllegalStateException.d.ts +0 -3
- package/lib/app/exceptions/base/IllegalStateException.js +0 -27
- package/lib/app/types/EnumBinarySearchTreeType.d.ts +0 -4
- package/lib/app/types/EnumBinarySearchTreeType.js +0 -9
- package/lib/app/types/EnumGraphTraversalType.d.ts +0 -5
- package/lib/app/types/EnumGraphTraversalType.js +0 -10
- package/lib/app/types/EnumGraphType.d.ts +0 -4
- package/lib/app/types/EnumGraphType.js +0 -9
- package/lib/app/types/EnumLinkedListType.d.ts +0 -4
- package/lib/app/types/EnumLinkedListType.js +0 -9
- package/lib/app/types/EnumRandomGenerationFormat.d.ts +0 -4
- package/lib/app/types/EnumRandomGenerationFormat.js +0 -9
- package/lib/app/types/EnumSortType.d.ts +0 -7
- package/lib/app/types/EnumSortType.js +0 -12
- package/lib/app/types/EnumTreeTraversalType.d.ts +0 -5
- package/lib/app/types/EnumTreeTraversalType.js +0 -10
- package/lib/app/types/FnCompareTwo.d.ts +0 -1
- package/lib/app/types/FnCompareTwo.js +0 -3
- package/lib/app/types/FnToMemoize.d.ts +0 -1
- package/lib/app/types/FnToMemoize.js +0 -3
- package/lib/app/types/IArrayFacade.d.ts +0 -4
- package/lib/app/types/IArrayFacade.js +0 -3
- package/lib/app/types/IBiDirectIterable.d.ts +0 -5
- package/lib/app/types/IBiDirectIterable.js +0 -3
- package/lib/app/types/IBiDirectIterator.d.ts +0 -11
- package/lib/app/types/IBiDirectIterator.js +0 -3
- package/lib/app/types/IBinaryTree.d.ts +0 -12
- package/lib/app/types/IBinaryTree.js +0 -3
- package/lib/app/types/IConvertableToArray.d.ts +0 -4
- package/lib/app/types/IConvertableToArray.js +0 -3
- package/lib/app/types/IGraph.d.ts +0 -14
- package/lib/app/types/IGraph.js +0 -3
- package/lib/app/types/IGraphIterationStrategy.d.ts +0 -5
- package/lib/app/types/IGraphIterationStrategy.js +0 -3
- package/lib/app/types/IGraphIterator.d.ts +0 -11
- package/lib/app/types/IGraphIterator.js +0 -3
- package/lib/app/types/IIterable.d.ts +0 -4
- package/lib/app/types/IIterable.js +0 -3
- package/lib/app/types/IIterator.d.ts +0 -14
- package/lib/app/types/IIterator.js +0 -3
- package/lib/app/types/IKeyValueStorage.d.ts +0 -8
- package/lib/app/types/IKeyValueStorage.js +0 -3
- package/lib/app/types/ILinearStorage.d.ts +0 -11
- package/lib/app/types/ILinearStorage.js +0 -3
- package/lib/app/types/ILinearStorageRA.d.ts +0 -13
- package/lib/app/types/ILinearStorageRA.js +0 -3
- package/lib/app/types/ILinkedList.d.ts +0 -4
- package/lib/app/types/ILinkedList.js +0 -3
- package/lib/app/types/TypeArrayMatrix.d.ts +0 -1
- package/lib/app/types/TypeArrayMatrix.js +0 -3
- package/lib/app/utils.d.ts +0 -29
- package/lib/app/utils.js +0 -61
- package/lib/exports/algorithms.d.ts +0 -16
- package/lib/exports/algorithms.js +0 -36
- package/lib/exports/constants.d.ts +0 -2
- package/lib/exports/constants.js +0 -7
- package/lib/exports/data-structures.d.ts +0 -13
- package/lib/exports/data-structures.js +0 -28
- package/lib/exports/helpers.d.ts +0 -6
- package/lib/exports/helpers.js +0 -14
- package/lib/exports/sorts.d.ts +0 -6
- package/lib/exports/sorts.js +0 -14
- package/lib/exports/types.d.ts +0 -16
- package/lib/exports/types.js +0 -34
- package/lib/exports/utils.d.ts +0 -3
- package/lib/exports/utils.js +0 -12
- package/lib/exports.d.ts +0 -55
- package/lib/exports.js +0 -107
- 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.
|