Algorithms, Data Structure problems and solutions written in Javascript, including test cases.
- Environment: NodeJS.
- Under project directory.
- Install packages
npm install
- Test cases
npm run test
- Test and watch code change
npm run watch
- Test one case or cases under one directory
npm run test <file name or directory name>
Under project directory:
- Build image
docker build -t js-algo-docker .
- Run test cases
docker run js-algo-docker
This is useful for dev and tests.
Under project directory:
docker compose watch
To view the test results, you can either use Docker desktop or run
docker logs <container-name> -f
Any changes made locally will trigger the re-run of test cases.
/**
* @name
* @description
* @example
* @param
* @returns
* @solution
* @source
*/