Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wasswarichard/labyrinth
Shortest path in a 2 dimensional array
https://github.com/wasswarichard/labyrinth
javascript labyrinth labyrinth-route-finder typescript unit-testing webpack
Last synced: 7 days ago
JSON representation
Shortest path in a 2 dimensional array
- Host: GitHub
- URL: https://github.com/wasswarichard/labyrinth
- Owner: wasswarichard
- License: mit
- Created: 2024-08-25T11:45:28.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-09-04T17:34:03.000Z (4 months ago)
- Last Synced: 2024-10-31T11:06:06.880Z (about 2 months ago)
- Topics: javascript, labyrinth, labyrinth-route-finder, typescript, unit-testing, webpack
- Language: TypeScript
- Homepage:
- Size: 142 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Labyrinth
Find the shortest path from the start ("S") to the exit ("E").
Movement is allowed only in four directions: up, down, left, and right. You need to return the
length of the shortest path from "S" to "E". If no path exists, return -1.## Testing the solution
To use the tests, you will need to install Node -- you can do this via the
[download page](http://nodejs.org/#download) or using
[Homebrew](http://mxcl.github.com/homebrew/) if you are on a Mac.You can clone or download this repo. Once you have done so, from the root
directory of the repo, run:```bash
npm install
npm start
```To run the tests
```bash
npm run test
```## Test cases snapshot
![Snapshot of test cases](/docs/testcases.png)
Thanks for your time :)