@@ -4,6 +4,7 @@ title: Commands Help
4
4
---
5
5
6
6
* [ help] ( #help )
7
+ * [ cache] ( #cache )
7
8
* [ list] ( #list )
8
9
* [ show] ( #show )
9
10
* [ star] ( #star )
@@ -49,6 +50,23 @@ Show help on sub command:
49
50
Uppercase means negative, e.g. D(not done) [string]
50
51
--stat, -s Show problems statistics [boolean]
51
52
53
+ # cache
54
+
55
+ Show cached problems.
56
+
57
+ * ` -d ` to delete specific cached problem.
58
+ * ` -a ` to delete all cached problems.
59
+
60
+ * Examples*
61
+
62
+ Show cache:
63
+
64
+ $ leetcode cache
65
+ .user 816.00B 2 hours ago
66
+ problems 148.48K 2 hours ago
67
+ 1.two-sum.algorithms 2.52K 2 hours ago
68
+ ......
69
+
52
70
# list
53
71
54
72
Navigate the problems.
@@ -65,6 +83,10 @@ Navigate the problems.
65
83
* `d` = done = AC-ed, `D` = not AC-ed.
66
84
* `l` = locked, `L` = not locked.
67
85
* `s` = starred, `S` = unstarred.
86
+ * ` -t ` to filter by given tag.
87
+ * algorithms
88
+ * database
89
+ * shell
68
90
* ` -s ` to show statistic counters.
69
91
* ` leetcode list <keyword> ` to search by keyword matching.
70
92
@@ -101,15 +123,21 @@ Display problem details. With `-g`/`-l`/`-x`, the code template could be auto ge
101
123
102
124
* ` -g ` to generate source file.
103
125
* ` -x ` to add problem description in the generated source file.
126
+ * ` -t ` to show code template.
127
+ * ` -d ` to show problem description.
104
128
* ` -l ` to choose programming language. (Depends on which langs are provided on leetcode)
129
+ * bash
105
130
* c
106
131
* cpp
107
132
* csharp
108
133
* golang
109
134
* java
110
135
* javascript
136
+ * mysql
111
137
* python
138
+ * python3
112
139
* ruby
140
+ * scala
113
141
* swift
114
142
* Instead of index number, you can use name to select a problem.
115
143
* `leetcode show 1`
@@ -124,6 +152,7 @@ Display problem details. With `-g`/`-l`/`-x`, the code template could be auto ge
124
152
125
153
https://leetcode.com/problems/two-sum/
126
154
155
+ * algorithms
127
156
* Easy (25.6%)
128
157
* Total Accepted: 274880
129
158
* Total Submissions: 1074257
@@ -143,6 +172,16 @@ Display problem details. With `-g`/`-l`/`-x`, the code template could be auto ge
143
172
UPDATE (2016/2/13):
144
173
The return format had been changed to zero-based indices. Please read the above updated description carefully.
145
174
175
+ Only show the code template:
176
+
177
+ $ leetcode show -t --no-desc 1
178
+ class Solution {
179
+ public:
180
+ vector<int> twoSum(vector<int>& nums, int target) {
181
+
182
+ }
183
+ };
184
+
146
185
# star
147
186
148
187
Mark your favorite problems. The starred problem will be shown with a ` ★ ` .
@@ -165,6 +204,10 @@ Mark your favorite problems. The starred problem will be shown with a `★`.
165
204
Show your personal statistics of the problems progress.
166
205
167
206
* ` -g ` to show the heatmap graph.
207
+ * ` -t ` to show statistics on given tag. E.g.
208
+ * algorithms
209
+ * database
210
+ * shell
168
211
169
212
* Example*
170
213
@@ -210,6 +253,7 @@ Available options:
210
253
211
254
* ` -o ` to specify the output folder.
212
255
* ` -a ` to work against all problems.
256
+ * ` -l ` to specify the desired programming language.
213
257
* ` -x ` to add problem details in the output file.
214
258
* Or work against specfic problem only.
215
259
* `leetcode submission 1`
@@ -236,13 +280,17 @@ Submit code to leetcode.com.
236
280
237
281
✔ Accepted
238
282
✔ 16/16 cases passed (12 ms)
283
+ ✔ Your runtime beats 49.89 % of cpp submissions
239
284
240
285
# test
241
286
242
287
Customize your testcase and run it against leetcode. If no testcase provided, a default testcase will be used.
243
288
244
289
* ` -t ` to provide test case in command line.
290
+ * NOTE: use single quote `'` to surround your test case. (double quote is NOT safe in bash shell due to escaping)
245
291
* ` -i ` to provide test case in interactive mode.
292
+ * on Linux/MacOS, press `Ctrl-D` to finish input.
293
+ * on Windows, press `Ctrl-D` and `Return` to finish input.
246
294
247
295
* Examples*
248
296
@@ -307,17 +355,13 @@ Verbose:
307
355
Config: /Users/skygragon/.lcconfig
308
356
309
357
[Configuration]
310
- AUTO_LOGIN: true
311
- COLOR_THEME: default
312
- LANG: java
313
- MAX_WORKERS: 10
314
- URL_BASE: https://leetcode.com
315
- URL_LOGIN: https://leetcode.com/accounts/login/
316
- URL_PROBLEM: https://leetcode.com/problems/$id
317
- URL_PROBLEMS: https://leetcode.com/api/problems/algorithms/
318
- URL_SUBMISSION: https://leetcode.com/submissions/detail/$id/
319
- URL_SUBMISSIONS: https://leetcode.com/problems/$key/submissions/
320
- URL_SUBMIT: https://leetcode.com/problems/$key/submit/
321
- URL_TEST: https://leetcode.com/problems/$key/interpret_solution/
322
- URL_VERIFY: https://leetcode.com/submissions/detail/$id/check/
323
- USE_COLOR: true
358
+ AUTO_LOGIN true
359
+ COLOR_THEME orange
360
+ ICON_THEME default
361
+ LANG cpp
362
+ MAX_WORKERS 10
363
+ USE_COLOR true
364
+
365
+ [Themes]
366
+ Colors blue,dark,default,orange,pink
367
+ Icons ascii,default,win7
0 commit comments