- nodejs 10.15.0
- Run with --harmony flag, enabling new ES6 features.
lodash.js
library is included by default.
Source: LeetCode - What are the environments for the programming languages?
The front matter concept is learnt from Jekyll: https://jekyllrb.com/docs/front-matter/
The front matter must be the first thing in the file and must take the form of valid YAML set between triple-dashed lines within a valid JavaScript block comment
Here is a basic example:
/*
---
created: 20190510
updated:
- 20190511
source:
- https://leetcode.com/problems/single-number/
level:
- easy
tags:
- recursive
- linked list
solutions:
- reverseList
- runtime: 52 ms, beats 99.80%
- memory: 35 MB, beats 47.37%
- reverseListRecursive
- runtime: 60 ms, beats 98.89%
- memory: 35.4 MB, beats 15.38%
---
*/
https://leetcode.com/problemset/all/
I use Jest to test the programs, the test cases are defined in the problems/*/index.test.js:
yarn test # test all test cases
CI Tutorials:
- Travis CI Docs
- Coveralls Docs
- Javascript Quality Control with Jest ๐คน and ESLint โจ
- Start measuring code coverage with Jest, Travis CI and Coveralls
- Git commit hooks: Running Jest Tests Before Each Git Commit
- https://github.com/MrHuxu/leetcode: JavaSciript solutions with tests
- https://github.com/invzhi/LeetCode: with Anki Deck
- https://github.com/dnshi/Leetcode: JavaScript solutions without tests