leetcode-init
A tool to creates leetcode code template via cli.
Install
go get -u github.com/WindomZ/leetcode-init/...
Usage
Take the first problem(1. Two Sum) for example:
leetcode-init -k 1
# or
leetcode-init -k two-sum
# or
leetcode-init -k 'Two Sum'
# or
leetcode-init -u 'https://leetcode.com/problems/two-sum'
Then, a directory(name twosum
) is generated under the current path.
.
└── twosum
├── README.md
├── twosum.go
└── twosum_test.go
If with -m TEMPLATE.md
:
leetcode-init -t two-sum -m TEMPLATE.md
loads TEMPLATE.md
file and renders it in the directory.
.
└── twosum
├── README.md
├── TEMPLATE.md
├── twosum.go
└── twosum_test.go
Related
- WindomZ/leetcode.go LeetCode Problem's Solutions(Golang).
Contributing
Welcome to pull requests, report bugs, suggest ideas and discuss leetcode-init on issues page.
If you like it then you can put a
Roadmap
- Support Golang.
- Support JavaScript.
- Support Python.