https://github.com/rolling-scopes-school/sudoku
https://github.com/rolling-scopes-school/sudoku
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/rolling-scopes-school/sudoku
- Owner: rolling-scopes-school
- License: mit
- Created: 2019-10-13T13:19:33.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-07-06T16:07:50.000Z (about 5 years ago)
- Last Synced: 2025-03-29T16:07:54.658Z (over 1 year ago)
- Language: JavaScript
- Size: 8.79 KB
- Stars: 13
- Watchers: 6
- Forks: 602
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Sudoku
---
⚠️ DO NOT SUBMIT PRS TO THIS REPO ⚠️
## Task
Implement function `solveSudoku(matrix)`, that for given incomplete matrix will return solved sudoku. `0` means `no value`
[What is sudoku?](https://en.wikipedia.org/wiki/Sudoku)
```js
solveSudoku([
[5, 3, 4, 6, 7, 8, 9, 0, 0],
[6, 7, 2, 1, 9, 5, 3, 4, 8],
[1, 9, 8, 3, 4, 2, 5, 6, 7],
[8, 5, 9, 7, 6, 1, 4, 2, 3],
[4, 2, 6, 8, 5, 3, 7, 9, 1],
[7, 1, 3, 9, 2, 4, 8, 5, 6],
[9, 6, 1, 5, 3, 7, 2, 8, 4],
[2, 8, 7, 4, 1, 9, 6, 3, 5],
[3, 4, 5, 2, 8, 6, 1, 7, 9]
]) /* ->
[5, 3, 4, 6, 7, 8, 9, 1, 2],
[6, 7, 2, 1, 9, 5, 3, 4, 8],
[1, 9, 8, 3, 4, 2, 5, 6, 7],
[8, 5, 9, 7, 6, 1, 4, 2, 3],
[4, 2, 6, 8, 5, 3, 7, 9, 1],
[7, 1, 3, 9, 2, 4, 8, 5, 6],
[9, 6, 1, 5, 3, 7, 2, 8, 4],
[2, 8, 7, 4, 1, 9, 6, 3, 5],
[3, 4, 5, 2, 8, 6, 1, 7, 9]
*/
```
Write your code in `src/index.js`
### Prerequisites
1. Install [Node.js](https://nodejs.org/en/download/)
2. Fork this repository: https://github.com/rolling-scopes-school/sudoku/
3. Clone your newly created repo: https://github.com/<%your_github_username%>/sudoku/
4. Go to folder `sudoku`
5. To install all dependencies use [`npm install`](https://docs.npmjs.com/cli/install)
6. Run `npm test` in command line
7. You will see the number of passing and failing tests. 100% of passing tests is equal to 100p in score
---
### Submit to [rs app](https://app.rs.school)
1. Open [rs app](https://app.rs.school) and login
2. Open `RS APP` and click `Auto Test`
3. Select your task (sudoku)
4. Press the submit button and enjoy
---
### Notes
1. We recommend you to use nodejs of version 10 or lower. If you using any of features that does not supported by node v10, score won't be submitted.
2. Please be sure that each of your test in limit of 30sec.
---
© [yankouskia](https://github.com/yankouskia)