Update READMEs.

This commit is contained in:
Oleksii Trekhleb
2018-04-12 08:46:35 +03:00
parent e05d159765
commit e27ccedf28
4 changed files with 54 additions and 40 deletions

View File

@@ -1,27 +0,0 @@
# Algorithms
## Dynamic Programming (DP)
**Useful Links**
- [Introduction to Dynamic Programming 1](https://www.hackerearth.com/practice/algorithms/dynamic-programming/introduction-to-dynamic-programming-1/tutorial/)
## Big O Notation
Order of growth of algorithms specified in Big O notation.
![Big O graphs](https://github.com/trekhleb/javascript-algorithms/blob/master/assets/big-o-graph.png)
Source: [Big O Cheat Sheet](http://bigocheatsheet.com/).
Below is the list of some of the most used Big O notations and their performance comparisons against different sizes of the input data.
| Big O Notation | Computations for 10 elements | Computations for 100 elements | Computations for 1000 elements |
| -------------- | ---------------------------- | ----------------------------- | ------------------------------- |
| **O(1)** | 1 | 1 | 1 |
| **O(log N)** | 3 | 6 | 9 |
| **O(N)** | 10 | 100 | 1000 |
| **O(N log N)** | 30 | 60 | 9000 |
| **O(N^2)** | 100 | 10000 | 1000000 |
| **O(2^N)** | 1024 | 1.26e+29 | 1.07e+301 |
| **O(N!)** | 3628800 | 9.3e+157 | 4.02e+2567 |

View File

@@ -1,7 +0,0 @@
# Data Structures
## Common Data Structure Operations
![Common Data Structure Operations](https://github.com/trekhleb/javascript-algorithms/blob/master/assets/big-o-data-structures.png)
Source: [Big O Cheat Sheet](http://bigocheatsheet.com/).

View File

@@ -3,3 +3,9 @@
You may use `playground.js` file to play with data
structures and algorithms. The code from `playground.js` may
be tested in `./__test__/playground.test.js` file.
To run tests simply run:
```
npm test -- -t 'playground'
```