layout | title |
---|---|
default |
Installation |
node.js
(npm
included) required, please follow the installation guide:
Please install the latest LTS version on the list above.
Then verify the result:
$ node -v
$ npm -v
Choose one of the following ways to install leetcode-cli:
This will install the latest stable version, but not include the latest development version.
$ npm install -g leetcode-cli
In case Ubuntu failed due to permission denied
, run following and try again:
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
$ source ~/.bashrc
$ nvm install --lts
See more details here.
This will install the latest development version on GitHub.
$ npm install -g skygragon/leetcode-cli
Similar with above, while you can introduce your own changes as you wish.
$ git clone http://github.com/skygragon/leetcode-cli
$ cd leetcode-cli && ./bin/install
Then verify the result:
$ leetcode version