This is an Emacs plugin that makes it easier and faster to write leetcode programs.
- leetcode-cli
This tool is based on leetcode-cli, You can install the latest version through its website.
- ctable
This tool uses the emacs package ctable
to show all leetcode issues,
you can download it from github or install it using ELPA.
- names
This tool uses the emacs package names
manage namespace,
you can download it from github or install it using ELPA.
- clone the project in your own emacs configuration files directory, like:
git clone [email protected]:ginqi7/leetcode-emacs.git ~/.emacs.d/lisp/leetcode
- add the path to ‘load-path’
(add-to-list 'load-path (expand-file-name "~/.emacs.d/lisp/leetcode"))
you can use the ‘use-package’, there are two configurable variable.
leetcode-path
: assign the path to save the solution codesleetcode-language
: assign the the language of the solutions
(use-package leetcode
:config
(setq leetcode-path "~/Dropbox/Leetcode/"
leetcode-language "java")
)
leetcode-login:
leetcode-logout:
leetcode-list-all:
leetcode-show n: show a description and generate a code’s template of a specific question. The parameter of function is the question’s index number.
leetcode-show-next:
If you solve the question in order, you can go to the next question through leetcode-show-next
.
leetcode-submit:
leetcode-test:
You can specify a test case to check if the answer is correct.