Skip to content

Commit 4ffedcb

Browse files
committed
add replace rules
1 parent 59821ab commit 4ffedcb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

copypasta/template/leetcode/helper.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,13 @@ func renameInputArgs(funcDefineLine string) string {
7878
"arr", "a",
7979
"array", "a",
8080
"stones", "a",
81+
"prices", "a",
8182
"mat", "a",
8283
"matrix", "a",
8384
"grid", "g",
8485
"grid1", "g1",
8586
"grid2", "g2",
87+
"words", "a",
8688

8789
// 字符串
8890
"word", "s",
@@ -92,10 +94,14 @@ func renameInputArgs(funcDefineLine string) string {
9294
"s2", "y",
9395

9496
// 其余常见变量名
97+
"num", "n",
9598
"edges", "es",
9699
"points", "ps",
100+
"pairs", "ps",
97101
"queries", "qs",
98-
"source", "src",
102+
"startPos", "st",
103+
"start", "st",
104+
"source", "st",
99105
"target", "tar",
100106
"limit", "lim",
101107
"index", "id",

0 commit comments

Comments
 (0)