This is my leetcode solutions in javaScript, included some implementations for the useful data structures and algorithms.
See: https://williammer.github.io/leetcode-js
Note: all the npm run xx commands below can be replaced with the shorter yarn xx command, or
nr xx command if installed "npm-quick-run".
$ npm iAdd:
$ npm run do add <question number> <question title>Copy:
$ npm do cp <question number> <question title> <question number to be copied>Remove:
$ npm run do rm <question number>To test all suites:
$ npm testTo test one or some suites:
$ npm test <regexForTestFiles>Watch mode:
$ npm run test:watchor:
$ npm test -- --watchwith codecov report:
$ npm run test:codecovYou can also use jest cli to run test with extra options.
After the test finished running, a __testReport.html file will be generated.
You can open it in browser to see a clearer version of test report.