Merge branch 'master' into dev

This commit is contained in:
Oleksii Trekhleb 2018-05-24 08:45:11 +03:00 committed by GitHub
commit ef387e69c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -190,7 +190,7 @@ Below is the list of some of the most used Big O notations and their performance
| **O(1)** | 1 | 1 | 1 | | **O(1)** | 1 | 1 | 1 |
| **O(log N)** | 3 | 6 | 9 | | **O(log N)** | 3 | 6 | 9 |
| **O(N)** | 10 | 100 | 1000 | | **O(N)** | 10 | 100 | 1000 |
| **O(N log N)** | 30 | 60 | 9000 | | **O(N log N)** | 30 | 600 | 9000 |
| **O(N^2)** | 100 | 10000 | 1000000 | | **O(N^2)** | 100 | 10000 | 1000000 |
| **O(2^N)** | 1024 | 1.26e+29 | 1.07e+301 | | **O(2^N)** | 1024 | 1.26e+29 | 1.07e+301 |
| **O(N!)** | 3628800 | 9.3e+157 | 4.02e+2567 | | **O(N!)** | 3628800 | 9.3e+157 | 4.02e+2567 |

View File

@ -4,7 +4,7 @@
* @return {number[][]} * @return {number[][]}
*/ */
function getPossibleMoves(chessboard, position) { function getPossibleMoves(chessboard, position) {
// Generate all knight moves (event those that goes beyond the board). // Generate all knight moves (even those that go beyond the board).
const possibleMoves = [ const possibleMoves = [
[position[0] - 1, position[1] - 2], [position[0] - 1, position[1] - 2],
[position[0] - 2, position[1] - 1], [position[0] - 2, position[1] - 1],