@raikuxq/alg-ds 1.1.5 → 1.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -14
- package/package.json +1 -1
- package/lib/algorithms/binary-search.d.ts +0 -5
- package/lib/algorithms/binary-search.js +0 -27
- package/lib/algorithms/factorial.d.ts +0 -9
- package/lib/algorithms/factorial.js +0 -17
- package/lib/algorithms/fibonacci.d.ts +0 -9
- package/lib/algorithms/fibonacci.js +0 -17
- package/lib/algorithms/memoize.d.ts +0 -5
- package/lib/algorithms/memoize.js +0 -22
- package/lib/algorithms/sorts/bubble-sort.d.ts +0 -9
- package/lib/algorithms/sorts/bubble-sort.js +0 -23
- package/lib/algorithms/sorts/insertion-sort.d.ts +0 -9
- package/lib/algorithms/sorts/insertion-sort.js +0 -25
- package/lib/algorithms/sorts/merge-sort.d.ts +0 -9
- package/lib/algorithms/sorts/merge-sort.js +0 -61
- package/lib/algorithms/sorts/quick-sort.d.ts +0 -9
- package/lib/algorithms/sorts/quick-sort.js +0 -45
- package/lib/algorithms/sorts/select-sort.d.ts +0 -9
- package/lib/algorithms/sorts/select-sort.js +0 -20
- package/lib/algorithms/transpose-matrix.d.ts +0 -5
- package/lib/algorithms/transpose-matrix.js +0 -20
- package/lib/constants.d.ts +0 -2
- package/lib/constants.js +0 -6
- package/lib/data-structures/BinaryTree/AbstractBinaryTree/AbstractBinaryNode.d.ts +0 -15
- package/lib/data-structures/BinaryTree/AbstractBinaryTree/AbstractBinaryNode.js +0 -53
- package/lib/data-structures/BinaryTree/AbstractBinaryTree/AbstractBinaryTree.d.ts +0 -60
- package/lib/data-structures/BinaryTree/AbstractBinaryTree/AbstractBinaryTree.js +0 -36
- package/lib/data-structures/BinaryTree/BinarySearchTree/BinarySearchNode.d.ts +0 -13
- package/lib/data-structures/BinaryTree/BinarySearchTree/BinarySearchNode.js +0 -59
- package/lib/data-structures/BinaryTree/BinarySearchTree/BinarySearchTree.d.ts +0 -70
- package/lib/data-structures/BinaryTree/BinarySearchTree/BinarySearchTree.js +0 -268
- package/lib/data-structures/BinaryTree/RandBinarySearchTree/RandBinarySearchNode.d.ts +0 -16
- package/lib/data-structures/BinaryTree/RandBinarySearchTree/RandBinarySearchNode.js +0 -70
- package/lib/data-structures/BinaryTree/RandBinarySearchTree/RandBinarySearchTree.d.ts +0 -57
- package/lib/data-structures/BinaryTree/RandBinarySearchTree/RandBinarySearchTree.js +0 -234
- package/lib/data-structures/Graph/AbstractGraph.d.ts +0 -84
- package/lib/data-structures/Graph/AbstractGraph.js +0 -141
- package/lib/data-structures/Graph/DirectedGraph.d.ts +0 -24
- package/lib/data-structures/Graph/DirectedGraph.js +0 -85
- package/lib/data-structures/Graph/GraphEdge.d.ts +0 -16
- package/lib/data-structures/Graph/GraphEdge.js +0 -43
- package/lib/data-structures/Graph/UndirectedGraph.d.ts +0 -28
- package/lib/data-structures/Graph/UndirectedGraph.js +0 -102
- package/lib/data-structures/Graph/demo/generateRandomGraph.d.ts +0 -4
- package/lib/data-structures/Graph/demo/generateRandomGraph.js +0 -72
- package/lib/data-structures/Graph/iterator/AbstractGraphIterator.d.ts +0 -35
- package/lib/data-structures/Graph/iterator/AbstractGraphIterator.js +0 -90
- package/lib/data-structures/Graph/iterator/GraphIteratorBFS.d.ts +0 -28
- package/lib/data-structures/Graph/iterator/GraphIteratorBFS.js +0 -70
- package/lib/data-structures/Graph/iterator/GraphIteratorDFS.d.ts +0 -28
- package/lib/data-structures/Graph/iterator/GraphIteratorDFS.js +0 -70
- package/lib/data-structures/Graph/iterator/GraphIteratorDijkstra.d.ts +0 -32
- package/lib/data-structures/Graph/iterator/GraphIteratorDijkstra.js +0 -99
- package/lib/data-structures/Graph/presenter/presenterAdjacencyLists.d.ts +0 -19
- package/lib/data-structures/Graph/presenter/presenterAdjacencyLists.js +0 -28
- package/lib/data-structures/Graph/presenter/presenterAdjacencyMatrix.d.ts +0 -32
- package/lib/data-structures/Graph/presenter/presenterAdjacencyMatrix.js +0 -48
- package/lib/data-structures/Graph/searching/hasPath.d.ts +0 -9
- package/lib/data-structures/Graph/searching/hasPath.js +0 -29
- package/lib/data-structures/Graph/searching/shortestPath.d.ts +0 -9
- package/lib/data-structures/Graph/searching/shortestPath.js +0 -29
- package/lib/data-structures/Graph/strategy/BFSIterationStrategy.d.ts +0 -6
- package/lib/data-structures/Graph/strategy/BFSIterationStrategy.js +0 -13
- package/lib/data-structures/Graph/strategy/DFSIterationStrategy.d.ts +0 -6
- package/lib/data-structures/Graph/strategy/DFSIterationStrategy.js +0 -13
- package/lib/data-structures/Graph/strategy/DijkstraIterationStrategy.d.ts +0 -6
- package/lib/data-structures/Graph/strategy/DijkstraIterationStrategy.js +0 -13
- package/lib/data-structures/Graph/transposing/transposeDirectedGraph.d.ts +0 -2
- package/lib/data-structures/Graph/transposing/transposeDirectedGraph.js +0 -14
- package/lib/data-structures/HashTable/HashTable.d.ts +0 -73
- package/lib/data-structures/HashTable/HashTable.js +0 -169
- package/lib/data-structures/HashTable/HashTableNode.d.ts +0 -11
- package/lib/data-structures/HashTable/HashTableNode.js +0 -39
- package/lib/data-structures/LinkedList/AbstractLinkedList/AbstractLinkedList.d.ts +0 -125
- package/lib/data-structures/LinkedList/AbstractLinkedList/AbstractLinkedList.js +0 -236
- package/lib/data-structures/LinkedList/AbstractLinkedList/AbstractLinkedNode.d.ts +0 -20
- package/lib/data-structures/LinkedList/AbstractLinkedList/AbstractLinkedNode.js +0 -41
- package/lib/data-structures/LinkedList/DoubleLinkedList/DoubleLinkedList.d.ts +0 -48
- package/lib/data-structures/LinkedList/DoubleLinkedList/DoubleLinkedList.js +0 -150
- package/lib/data-structures/LinkedList/DoubleLinkedList/DoubleLinkedNode.d.ts +0 -25
- package/lib/data-structures/LinkedList/DoubleLinkedList/DoubleLinkedNode.js +0 -65
- package/lib/data-structures/LinkedList/SingleLinkedList/SingleLinkedList.d.ts +0 -52
- package/lib/data-structures/LinkedList/SingleLinkedList/SingleLinkedList.js +0 -137
- package/lib/data-structures/LinkedList/SingleLinkedList/SingleLinkedNode.d.ts +0 -7
- package/lib/data-structures/LinkedList/SingleLinkedList/SingleLinkedNode.js +0 -29
- package/lib/data-structures/LoopedArray/LoopedArray.d.ts +0 -86
- package/lib/data-structures/LoopedArray/LoopedArray.js +0 -161
- package/lib/data-structures/Queue/Queue.d.ts +0 -50
- package/lib/data-structures/Queue/Queue.js +0 -83
- package/lib/data-structures/Stack/Stack.d.ts +0 -50
- package/lib/data-structures/Stack/Stack.js +0 -83
- 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 -11
- package/lib/exports/data-structures.js +0 -24
- 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/utils.d.ts +0 -3
- package/lib/exports/utils.js +0 -14
- package/lib/exports.d.ts +0 -44
- package/lib/exports.js +0 -89
- package/lib/helpers/createBinaryTree.d.ts +0 -6
- package/lib/helpers/createBinaryTree.js +0 -22
- package/lib/helpers/createGraph.d.ts +0 -6
- package/lib/helpers/createGraph.js +0 -24
- package/lib/helpers/createGraphFromMatrix.d.ts +0 -7
- package/lib/helpers/createGraphFromMatrix.js +0 -37
- package/lib/helpers/createLinkedList.d.ts +0 -3
- package/lib/helpers/createLinkedList.js +0 -21
- package/lib/index.d.ts +0 -3
- package/lib/index.js +0 -6
- package/lib/types/ArrayMatrix.d.ts +0 -1
- package/lib/types/ArrayMatrix.js +0 -3
- package/lib/types/EnumBinarySearchTreeType.d.ts +0 -4
- package/lib/types/EnumBinarySearchTreeType.js +0 -9
- package/lib/types/EnumGraphType.d.ts +0 -4
- package/lib/types/EnumGraphType.js +0 -9
- package/lib/types/EnumLinkedListType.d.ts +0 -4
- package/lib/types/EnumLinkedListType.js +0 -9
- package/lib/types/EnumRandomGenerationFormat.d.ts +0 -4
- package/lib/types/EnumRandomGenerationFormat.js +0 -9
- package/lib/types/EnumTreeTraversalType.d.ts +0 -5
- package/lib/types/EnumTreeTraversalType.js +0 -10
- package/lib/types/FnCompareTwo.d.ts +0 -1
- package/lib/types/FnCompareTwo.js +0 -3
- package/lib/types/FnToMemoize.d.ts +0 -1
- package/lib/types/FnToMemoize.js +0 -3
- package/lib/types/IArrayFacade.d.ts +0 -4
- package/lib/types/IArrayFacade.js +0 -3
- package/lib/types/IBiDirectIterable.d.ts +0 -5
- package/lib/types/IBiDirectIterable.js +0 -3
- package/lib/types/IBiDirectIterator.d.ts +0 -11
- package/lib/types/IBiDirectIterator.js +0 -3
- package/lib/types/IBinaryTree.d.ts +0 -12
- package/lib/types/IBinaryTree.js +0 -3
- package/lib/types/IConvertableToArray.d.ts +0 -4
- package/lib/types/IConvertableToArray.js +0 -3
- package/lib/types/IGraph.d.ts +0 -14
- package/lib/types/IGraph.js +0 -3
- package/lib/types/IGraphIterationStrategy.d.ts +0 -5
- package/lib/types/IGraphIterationStrategy.js +0 -3
- package/lib/types/IGraphIterator.d.ts +0 -11
- package/lib/types/IGraphIterator.js +0 -3
- package/lib/types/IIterable.d.ts +0 -4
- package/lib/types/IIterable.js +0 -3
- package/lib/types/IIterator.d.ts +0 -14
- package/lib/types/IIterator.js +0 -3
- package/lib/types/IKeyValueStorage.d.ts +0 -8
- package/lib/types/IKeyValueStorage.js +0 -3
- package/lib/types/ILinearStorage.d.ts +0 -11
- package/lib/types/ILinearStorage.js +0 -3
- package/lib/types/ILinearStorageRA.d.ts +0 -13
- package/lib/types/ILinearStorageRA.js +0 -3
- package/lib/types/ILinkedList.d.ts +0 -4
- package/lib/types/ILinkedList.js +0 -3
- package/lib/utils.d.ts +0 -29
- package/lib/utils.js +0 -95
package/lib/index.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Write your code here
|
|
4
|
-
*/
|
|
5
|
-
console.log("Hello world");
|
|
6
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBOztHQUVHO0FBRUgsT0FBTyxDQUFDLEdBQUcsQ0FBQyxhQUFhLENBQUMsQ0FBQyJ9
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare type ArrayMatrix = Array<Array<number>>;
|
package/lib/types/ArrayMatrix.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQXJyYXlNYXRyaXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdHlwZXMvQXJyYXlNYXRyaXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EnumBinarySearchTreeType = void 0;
|
|
4
|
-
var EnumBinarySearchTreeType;
|
|
5
|
-
(function (EnumBinarySearchTreeType) {
|
|
6
|
-
EnumBinarySearchTreeType["BST"] = "Binary Search Tree";
|
|
7
|
-
EnumBinarySearchTreeType["RANDOMIZED_BST"] = "Randomized Binary Search Tree";
|
|
8
|
-
})(EnumBinarySearchTreeType = exports.EnumBinarySearchTreeType || (exports.EnumBinarySearchTreeType = {}));
|
|
9
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRW51bUJpbmFyeVNlYXJjaFRyZWVUeXBlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3R5cGVzL0VudW1CaW5hcnlTZWFyY2hUcmVlVHlwZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxJQUFZLHdCQUdYO0FBSEQsV0FBWSx3QkFBd0I7SUFDbEMsc0RBQTBCLENBQUE7SUFDMUIsNEVBQWdELENBQUE7QUFDbEQsQ0FBQyxFQUhXLHdCQUF3QixHQUF4QixnQ0FBd0IsS0FBeEIsZ0NBQXdCLFFBR25DIn0=
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EnumGraphType = void 0;
|
|
4
|
-
var EnumGraphType;
|
|
5
|
-
(function (EnumGraphType) {
|
|
6
|
-
EnumGraphType["Directed"] = "Directed";
|
|
7
|
-
EnumGraphType["Undirected"] = "Undirected";
|
|
8
|
-
})(EnumGraphType = exports.EnumGraphType || (exports.EnumGraphType = {}));
|
|
9
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRW51bUdyYXBoVHlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy90eXBlcy9FbnVtR3JhcGhUeXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLElBQVksYUFHWDtBQUhELFdBQVksYUFBYTtJQUN2QixzQ0FBcUIsQ0FBQTtJQUNyQiwwQ0FBeUIsQ0FBQTtBQUMzQixDQUFDLEVBSFcsYUFBYSxHQUFiLHFCQUFhLEtBQWIscUJBQWEsUUFHeEIifQ==
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EnumLinkedListType = void 0;
|
|
4
|
-
var EnumLinkedListType;
|
|
5
|
-
(function (EnumLinkedListType) {
|
|
6
|
-
EnumLinkedListType["DOUBLE"] = "Double linked list";
|
|
7
|
-
EnumLinkedListType["SINGLE"] = "Single linked list";
|
|
8
|
-
})(EnumLinkedListType = exports.EnumLinkedListType || (exports.EnumLinkedListType = {}));
|
|
9
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRW51bUxpbmtlZExpc3RUeXBlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3R5cGVzL0VudW1MaW5rZWRMaXN0VHlwZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxJQUFZLGtCQUdYO0FBSEQsV0FBWSxrQkFBa0I7SUFDNUIsbURBQTZCLENBQUE7SUFDN0IsbURBQTZCLENBQUE7QUFDL0IsQ0FBQyxFQUhXLGtCQUFrQixHQUFsQiwwQkFBa0IsS0FBbEIsMEJBQWtCLFFBRzdCIn0=
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EnumRandomGenerationFormat = void 0;
|
|
4
|
-
var EnumRandomGenerationFormat;
|
|
5
|
-
(function (EnumRandomGenerationFormat) {
|
|
6
|
-
EnumRandomGenerationFormat["Numbers"] = "NUMBERS";
|
|
7
|
-
EnumRandomGenerationFormat["Hash"] = "HASH";
|
|
8
|
-
})(EnumRandomGenerationFormat = exports.EnumRandomGenerationFormat || (exports.EnumRandomGenerationFormat = {}));
|
|
9
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRW51bVJhbmRvbUdlbmVyYXRpb25Gb3JtYXQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdHlwZXMvRW51bVJhbmRvbUdlbmVyYXRpb25Gb3JtYXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsSUFBWSwwQkFHWDtBQUhELFdBQVksMEJBQTBCO0lBQ3BDLGlEQUFtQixDQUFBO0lBQ25CLDJDQUFhLENBQUE7QUFDZixDQUFDLEVBSFcsMEJBQTBCLEdBQTFCLGtDQUEwQixLQUExQixrQ0FBMEIsUUFHckMifQ==
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EnumTreeTraversalType = void 0;
|
|
4
|
-
var EnumTreeTraversalType;
|
|
5
|
-
(function (EnumTreeTraversalType) {
|
|
6
|
-
EnumTreeTraversalType["InOrder"] = "InOrder";
|
|
7
|
-
EnumTreeTraversalType["PreOrder"] = "PreOrder";
|
|
8
|
-
EnumTreeTraversalType["PostOrder"] = "PostOrder";
|
|
9
|
-
})(EnumTreeTraversalType = exports.EnumTreeTraversalType || (exports.EnumTreeTraversalType = {}));
|
|
10
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRW51bVRyZWVUcmF2ZXJzYWxUeXBlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3R5cGVzL0VudW1UcmVlVHJhdmVyc2FsVHlwZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxJQUFZLHFCQUlYO0FBSkQsV0FBWSxxQkFBcUI7SUFDL0IsNENBQW1CLENBQUE7SUFDbkIsOENBQXFCLENBQUE7SUFDckIsZ0RBQXVCLENBQUE7QUFDekIsQ0FBQyxFQUpXLHFCQUFxQixHQUFyQiw2QkFBcUIsS0FBckIsNkJBQXFCLFFBSWhDIn0=
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare type FnCompareTwo<T> = (firstItem: T, secondItem: T) => boolean;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRm5Db21wYXJlVHdvLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3R5cGVzL0ZuQ29tcGFyZVR3by50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare type FnToMemoize<Key, Value> = (...args: Array<Key>) => Value;
|
package/lib/types/FnToMemoize.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRm5Ub01lbW9pemUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdHlwZXMvRm5Ub01lbW9pemUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSUFycmF5RmFjYWRlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3R5cGVzL0lBcnJheUZhY2FkZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSUJpRGlyZWN0SXRlcmFibGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdHlwZXMvSUJpRGlyZWN0SXRlcmFibGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
|
@@ -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSUJpRGlyZWN0SXRlcmF0b3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdHlwZXMvSUJpRGlyZWN0SXRlcmF0b3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
|
@@ -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
|
-
}
|
package/lib/types/IBinaryTree.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSUJpbmFyeVRyZWUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdHlwZXMvSUJpbmFyeVRyZWUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSUNvbnZlcnRhYmxlVG9BcnJheS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy90eXBlcy9JQ29udmVydGFibGVUb0FycmF5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ==
|
package/lib/types/IGraph.d.ts
DELETED
|
@@ -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/types/IGraph.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSUdyYXBoLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3R5cGVzL0lHcmFwaC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSUdyYXBoSXRlcmF0aW9uU3RyYXRlZ3kuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdHlwZXMvSUdyYXBoSXRlcmF0aW9uU3RyYXRlZ3kudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
|
@@ -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSUdyYXBoSXRlcmF0b3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdHlwZXMvSUdyYXBoSXRlcmF0b3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
package/lib/types/IIterable.d.ts
DELETED
package/lib/types/IIterable.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSUl0ZXJhYmxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3R5cGVzL0lJdGVyYWJsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
|
package/lib/types/IIterator.d.ts
DELETED
package/lib/types/IIterator.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSUl0ZXJhdG9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3R5cGVzL0lJdGVyYXRvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSUtleVZhbHVlU3RvcmFnZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy90eXBlcy9JS2V5VmFsdWVTdG9yYWdlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ==
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSUxpbmVhclN0b3JhZ2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdHlwZXMvSUxpbmVhclN0b3JhZ2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
|
@@ -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSUxpbmVhclN0b3JhZ2VSQS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy90eXBlcy9JTGluZWFyU3RvcmFnZVJBLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ==
|
package/lib/types/ILinkedList.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSUxpbmtlZExpc3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdHlwZXMvSUxpbmtlZExpc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9
|
package/lib/utils.d.ts
DELETED
|
@@ -1,29 +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 3 digits after
|
|
20
|
-
*/
|
|
21
|
-
export declare const roundNumber: (num: 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>;
|
package/lib/utils.js
DELETED
|
@@ -1,95 +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.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 3 digits after
|
|
74
|
-
*/
|
|
75
|
-
exports.roundNumber = function (num) {
|
|
76
|
-
return Math.round(num * 1000) / 1000;
|
|
77
|
-
};
|
|
78
|
-
/**
|
|
79
|
-
* Get time execution of function
|
|
80
|
-
*/
|
|
81
|
-
exports.perf = function (fn) {
|
|
82
|
-
var perfStart = perf_hooks_1.performance.now();
|
|
83
|
-
fn();
|
|
84
|
-
var perfEnd = perf_hooks_1.performance.now();
|
|
85
|
-
return perfEnd - perfStart;
|
|
86
|
-
};
|
|
87
|
-
/**
|
|
88
|
-
* Get time execution of function
|
|
89
|
-
*/
|
|
90
|
-
exports.perfAsync = function (fn) { return __awaiter(void 0, void 0, void 0, function () {
|
|
91
|
-
return __generator(this, function (_a) {
|
|
92
|
-
return [2 /*return*/, Promise.resolve(exports.perf(fn))];
|
|
93
|
-
});
|
|
94
|
-
}); };
|
|
95
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvdXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUEseUNBQXlDO0FBRXpDOztHQUVHO0FBQ1UsUUFBQSxXQUFXLEdBQUcsVUFBQyxHQUFrQjtJQUM1QyxPQUFPLEdBQUcsQ0FBQyxNQUFNLENBQUMsVUFBQyxRQUFRLEVBQUUsSUFBSSxFQUFFLEtBQUs7UUFDdEMsT0FBTyxJQUFJLEdBQUcsR0FBRyxDQUFDLFFBQVEsQ0FBQyxDQUFDLENBQUMsQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDLFFBQVEsQ0FBQztJQUNqRCxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUM7QUFDUixDQUFDLENBQUM7QUFFRjs7R0FFRztBQUNVLFFBQUEsb0JBQW9CLEdBQUcsVUFDbEMsR0FBa0IsRUFDbEIsU0FBaUI7SUFFakIsT0FBTyxTQUFTLEdBQUcsbUJBQVcsQ0FBQyxHQUFHLENBQUMsS0FBSyxDQUFDLFNBQVMsQ0FBQyxDQUFDLENBQUM7QUFDdkQsQ0FBQyxDQUFDO0FBRUY7OztHQUdHO0FBQ1UsUUFBQSxjQUFjLEdBQUcsVUFDNUIsR0FBYSxFQUNiLFNBQWlCLEVBQ2pCLFVBQWtCO0lBRWxCLElBQUksU0FBUyxLQUFLLFVBQVUsRUFBRTtRQUM1QixJQUFNLElBQUksR0FBTSxHQUFHLENBQUMsU0FBUyxDQUFDLENBQUM7UUFDL0IsR0FBRyxDQUFDLFNBQVMsQ0FBQyxHQUFHLEdBQUcsQ0FBQyxVQUFVLENBQUMsQ0FBQztRQUNqQyxHQUFHLENBQUMsVUFBVSxDQUFDLEdBQUcsSUFBSSxDQUFDO0tBQ3hCO0FBQ0gsQ0FBQyxDQUFDO0FBRUY7O0dBRUc7QUFDVSxRQUFBLHNCQUFzQixHQUFHLFVBQUMsR0FBVyxFQUFFLEdBQVc7SUFDN0QsT0FBQSxJQUFJLENBQUMsS0FBSyxDQUFDLElBQUksQ0FBQyxNQUFNLEVBQUUsR0FBRyxDQUFDLEdBQUcsR0FBRyxHQUFHLENBQUMsQ0FBQyxHQUFHLEdBQUc7QUFBN0MsQ0FBNkMsQ0FBQztBQUVoRDs7R0FFRztBQUNVLFFBQUEsV0FBVyxHQUFHLFVBQUMsR0FBVztJQUNyQyxPQUFBLElBQUksQ0FBQyxLQUFLLENBQUMsR0FBRyxHQUFHLElBQUksQ0FBQyxHQUFHLElBQUk7QUFBN0IsQ0FBNkIsQ0FBQztBQUVoQzs7R0FFRztBQUNVLFFBQUEsSUFBSSxHQUFHLFVBQUMsRUFBYztJQUNqQyxJQUFNLFNBQVMsR0FBRyx3QkFBVyxDQUFDLEdBQUcsRUFBRSxDQUFDO0lBQ3BDLEVBQUUsRUFBRSxDQUFDO0lBQ0wsSUFBTSxPQUFPLEdBQUcsd0JBQVcsQ0FBQyxHQUFHLEVBQUUsQ0FBQztJQUNsQyxPQUFPLE9BQU8sR0FBRyxTQUFTLENBQUM7QUFDN0IsQ0FBQyxDQUFDO0FBRUY7O0dBRUc7QUFDVSxRQUFBLFNBQVMsR0FBRyxVQUFPLEVBQWM7O1FBQzVDLHNCQUFPLE9BQU8sQ0FBQyxPQUFPLENBQUMsWUFBSSxDQUFDLEVBQUUsQ0FBQyxDQUFDLEVBQUM7O0tBQ2xDLENBQUMifQ==
|