@raikuxq/alg-ds 1.1.3 → 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.
Files changed (2) hide show
  1. package/README.md +26 -16
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -2,7 +2,32 @@ Common algorithms and data structures.
2
2
 
3
3
  Written in TypeScript, tested with Jest.
4
4
 
5
- # Getting started
5
+
6
+ # Usage as package
7
+ Install by using any of these commands:
8
+ + `yarn add @raikuxq/alg-ds`
9
+ + `npm install @raikuxq/alg-ds --save`
10
+
11
+ ## Import from root
12
+ `import { <anything> } from '@raikuxq/alg-ds'`
13
+
14
+ ## Import from sub-paths
15
+ ### Data structures
16
+ `import {Stack, Queue, SingleLinkedList, DoubleLinkedList, RandBinarySearchTree, BinarySearchTree, DirectedGraph, UndirectedGraph, LoopedArray, HashTable, } from '@raikuxq/alg-ds/lib/exports/data-structures'`
17
+ ### Sorting algorithms
18
+ `import {bubbleSort, insertionSort, mergeSort, selectSort, quickSort} from '@raikuxq/alg-ds/lib/exports/data-structures `
19
+ ### Other algorithms
20
+ `import {binarySearch, factorial, memoizedFactorial, memoizedFibonacci, fibonacci, transposeMatrix, GraphIteratorDFS, presenterAdjacencyLists, presenterAdjacencyMatrix, hasPath, shortestPath, DijkstraIterationStrategy, DFSIterationStrategy, BFSIterationStrategy, GraphIteratorBFS, GraphIteratorDijkstra, transposeDirectedGraph} from '@raikuxq/alg-ds/lib/exports/algorithms'`
21
+ ### Helpers
22
+ `import {createGraph, createGraphFromMatrix, createBinaryTree, createLinkedList, generateRandomGraph} from '@raikuxq/alg-ds/lib/exports/helpers`
23
+ ### Utils
24
+ `import {perf, getMinIndex, getMinIndexFromIndex, memoize, perfAsync, roundNumber, randomizeNumberInRange, swapArrayItems} from '@raikuxq/alg-ds/lib/exports/utils'`
25
+ ### Constants
26
+ `import {EDGE_NOT_EXISTS_STATE, EDGE_EXISTS_STATE} from '@raikuxq/alg-ds/lib/exports/constants'`
27
+
28
+
29
+
30
+ # Usage as repository
6
31
 
7
32
  Clone this repository and install dependencies by using `yarn` command.
8
33
 
@@ -19,11 +44,9 @@ Clone this repository and install dependencies by using `yarn` command.
19
44
  + `yarn lint:fix` - fix source files via eslint
20
45
 
21
46
 
22
-
23
47
  # Navigation
24
48
  + [Algorithms](#algorithms)
25
49
  + [Sorting algorithms](#sorting-algorithms)
26
- + [Iterators](#iterators)
27
50
  + [Linear data structures](#linear-data-structures)
28
51
  + [Linked list](#linked-list)
29
52
  + [Looped array](#looped-array)
@@ -63,19 +86,6 @@ Clone this repository and install dependencies by using `yarn` command.
63
86
 
64
87
 
65
88
 
66
- # Iterators
67
-
68
- ### Interfaces
69
- [IIterable](src/types/IIterable.ts) — Allows to create an iterator instance.
70
-
71
- [IBiDirectIterable](src/types/IBiDirectIterable.ts) — Allows to create a bi-direct iterator instance.
72
- Extends [IIterable](src/types/IIterable.ts) interface.
73
-
74
- [IIterator](src/types/IIterator.ts) — Allows only next navigation.
75
-
76
- [IBiDirectIterator](src/types/IBiDirectIterator.ts) — Allows both next and prev navigation.
77
- Extends [IIterator](src/types/IIterator.ts) interface.
78
-
79
89
 
80
90
  # Linear data structures
81
91
 
package/package.json CHANGED
@@ -12,8 +12,8 @@
12
12
  "type": "git",
13
13
  "url": "https://github.com/raikuxq/lab-ts-algorithms"
14
14
  },
15
- "main": "./src/exports.js",
16
- "types": "./src/exports.d.ts",
15
+ "main": "./lib/exports.js",
16
+ "types": "./lib/exports.d.ts",
17
17
  "files": [
18
18
  "lib",
19
19
  "README.md",
@@ -38,5 +38,5 @@
38
38
  "typescript": "^4.0.3"
39
39
  },
40
40
  "dependencies": {},
41
- "version": "1.1.3"
41
+ "version": "1.1.6"
42
42
  }