@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.
- 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 -37
- package/lib/app/utils.js +0 -115
- 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 -14
- package/lib/exports.d.ts +0 -55
- package/lib/exports.js +0 -109
- package/lib/index.js +0 -5
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRm5Db21wYXJlVHdvLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2FwcC90eXBlcy9GbkNvbXBhcmVUd28udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare type FnToMemoize<Key, Value> = (...args: Array<Key>) => Value;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRm5Ub01lbW9pemUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvYXBwL3R5cGVzL0ZuVG9NZW1vaXplLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ==
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSUFycmF5RmFjYWRlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2FwcC90eXBlcy9JQXJyYXlGYWNhZGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSUJpRGlyZWN0SXRlcmFibGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvYXBwL3R5cGVzL0lCaURpcmVjdEl0ZXJhYmxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ==
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import IIterator from "./IIterator";
|
|
2
|
-
export default interface IBiDirectIterator<T> extends IIterator<T> {
|
|
3
|
-
/**
|
|
4
|
-
* Will do one iteration back and returns prev item value
|
|
5
|
-
*/
|
|
6
|
-
prev(): T;
|
|
7
|
-
/**
|
|
8
|
-
* Check if next element exists
|
|
9
|
-
*/
|
|
10
|
-
hasPrev(): boolean;
|
|
11
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSUJpRGlyZWN0SXRlcmF0b3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvYXBwL3R5cGVzL0lCaURpcmVjdEl0ZXJhdG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ==
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { EnumTreeTraversalType } from "./EnumTreeTraversalType";
|
|
2
|
-
export default interface IBinaryTree<T> {
|
|
3
|
-
has(value: T): boolean;
|
|
4
|
-
insert(value: T): void;
|
|
5
|
-
delete(value: T): void;
|
|
6
|
-
subtree(value: T): IBinaryTree<T>;
|
|
7
|
-
max(): T;
|
|
8
|
-
min(): T;
|
|
9
|
-
length(): number;
|
|
10
|
-
height(): number;
|
|
11
|
-
traverse(type: EnumTreeTraversalType): Array<T>;
|
|
12
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSUJpbmFyeVRyZWUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvYXBwL3R5cGVzL0lCaW5hcnlUcmVlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ==
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSUNvbnZlcnRhYmxlVG9BcnJheS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9hcHAvdHlwZXMvSUNvbnZlcnRhYmxlVG9BcnJheS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export default interface IGraph<T> {
|
|
2
|
-
weight(): number;
|
|
3
|
-
vertices(): Array<T>;
|
|
4
|
-
verticesCount(): number;
|
|
5
|
-
edgesCount(): number;
|
|
6
|
-
addVertex(data: T): this;
|
|
7
|
-
removeVertex(data: T): this;
|
|
8
|
-
hasVertex(data: T): boolean;
|
|
9
|
-
getVertexNeighbors(data: T): Array<T>;
|
|
10
|
-
addEdge(from: T, to: T, weight?: number): this;
|
|
11
|
-
removeEdge(from: T, to: T): this;
|
|
12
|
-
hasEdge(from: T, to: T): boolean;
|
|
13
|
-
getEdgeWeight(from: T, to: T): number;
|
|
14
|
-
}
|
package/lib/app/types/IGraph.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSUdyYXBoLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2FwcC90eXBlcy9JR3JhcGgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSUdyYXBoSXRlcmF0aW9uU3RyYXRlZ3kuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvYXBwL3R5cGVzL0lHcmFwaEl0ZXJhdGlvblN0cmF0ZWd5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ==
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import IIterator from "./IIterator";
|
|
2
|
-
export default interface IGraphIterator<T> extends IIterator<T> {
|
|
3
|
-
/**
|
|
4
|
-
* Get path which passed by iterator between two vertices
|
|
5
|
-
*/
|
|
6
|
-
getPath(from: T, to: T): Array<T>;
|
|
7
|
-
/**
|
|
8
|
-
* Initialize iterator by passing start vertex
|
|
9
|
-
*/
|
|
10
|
-
initIterator(from: T): void;
|
|
11
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSUdyYXBoSXRlcmF0b3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvYXBwL3R5cGVzL0lHcmFwaEl0ZXJhdG9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ==
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSUl0ZXJhYmxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2FwcC90eXBlcy9JSXRlcmFibGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSUl0ZXJhdG9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2FwcC90eXBlcy9JSXRlcmF0b3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSUtleVZhbHVlU3RvcmFnZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9hcHAvdHlwZXMvSUtleVZhbHVlU3RvcmFnZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSUxpbmVhclN0b3JhZ2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvYXBwL3R5cGVzL0lMaW5lYXJTdG9yYWdlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ==
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import ILinearStorage from "./ILinearStorage";
|
|
2
|
-
/**
|
|
3
|
-
* Interface extends default linear storage with methods that allows read/write operations for all storage elements
|
|
4
|
-
* RA - randomly accessible
|
|
5
|
-
*/
|
|
6
|
-
export default interface ILinearStorageRA<T> extends ILinearStorage<T> {
|
|
7
|
-
peekFromStart(): T;
|
|
8
|
-
peekByIndex(index: number): T;
|
|
9
|
-
unshift(value: T): void;
|
|
10
|
-
pushFromIndex(value: T, fromIndex: number): void;
|
|
11
|
-
shift(): T;
|
|
12
|
-
deleteFromIndex(fromIndex: number): T;
|
|
13
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSUxpbmVhclN0b3JhZ2VSQS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9hcHAvdHlwZXMvSUxpbmVhclN0b3JhZ2VSQS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSUxpbmtlZExpc3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvYXBwL3R5cGVzL0lMaW5rZWRMaXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ==
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare type TypeArrayMatrix = Array<Array<number>>;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVHlwZUFycmF5TWF0cml4LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2FwcC90eXBlcy9UeXBlQXJyYXlNYXRyaXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
package/lib/app/utils.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Will find min value in the whole array and return its index
|
|
3
|
-
*/
|
|
4
|
-
export declare const getMinIndex: (arr: Array<number>) => number;
|
|
5
|
-
/**
|
|
6
|
-
* Will find min value in range between fromIndex and end of array
|
|
7
|
-
*/
|
|
8
|
-
export declare const getMinIndexFromIndex: (arr: Array<number>, fromIndex: number) => number;
|
|
9
|
-
/**
|
|
10
|
-
* Will swap two items in array
|
|
11
|
-
* @example swapArrayItems([2,3,5], 1, 2) -> [2,5,3]
|
|
12
|
-
*/
|
|
13
|
-
export declare const swapArrayItems: <T>(arr: T[], leftIndex: number, rightIndex: number) => void;
|
|
14
|
-
/**
|
|
15
|
-
* Get random number in range
|
|
16
|
-
*/
|
|
17
|
-
export declare const randomizeNumberInRange: (min: number, max: number) => number;
|
|
18
|
-
/**
|
|
19
|
-
* Round number to given digits after
|
|
20
|
-
*/
|
|
21
|
-
export declare const roundNumber: (num: number, digits?: number) => number;
|
|
22
|
-
/**
|
|
23
|
-
* Get time execution of function
|
|
24
|
-
*/
|
|
25
|
-
export declare const perf: (fn: () => void) => number;
|
|
26
|
-
/**
|
|
27
|
-
* Get time execution of function
|
|
28
|
-
*/
|
|
29
|
-
export declare const perfAsync: (fn: () => void) => Promise<number>;
|
|
30
|
-
/**
|
|
31
|
-
* Check is given array a matrix N*N
|
|
32
|
-
*/
|
|
33
|
-
export declare const checkIsArrayMatrix: <T>(array: T[][]) => boolean;
|
|
34
|
-
/**
|
|
35
|
-
* Generate random array
|
|
36
|
-
*/
|
|
37
|
-
export declare const randomizeArray: (length: number, max: number) => Array<number>;
|
package/lib/app/utils.js
DELETED
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.randomizeArray = exports.checkIsArrayMatrix = exports.perfAsync = exports.perf = exports.roundNumber = exports.randomizeNumberInRange = exports.swapArrayItems = exports.getMinIndexFromIndex = exports.getMinIndex = void 0;
|
|
40
|
-
var perf_hooks_1 = require("perf_hooks");
|
|
41
|
-
/**
|
|
42
|
-
* Will find min value in the whole array and return its index
|
|
43
|
-
*/
|
|
44
|
-
exports.getMinIndex = function (arr) {
|
|
45
|
-
return arr.reduce(function (minIndex, item, index) {
|
|
46
|
-
return item < arr[minIndex] ? index : minIndex;
|
|
47
|
-
}, 0);
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
* Will find min value in range between fromIndex and end of array
|
|
51
|
-
*/
|
|
52
|
-
exports.getMinIndexFromIndex = function (arr, fromIndex) {
|
|
53
|
-
return fromIndex + exports.getMinIndex(arr.slice(fromIndex));
|
|
54
|
-
};
|
|
55
|
-
/**
|
|
56
|
-
* Will swap two items in array
|
|
57
|
-
* @example swapArrayItems([2,3,5], 1, 2) -> [2,5,3]
|
|
58
|
-
*/
|
|
59
|
-
exports.swapArrayItems = function (arr, leftIndex, rightIndex) {
|
|
60
|
-
if (leftIndex !== rightIndex) {
|
|
61
|
-
var temp = arr[leftIndex];
|
|
62
|
-
arr[leftIndex] = arr[rightIndex];
|
|
63
|
-
arr[rightIndex] = temp;
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
/**
|
|
67
|
-
* Get random number in range
|
|
68
|
-
*/
|
|
69
|
-
exports.randomizeNumberInRange = function (min, max) {
|
|
70
|
-
return Math.floor(Math.random() * (max - min)) + min;
|
|
71
|
-
};
|
|
72
|
-
/**
|
|
73
|
-
* Round number to given digits after
|
|
74
|
-
*/
|
|
75
|
-
exports.roundNumber = function (num, digits) {
|
|
76
|
-
if (digits === void 0) { digits = 3; }
|
|
77
|
-
return Math.round(num * Math.pow(10, digits)) / Math.pow(10, digits);
|
|
78
|
-
};
|
|
79
|
-
/**
|
|
80
|
-
* Get time execution of function
|
|
81
|
-
*/
|
|
82
|
-
exports.perf = function (fn) {
|
|
83
|
-
var perfStart = perf_hooks_1.performance.now();
|
|
84
|
-
fn();
|
|
85
|
-
var perfEnd = perf_hooks_1.performance.now();
|
|
86
|
-
return perfEnd - perfStart;
|
|
87
|
-
};
|
|
88
|
-
/**
|
|
89
|
-
* Get time execution of function
|
|
90
|
-
*/
|
|
91
|
-
exports.perfAsync = function (fn) { return __awaiter(void 0, void 0, void 0, function () {
|
|
92
|
-
return __generator(this, function (_a) {
|
|
93
|
-
return [2 /*return*/, Promise.resolve(exports.perf(fn))];
|
|
94
|
-
});
|
|
95
|
-
}); };
|
|
96
|
-
/**
|
|
97
|
-
* Check is given array a matrix N*N
|
|
98
|
-
*/
|
|
99
|
-
exports.checkIsArrayMatrix = function (array) {
|
|
100
|
-
for (var i = 0; i < array.length; i++) {
|
|
101
|
-
var subArray = array[i];
|
|
102
|
-
var checkIsSameLength = subArray.length === array.length;
|
|
103
|
-
if (!checkIsSameLength) {
|
|
104
|
-
return false;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
return true;
|
|
108
|
-
};
|
|
109
|
-
/**
|
|
110
|
-
* Generate random array
|
|
111
|
-
*/
|
|
112
|
-
exports.randomizeArray = function (length, max) {
|
|
113
|
-
return new Array(length).fill(0).map(function () { return Math.round(Math.random() * max); });
|
|
114
|
-
};
|
|
115
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvYXBwL3V0aWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLHlDQUF5QztBQUV6Qzs7R0FFRztBQUNVLFFBQUEsV0FBVyxHQUFHLFVBQUMsR0FBa0I7SUFDNUMsT0FBTyxHQUFHLENBQUMsTUFBTSxDQUFDLFVBQUMsUUFBUSxFQUFFLElBQUksRUFBRSxLQUFLO1FBQ3RDLE9BQU8sSUFBSSxHQUFHLEdBQUcsQ0FBQyxRQUFRLENBQUMsQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQyxRQUFRLENBQUM7SUFDakQsQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDO0FBQ1IsQ0FBQyxDQUFDO0FBRUY7O0dBRUc7QUFDVSxRQUFBLG9CQUFvQixHQUFHLFVBQ2xDLEdBQWtCLEVBQ2xCLFNBQWlCO0lBRWpCLE9BQU8sU0FBUyxHQUFHLG1CQUFXLENBQUMsR0FBRyxDQUFDLEtBQUssQ0FBQyxTQUFTLENBQUMsQ0FBQyxDQUFDO0FBQ3ZELENBQUMsQ0FBQztBQUVGOzs7R0FHRztBQUNVLFFBQUEsY0FBYyxHQUFHLFVBQzVCLEdBQWEsRUFDYixTQUFpQixFQUNqQixVQUFrQjtJQUVsQixJQUFJLFNBQVMsS0FBSyxVQUFVLEVBQUU7UUFDNUIsSUFBTSxJQUFJLEdBQU0sR0FBRyxDQUFDLFNBQVMsQ0FBQyxDQUFDO1FBQy9CLEdBQUcsQ0FBQyxTQUFTLENBQUMsR0FBRyxHQUFHLENBQUMsVUFBVSxDQUFDLENBQUM7UUFDakMsR0FBRyxDQUFDLFVBQVUsQ0FBQyxHQUFHLElBQUksQ0FBQztLQUN4QjtBQUNILENBQUMsQ0FBQztBQUVGOztHQUVHO0FBQ1UsUUFBQSxzQkFBc0IsR0FBRyxVQUFDLEdBQVcsRUFBRSxHQUFXO0lBQzdELE9BQUEsSUFBSSxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUMsTUFBTSxFQUFFLEdBQUcsQ0FBQyxHQUFHLEdBQUcsR0FBRyxDQUFDLENBQUMsR0FBRyxHQUFHO0FBQTdDLENBQTZDLENBQUM7QUFFaEQ7O0dBRUc7QUFDVSxRQUFBLFdBQVcsR0FBRyxVQUFDLEdBQVcsRUFBRSxNQUFVO0lBQVYsdUJBQUEsRUFBQSxVQUFVO0lBQ2pELE9BQUEsSUFBSSxDQUFDLEtBQUssQ0FBQyxHQUFHLEdBQUcsU0FBQSxFQUFFLEVBQUksTUFBTSxDQUFBLENBQUMsR0FBRyxTQUFBLEVBQUUsRUFBSSxNQUFNLENBQUE7QUFBN0MsQ0FBNkMsQ0FBQztBQUVoRDs7R0FFRztBQUNVLFFBQUEsSUFBSSxHQUFHLFVBQUMsRUFBYztJQUNqQyxJQUFNLFNBQVMsR0FBRyx3QkFBVyxDQUFDLEdBQUcsRUFBRSxDQUFDO0lBQ3BDLEVBQUUsRUFBRSxDQUFDO0lBQ0wsSUFBTSxPQUFPLEdBQUcsd0JBQVcsQ0FBQyxHQUFHLEVBQUUsQ0FBQztJQUNsQyxPQUFPLE9BQU8sR0FBRyxTQUFTLENBQUM7QUFDN0IsQ0FBQyxDQUFDO0FBRUY7O0dBRUc7QUFDVSxRQUFBLFNBQVMsR0FBRyxVQUFPLEVBQWM7O1FBQzVDLHNCQUFPLE9BQU8sQ0FBQyxPQUFPLENBQUMsWUFBSSxDQUFDLEVBQUUsQ0FBQyxDQUFDLEVBQUM7O0tBQ2xDLENBQUM7QUFFRjs7R0FFRztBQUNVLFFBQUEsa0JBQWtCLEdBQUcsVUFBSSxLQUFzQjtJQUMxRCxLQUFLLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEdBQUcsS0FBSyxDQUFDLE1BQU0sRUFBRSxDQUFDLEVBQUUsRUFBRTtRQUNyQyxJQUFNLFFBQVEsR0FBRyxLQUFLLENBQUMsQ0FBQyxDQUFDLENBQUM7UUFDMUIsSUFBTSxpQkFBaUIsR0FBRyxRQUFRLENBQUMsTUFBTSxLQUFLLEtBQUssQ0FBQyxNQUFNLENBQUM7UUFDM0QsSUFBSSxDQUFDLGlCQUFpQixFQUFFO1lBQ3RCLE9BQU8sS0FBSyxDQUFDO1NBQ2Q7S0FDRjtJQUNELE9BQU8sSUFBSSxDQUFDO0FBQ2QsQ0FBQyxDQUFDO0FBRUY7O0dBRUc7QUFDVSxRQUFBLGNBQWMsR0FBRyxVQUFDLE1BQWMsRUFBRSxHQUFXO0lBQ3hELE9BQUEsSUFBSSxLQUFLLENBQUMsTUFBTSxDQUFDLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxDQUFDLEdBQUcsQ0FBQyxjQUFNLE9BQUEsSUFBSSxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUMsTUFBTSxFQUFFLEdBQUcsR0FBRyxDQUFDLEVBQS9CLENBQStCLENBQUM7QUFBcEUsQ0FBb0UsQ0FBQyJ9
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { factorial, memoizedFactorial } from "../app/algorithms/factorial";
|
|
2
|
-
import { fibonacci, memoizedFibonacci } from "../app/algorithms/fibonacci";
|
|
3
|
-
import { binarySearch } from "../app/algorithms/binary-search";
|
|
4
|
-
import { transposeMatrix } from "../app/algorithms/transpose-matrix";
|
|
5
|
-
import { transposeDirectedGraph } from "../app/algorithms/graph/transposing/transposeDirectedGraph";
|
|
6
|
-
import BFSIterationStrategy from "../app/algorithms/graph/iterator-strategy/BFSIterationStrategy";
|
|
7
|
-
import DFSIterationStrategy from "../app/algorithms/graph/iterator-strategy/DFSIterationStrategy";
|
|
8
|
-
import DijkstraIterationStrategy from "../app/algorithms/graph/iterator-strategy/DijkstraIterationStrategy";
|
|
9
|
-
import GraphIteratorBFS from "../app/algorithms/graph/iterator/GraphIteratorBFS";
|
|
10
|
-
import GraphIteratorDFS from "../app/algorithms/graph/iterator/GraphIteratorDFS";
|
|
11
|
-
import GraphIteratorDijkstra from "../app/algorithms/graph/iterator/GraphIteratorDijkstra";
|
|
12
|
-
import { hasPath } from "../app/algorithms/graph/searching/hasPath";
|
|
13
|
-
import { shortestPath } from "../app/algorithms/graph/searching/shortestPath";
|
|
14
|
-
import { presenterAdjacencyMatrix } from "../app/algorithms/graph/presenter/presenterAdjacencyMatrix";
|
|
15
|
-
import { presenterAdjacencyLists } from "../app/algorithms/graph/presenter/presenterAdjacencyLists";
|
|
16
|
-
export { binarySearch, factorial, memoizedFactorial, memoizedFibonacci, fibonacci, transposeMatrix, GraphIteratorDFS, presenterAdjacencyLists, presenterAdjacencyMatrix, hasPath, shortestPath, DijkstraIterationStrategy, DFSIterationStrategy, BFSIterationStrategy, GraphIteratorBFS, GraphIteratorDijkstra, transposeDirectedGraph, };
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.transposeDirectedGraph = exports.GraphIteratorDijkstra = exports.GraphIteratorBFS = exports.BFSIterationStrategy = exports.DFSIterationStrategy = exports.DijkstraIterationStrategy = exports.shortestPath = exports.hasPath = exports.presenterAdjacencyMatrix = exports.presenterAdjacencyLists = exports.GraphIteratorDFS = exports.transposeMatrix = exports.fibonacci = exports.memoizedFibonacci = exports.memoizedFactorial = exports.factorial = exports.binarySearch = void 0;
|
|
4
|
-
var factorial_1 = require("../app/algorithms/factorial");
|
|
5
|
-
Object.defineProperty(exports, "factorial", { enumerable: true, get: function () { return factorial_1.factorial; } });
|
|
6
|
-
Object.defineProperty(exports, "memoizedFactorial", { enumerable: true, get: function () { return factorial_1.memoizedFactorial; } });
|
|
7
|
-
var fibonacci_1 = require("../app/algorithms/fibonacci");
|
|
8
|
-
Object.defineProperty(exports, "fibonacci", { enumerable: true, get: function () { return fibonacci_1.fibonacci; } });
|
|
9
|
-
Object.defineProperty(exports, "memoizedFibonacci", { enumerable: true, get: function () { return fibonacci_1.memoizedFibonacci; } });
|
|
10
|
-
var binary_search_1 = require("../app/algorithms/binary-search");
|
|
11
|
-
Object.defineProperty(exports, "binarySearch", { enumerable: true, get: function () { return binary_search_1.binarySearch; } });
|
|
12
|
-
var transpose_matrix_1 = require("../app/algorithms/transpose-matrix");
|
|
13
|
-
Object.defineProperty(exports, "transposeMatrix", { enumerable: true, get: function () { return transpose_matrix_1.transposeMatrix; } });
|
|
14
|
-
var transposeDirectedGraph_1 = require("../app/algorithms/graph/transposing/transposeDirectedGraph");
|
|
15
|
-
Object.defineProperty(exports, "transposeDirectedGraph", { enumerable: true, get: function () { return transposeDirectedGraph_1.transposeDirectedGraph; } });
|
|
16
|
-
var BFSIterationStrategy_1 = require("../app/algorithms/graph/iterator-strategy/BFSIterationStrategy");
|
|
17
|
-
exports.BFSIterationStrategy = BFSIterationStrategy_1.default;
|
|
18
|
-
var DFSIterationStrategy_1 = require("../app/algorithms/graph/iterator-strategy/DFSIterationStrategy");
|
|
19
|
-
exports.DFSIterationStrategy = DFSIterationStrategy_1.default;
|
|
20
|
-
var DijkstraIterationStrategy_1 = require("../app/algorithms/graph/iterator-strategy/DijkstraIterationStrategy");
|
|
21
|
-
exports.DijkstraIterationStrategy = DijkstraIterationStrategy_1.default;
|
|
22
|
-
var GraphIteratorBFS_1 = require("../app/algorithms/graph/iterator/GraphIteratorBFS");
|
|
23
|
-
exports.GraphIteratorBFS = GraphIteratorBFS_1.default;
|
|
24
|
-
var GraphIteratorDFS_1 = require("../app/algorithms/graph/iterator/GraphIteratorDFS");
|
|
25
|
-
exports.GraphIteratorDFS = GraphIteratorDFS_1.default;
|
|
26
|
-
var GraphIteratorDijkstra_1 = require("../app/algorithms/graph/iterator/GraphIteratorDijkstra");
|
|
27
|
-
exports.GraphIteratorDijkstra = GraphIteratorDijkstra_1.default;
|
|
28
|
-
var hasPath_1 = require("../app/algorithms/graph/searching/hasPath");
|
|
29
|
-
Object.defineProperty(exports, "hasPath", { enumerable: true, get: function () { return hasPath_1.hasPath; } });
|
|
30
|
-
var shortestPath_1 = require("../app/algorithms/graph/searching/shortestPath");
|
|
31
|
-
Object.defineProperty(exports, "shortestPath", { enumerable: true, get: function () { return shortestPath_1.shortestPath; } });
|
|
32
|
-
var presenterAdjacencyMatrix_1 = require("../app/algorithms/graph/presenter/presenterAdjacencyMatrix");
|
|
33
|
-
Object.defineProperty(exports, "presenterAdjacencyMatrix", { enumerable: true, get: function () { return presenterAdjacencyMatrix_1.presenterAdjacencyMatrix; } });
|
|
34
|
-
var presenterAdjacencyLists_1 = require("../app/algorithms/graph/presenter/presenterAdjacencyLists");
|
|
35
|
-
Object.defineProperty(exports, "presenterAdjacencyLists", { enumerable: true, get: function () { return presenterAdjacencyLists_1.presenterAdjacencyLists; } });
|
|
36
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWxnb3JpdGhtcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9leHBvcnRzL2FsZ29yaXRobXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEseURBQTJFO0FBa0J6RSwwRkFsQk8scUJBQVMsT0FrQlA7QUFDVCxrR0FuQmtCLDZCQUFpQixPQW1CbEI7QUFsQm5CLHlEQUEyRTtBQW9CekUsMEZBcEJPLHFCQUFTLE9Bb0JQO0FBRFQsa0dBbkJrQiw2QkFBaUIsT0FtQmxCO0FBbEJuQixpRUFBK0Q7QUFlN0QsNkZBZk8sNEJBQVksT0FlUDtBQWRkLHVFQUFxRTtBQW1CbkUsZ0dBbkJPLGtDQUFlLE9BbUJQO0FBbEJqQixxR0FBb0c7QUE2QmxHLHVHQTdCTywrQ0FBc0IsT0E2QlA7QUE1QnhCLHVHQUFrRztBQXlCaEcsK0JBekJLLDhCQUFvQixDQXlCTDtBQXhCdEIsdUdBQWtHO0FBdUJoRywrQkF2QkssOEJBQW9CLENBdUJMO0FBdEJ0QixpSEFBNEc7QUFxQjFHLG9DQXJCSyxtQ0FBeUIsQ0FxQkw7QUFwQjNCLHNGQUFpRjtBQXVCL0UsMkJBdkJLLDBCQUFnQixDQXVCTDtBQXRCbEIsc0ZBQWlGO0FBYy9FLDJCQWRLLDBCQUFnQixDQWNMO0FBYmxCLGdHQUEyRjtBQXNCekYsZ0NBdEJLLCtCQUFxQixDQXNCTDtBQXJCdkIscUVBQW9FO0FBZWxFLHdGQWZPLGlCQUFPLE9BZVA7QUFkVCwrRUFBOEU7QUFlNUUsNkZBZk8sMkJBQVksT0FlUDtBQWRkLHVHQUFzRztBQVlwRyx5R0FaTyxtREFBd0IsT0FZUDtBQVgxQixxR0FBb0c7QUFVbEcsd0dBVk8saURBQXVCLE9BVVAifQ==
|
package/lib/exports/constants.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EDGE_EXISTS_STATE = exports.EDGE_NOT_EXISTS_STATE = void 0;
|
|
4
|
-
var constants_1 = require("../app/constants");
|
|
5
|
-
Object.defineProperty(exports, "EDGE_EXISTS_STATE", { enumerable: true, get: function () { return constants_1.EDGE_EXISTS_STATE; } });
|
|
6
|
-
Object.defineProperty(exports, "EDGE_NOT_EXISTS_STATE", { enumerable: true, get: function () { return constants_1.EDGE_NOT_EXISTS_STATE; } });
|
|
7
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2V4cG9ydHMvY29uc3RhbnRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLDhDQUE0RTtBQUU1QyxrR0FGdkIsNkJBQWlCLE9BRXVCO0FBQXhDLHNHQUZtQixpQ0FBcUIsT0FFbkIifQ==
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import Queue from "../app/data-structures/Queue/Queue";
|
|
2
|
-
import Stack from "../app/data-structures/Stack/Stack";
|
|
3
|
-
import UndirectedGraph from "../app/data-structures/Graph/UndirectedGraph";
|
|
4
|
-
import DirectedGraph from "../app/data-structures/Graph/DirectedGraph";
|
|
5
|
-
import BinarySearchTree from "../app/data-structures/BinaryTree/BinarySearchTree/BinarySearchTree";
|
|
6
|
-
import RandBinarySearchTree from "../app/data-structures/BinaryTree/RandBinarySearchTree/RandBinarySearchTree";
|
|
7
|
-
import DoubleLinkedList from "../app/data-structures/LinkedList/DoubleLinkedList/DoubleLinkedList";
|
|
8
|
-
import IterableDoubleLinkedList from "../app/data-structures/LinkedList/DoubleLinkedList/IterableDoubleLinkedList";
|
|
9
|
-
import IterableSingleLinkedList from "../app/data-structures/LinkedList/SingleLinkedList/IterableSingleLinkedList";
|
|
10
|
-
import SingleLinkedList from "../app/data-structures/LinkedList/SingleLinkedList/SingleLinkedList";
|
|
11
|
-
import LoopedArray from "../app/data-structures/LoopedArray/LoopedArray";
|
|
12
|
-
import HashTable from "../app/data-structures/HashTable/HashTable";
|
|
13
|
-
export { Stack, Queue, SingleLinkedList, DoubleLinkedList, IterableDoubleLinkedList, IterableSingleLinkedList, RandBinarySearchTree, BinarySearchTree, DirectedGraph, UndirectedGraph, LoopedArray, HashTable, };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HashTable = exports.LoopedArray = exports.UndirectedGraph = exports.DirectedGraph = exports.BinarySearchTree = exports.RandBinarySearchTree = exports.IterableSingleLinkedList = exports.IterableDoubleLinkedList = exports.DoubleLinkedList = exports.SingleLinkedList = exports.Queue = exports.Stack = void 0;
|
|
4
|
-
var Queue_1 = require("../app/data-structures/Queue/Queue");
|
|
5
|
-
exports.Queue = Queue_1.default;
|
|
6
|
-
var Stack_1 = require("../app/data-structures/Stack/Stack");
|
|
7
|
-
exports.Stack = Stack_1.default;
|
|
8
|
-
var UndirectedGraph_1 = require("../app/data-structures/Graph/UndirectedGraph");
|
|
9
|
-
exports.UndirectedGraph = UndirectedGraph_1.default;
|
|
10
|
-
var DirectedGraph_1 = require("../app/data-structures/Graph/DirectedGraph");
|
|
11
|
-
exports.DirectedGraph = DirectedGraph_1.default;
|
|
12
|
-
var BinarySearchTree_1 = require("../app/data-structures/BinaryTree/BinarySearchTree/BinarySearchTree");
|
|
13
|
-
exports.BinarySearchTree = BinarySearchTree_1.default;
|
|
14
|
-
var RandBinarySearchTree_1 = require("../app/data-structures/BinaryTree/RandBinarySearchTree/RandBinarySearchTree");
|
|
15
|
-
exports.RandBinarySearchTree = RandBinarySearchTree_1.default;
|
|
16
|
-
var DoubleLinkedList_1 = require("../app/data-structures/LinkedList/DoubleLinkedList/DoubleLinkedList");
|
|
17
|
-
exports.DoubleLinkedList = DoubleLinkedList_1.default;
|
|
18
|
-
var IterableDoubleLinkedList_1 = require("../app/data-structures/LinkedList/DoubleLinkedList/IterableDoubleLinkedList");
|
|
19
|
-
exports.IterableDoubleLinkedList = IterableDoubleLinkedList_1.default;
|
|
20
|
-
var IterableSingleLinkedList_1 = require("../app/data-structures/LinkedList/SingleLinkedList/IterableSingleLinkedList");
|
|
21
|
-
exports.IterableSingleLinkedList = IterableSingleLinkedList_1.default;
|
|
22
|
-
var SingleLinkedList_1 = require("../app/data-structures/LinkedList/SingleLinkedList/SingleLinkedList");
|
|
23
|
-
exports.SingleLinkedList = SingleLinkedList_1.default;
|
|
24
|
-
var LoopedArray_1 = require("../app/data-structures/LoopedArray/LoopedArray");
|
|
25
|
-
exports.LoopedArray = LoopedArray_1.default;
|
|
26
|
-
var HashTable_1 = require("../app/data-structures/HashTable/HashTable");
|
|
27
|
-
exports.HashTable = HashTable_1.default;
|
|
28
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0YS1zdHJ1Y3R1cmVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2V4cG9ydHMvZGF0YS1zdHJ1Y3R1cmVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLDREQUF1RDtBQWVyRCxnQkFmSyxlQUFLLENBZUw7QUFkUCw0REFBdUQ7QUFhckQsZ0JBYkssZUFBSyxDQWFMO0FBWlAsZ0ZBQTJFO0FBcUJ6RSwwQkFyQksseUJBQWUsQ0FxQkw7QUFwQmpCLDRFQUF1RTtBQW1CckUsd0JBbkJLLHVCQUFhLENBbUJMO0FBbEJmLHdHQUFtRztBQWlCakcsMkJBakJLLDBCQUFnQixDQWlCTDtBQWhCbEIsb0hBQStHO0FBZTdHLCtCQWZLLDhCQUFvQixDQWVMO0FBZHRCLHdHQUFtRztBQVdqRywyQkFYSywwQkFBZ0IsQ0FXTDtBQVZsQix3SEFBbUg7QUFXakgsbUNBWEssa0NBQXdCLENBV0w7QUFWMUIsd0hBQW1IO0FBV2pILG1DQVhLLGtDQUF3QixDQVdMO0FBVjFCLHdHQUFtRztBQU9qRywyQkFQSywwQkFBZ0IsQ0FPTDtBQU5sQiw4RUFBeUU7QUFjdkUsc0JBZEsscUJBQVcsQ0FjTDtBQWJiLHdFQUFtRTtBQWNqRSxvQkFkSyxtQkFBUyxDQWNMIn0=
|
package/lib/exports/helpers.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { generateRandomGraph } from "../app/data-structures/Graph/_helpers/generateRandomGraph";
|
|
2
|
-
import { createLinkedList } from "../app/data-structures/LinkedList/_helpers/createLinkedList";
|
|
3
|
-
import { createBinaryTree } from "../app/data-structures/BinaryTree/_helpers/createBinaryTree";
|
|
4
|
-
import { createGraph } from "../app/data-structures/Graph/_helpers/createGraph";
|
|
5
|
-
import { createGraphFromMatrix } from "../app/data-structures/Graph/_helpers/createGraphFromMatrix";
|
|
6
|
-
export { createGraph, createGraphFromMatrix, createBinaryTree, createLinkedList, generateRandomGraph, };
|
package/lib/exports/helpers.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.generateRandomGraph = exports.createLinkedList = exports.createBinaryTree = exports.createGraphFromMatrix = exports.createGraph = void 0;
|
|
4
|
-
var generateRandomGraph_1 = require("../app/data-structures/Graph/_helpers/generateRandomGraph");
|
|
5
|
-
Object.defineProperty(exports, "generateRandomGraph", { enumerable: true, get: function () { return generateRandomGraph_1.generateRandomGraph; } });
|
|
6
|
-
var createLinkedList_1 = require("../app/data-structures/LinkedList/_helpers/createLinkedList");
|
|
7
|
-
Object.defineProperty(exports, "createLinkedList", { enumerable: true, get: function () { return createLinkedList_1.createLinkedList; } });
|
|
8
|
-
var createBinaryTree_1 = require("../app/data-structures/BinaryTree/_helpers/createBinaryTree");
|
|
9
|
-
Object.defineProperty(exports, "createBinaryTree", { enumerable: true, get: function () { return createBinaryTree_1.createBinaryTree; } });
|
|
10
|
-
var createGraph_1 = require("../app/data-structures/Graph/_helpers/createGraph");
|
|
11
|
-
Object.defineProperty(exports, "createGraph", { enumerable: true, get: function () { return createGraph_1.createGraph; } });
|
|
12
|
-
var createGraphFromMatrix_1 = require("../app/data-structures/Graph/_helpers/createGraphFromMatrix");
|
|
13
|
-
Object.defineProperty(exports, "createGraphFromMatrix", { enumerable: true, get: function () { return createGraphFromMatrix_1.createGraphFromMatrix; } });
|
|
14
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGVscGVycy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9leHBvcnRzL2hlbHBlcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsaUdBQWdHO0FBVzlGLG9HQVhPLHlDQUFtQixPQVdQO0FBVnJCLGdHQUErRjtBQVM3RixpR0FUTyxtQ0FBZ0IsT0FTUDtBQVJsQixnR0FBK0Y7QUFPN0YsaUdBUE8sbUNBQWdCLE9BT1A7QUFObEIsaUZBQWdGO0FBSTlFLDRGQUpPLHlCQUFXLE9BSVA7QUFIYixxR0FBb0c7QUFJbEcsc0dBSk8sNkNBQXFCLE9BSVAifQ==
|
package/lib/exports/sorts.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { bubbleSort } from "../app/algorithms/sorts/bubble-sort";
|
|
2
|
-
import { selectSort } from "../app/algorithms/sorts/select-sort";
|
|
3
|
-
import { mergeSort } from "../app/algorithms/sorts/merge-sort";
|
|
4
|
-
import { insertionSort } from "../app/algorithms/sorts/insertion-sort";
|
|
5
|
-
import { quickSort } from "../app/algorithms/sorts/quick-sort";
|
|
6
|
-
export { bubbleSort, insertionSort, mergeSort, selectSort, quickSort };
|
package/lib/exports/sorts.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.quickSort = exports.selectSort = exports.mergeSort = exports.insertionSort = exports.bubbleSort = void 0;
|
|
4
|
-
var bubble_sort_1 = require("../app/algorithms/sorts/bubble-sort");
|
|
5
|
-
Object.defineProperty(exports, "bubbleSort", { enumerable: true, get: function () { return bubble_sort_1.bubbleSort; } });
|
|
6
|
-
var select_sort_1 = require("../app/algorithms/sorts/select-sort");
|
|
7
|
-
Object.defineProperty(exports, "selectSort", { enumerable: true, get: function () { return select_sort_1.selectSort; } });
|
|
8
|
-
var merge_sort_1 = require("../app/algorithms/sorts/merge-sort");
|
|
9
|
-
Object.defineProperty(exports, "mergeSort", { enumerable: true, get: function () { return merge_sort_1.mergeSort; } });
|
|
10
|
-
var insertion_sort_1 = require("../app/algorithms/sorts/insertion-sort");
|
|
11
|
-
Object.defineProperty(exports, "insertionSort", { enumerable: true, get: function () { return insertion_sort_1.insertionSort; } });
|
|
12
|
-
var quick_sort_1 = require("../app/algorithms/sorts/quick-sort");
|
|
13
|
-
Object.defineProperty(exports, "quickSort", { enumerable: true, get: function () { return quick_sort_1.quickSort; } });
|
|
14
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic29ydHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZXhwb3J0cy9zb3J0cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxtRUFBaUU7QUFNeEQsMkZBTkEsd0JBQVUsT0FNQTtBQUxuQixtRUFBaUU7QUFLbEIsMkZBTHRDLHdCQUFVLE9BS3NDO0FBSnpELGlFQUErRDtBQUkzQiwwRkFKM0Isc0JBQVMsT0FJMkI7QUFIN0MseUVBQXVFO0FBR2xELDhGQUhaLDhCQUFhLE9BR1k7QUFGbEMsaUVBQStEO0FBRUosMEZBRmxELHNCQUFTLE9BRWtEIn0=
|
package/lib/exports/types.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { IllegalArgumentException } from "../exports";
|
|
2
|
-
import { IllegalStateException } from "../exports";
|
|
3
|
-
import { ValueOutOfRangeException } from "../exports";
|
|
4
|
-
import { IsNotFoundException } from "../exports";
|
|
5
|
-
import { IsAlreadyExistsException } from "../exports";
|
|
6
|
-
import { CollectionIsEmptyException } from "../exports";
|
|
7
|
-
import { CollectionIsFullException } from "../exports";
|
|
8
|
-
import { IndexOutOfBoundsException } from "../exports";
|
|
9
|
-
import { EnumTreeTraversalType } from "../app/types/EnumTreeTraversalType";
|
|
10
|
-
import { EnumRandomGenerationFormat } from "../app/types/EnumRandomGenerationFormat";
|
|
11
|
-
import { EnumLinkedListType } from "../app/types/EnumLinkedListType";
|
|
12
|
-
import { EnumBinarySearchTreeType } from "../app/types/EnumBinarySearchTreeType";
|
|
13
|
-
import { EnumGraphType } from "../app/types/EnumGraphType";
|
|
14
|
-
import { EnumGraphTraversalType } from "../app/types/EnumGraphTraversalType";
|
|
15
|
-
import { EnumSortType } from "../app/types/EnumSortType";
|
|
16
|
-
export { IsNotFoundException, IsAlreadyExistsException, ValueOutOfRangeException, IllegalArgumentException, IllegalStateException, IndexOutOfBoundsException, CollectionIsFullException, CollectionIsEmptyException, EnumGraphType, EnumGraphTraversalType, EnumTreeTraversalType, EnumSortType, EnumBinarySearchTreeType, EnumRandomGenerationFormat, EnumLinkedListType, };
|