@raikuxq/alg-ds 1.1.4 → 1.1.5

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 -2
  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,7 +44,6 @@ 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)
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.4"
41
+ "version": "1.1.5"
42
42
  }