Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tychota/rice
https://github.com/tychota/rice
Last synced: 22 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/tychota/rice
- Owner: tychota
- Created: 2022-06-03T15:15:21.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-06-08T14:38:10.000Z (over 2 years ago)
- Last Synced: 2024-11-06T02:23:35.008Z (2 months ago)
- Language: TypeScript
- Size: 161 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rice
The goal is to write an algorithm that simulate a mouse on a chess board.
The mouse can only go down and right.The mouse start from the upper left and must reach the bottom right.
Some rice grain are on the board.
The mouse want to know how many rice grain can be collected at maximum.The exact path is not interesting.
## Get started
```bash
yarn test
```## Optimization
To keep the complexity under control, lets introduce a few optimizations.
- memoization
![memoization](2022-06-03-17-10-39.png)