Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7c55194

Browse files
author
Openset
committed
Update: tag
1 parent 8ea1c34 commit 7c55194

File tree

2 files changed

+25
-38
lines changed

2 files changed

+25
-38
lines changed

‎internal/tag/tag.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,15 @@ func runTag(cmd *base.Command, args []string) {
2323
buf.WriteString("<!--|This file generated by command(leetcode tag); DO NOT EDIT. |-->")
2424
buf.WriteString(base.AuthInfo)
2525
buf.WriteString("\n## 话题分类\n\n")
26-
buf.WriteString("| # | Title | 标题 |\n| :-: | - | :-: |\n")
26+
buf.WriteString("| # | Title | 标题 | | # | Title | 标题 |\n")
27+
buf.WriteString("| :-: | - | :-: | - | :-: | - | :-: |\n")
2728
tags := leetcode.GetTags()
28-
format := "| %d | [%s](https://github.com/openset/leetcode/tree/master/tag/%s) | [%s](https://github.com/openset/leetcode/tree/master/tag/%s) |\n"
29+
format := "| %d | [%s](https://github.com/openset/leetcode/tree/master/tag/%s) | [%s](https://github.com/openset/leetcode/tree/master/tag/%s) |"
2930
for i, tag := range tags {
3031
buf.WriteString(fmt.Sprintf(format, i+1, tag.Name, tag.Slug, tag.TranslatedName, tag.Slug))
32+
if i&1 == 1 {
33+
buf.WriteString("\n")
34+
}
3135
tag.SaveContents()
3236
}
3337
base.FilePutContents("tag/README.md", buf.Bytes())

‎tag/README.md

Lines changed: 19 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -7,39 +7,22 @@
77

88
## 话题分类
99

10-
| # | Title | 标题 |
11-
| :-: | - | :-: |
12-
| 1 | [Array](https://github.com/openset/leetcode/tree/master/tag/array) | [数组](https://github.com/openset/leetcode/tree/master/tag/array) |
13-
| 2 | [Dynamic Programming](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming) | [动态规划](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming) |
14-
| 3 | [String](https://github.com/openset/leetcode/tree/master/tag/string) | [字符串](https://github.com/openset/leetcode/tree/master/tag/string) |
15-
| 4 | [Math](https://github.com/openset/leetcode/tree/master/tag/math) | [数学](https://github.com/openset/leetcode/tree/master/tag/math) |
16-
| 5 | [Tree](https://github.com/openset/leetcode/tree/master/tag/tree) | [](https://github.com/openset/leetcode/tree/master/tag/tree) |
17-
| 6 | [Hash Table](https://github.com/openset/leetcode/tree/master/tag/hash-table) | [哈希表](https://github.com/openset/leetcode/tree/master/tag/hash-table) |
18-
| 7 | [Depth-first Search](https://github.com/openset/leetcode/tree/master/tag/depth-first-search) | [深度优先搜索](https://github.com/openset/leetcode/tree/master/tag/depth-first-search) |
19-
| 8 | [Binary Search](https://github.com/openset/leetcode/tree/master/tag/binary-search) | [二分查找](https://github.com/openset/leetcode/tree/master/tag/binary-search) |
20-
| 9 | [Two Pointers](https://github.com/openset/leetcode/tree/master/tag/two-pointers) | [双指针](https://github.com/openset/leetcode/tree/master/tag/two-pointers) |
21-
| 10 | [Breadth-first Search](https://github.com/openset/leetcode/tree/master/tag/breadth-first-search) | [广度优先搜索](https://github.com/openset/leetcode/tree/master/tag/breadth-first-search) |
22-
| 11 | [Greedy](https://github.com/openset/leetcode/tree/master/tag/greedy) | [贪心算法](https://github.com/openset/leetcode/tree/master/tag/greedy) |
23-
| 12 | [Stack](https://github.com/openset/leetcode/tree/master/tag/stack) | [](https://github.com/openset/leetcode/tree/master/tag/stack) |
24-
| 13 | [Backtracking](https://github.com/openset/leetcode/tree/master/tag/backtracking) | [回溯算法](https://github.com/openset/leetcode/tree/master/tag/backtracking) |
25-
| 14 | [Design](https://github.com/openset/leetcode/tree/master/tag/design) | [设计](https://github.com/openset/leetcode/tree/master/tag/design) |
26-
| 15 | [Linked List](https://github.com/openset/leetcode/tree/master/tag/linked-list) | [链表](https://github.com/openset/leetcode/tree/master/tag/linked-list) |
27-
| 16 | [Bit Manipulation](https://github.com/openset/leetcode/tree/master/tag/bit-manipulation) | [位运算](https://github.com/openset/leetcode/tree/master/tag/bit-manipulation) |
28-
| 17 | [Heap](https://github.com/openset/leetcode/tree/master/tag/heap) | [](https://github.com/openset/leetcode/tree/master/tag/heap) |
29-
| 18 | [Divide and Conquer](https://github.com/openset/leetcode/tree/master/tag/divide-and-conquer) | [分治算法](https://github.com/openset/leetcode/tree/master/tag/divide-and-conquer) |
30-
| 19 | [Sort](https://github.com/openset/leetcode/tree/master/tag/sort) | [排序](https://github.com/openset/leetcode/tree/master/tag/sort) |
31-
| 20 | [Union Find](https://github.com/openset/leetcode/tree/master/tag/union-find) | [并查集](https://github.com/openset/leetcode/tree/master/tag/union-find) |
32-
| 21 | [Queue](https://github.com/openset/leetcode/tree/master/tag/queue) | [队列](https://github.com/openset/leetcode/tree/master/tag/queue) |
33-
| 22 | [Binary Search Tree](https://github.com/openset/leetcode/tree/master/tag/binary-search-tree) | [二叉搜索树](https://github.com/openset/leetcode/tree/master/tag/binary-search-tree) |
34-
| 23 | [Segment Tree](https://github.com/openset/leetcode/tree/master/tag/segment-tree) | [线段树](https://github.com/openset/leetcode/tree/master/tag/segment-tree) |
35-
| 24 | [Minimax](https://github.com/openset/leetcode/tree/master/tag/minimax) | [极小化极大](https://github.com/openset/leetcode/tree/master/tag/minimax) |
36-
| 25 | [Trie](https://github.com/openset/leetcode/tree/master/tag/trie) | [字典树](https://github.com/openset/leetcode/tree/master/tag/trie) |
37-
| 26 | [Recursion](https://github.com/openset/leetcode/tree/master/tag/recursion) | [递归](https://github.com/openset/leetcode/tree/master/tag/recursion) |
38-
| 27 | [Brainteaser](https://github.com/openset/leetcode/tree/master/tag/brainteaser) | [脑筋急转弯](https://github.com/openset/leetcode/tree/master/tag/brainteaser) |
39-
| 28 | [Random](https://github.com/openset/leetcode/tree/master/tag/random) | [](https://github.com/openset/leetcode/tree/master/tag/random) |
40-
| 29 | [Rejection Sampling](https://github.com/openset/leetcode/tree/master/tag/rejection-sampling) | [](https://github.com/openset/leetcode/tree/master/tag/rejection-sampling) |
41-
| 30 | [Geometry](https://github.com/openset/leetcode/tree/master/tag/geometry) | [几何](https://github.com/openset/leetcode/tree/master/tag/geometry) |
42-
| 31 | [Graph](https://github.com/openset/leetcode/tree/master/tag/graph) | [](https://github.com/openset/leetcode/tree/master/tag/graph) |
43-
| 32 | [Topological Sort](https://github.com/openset/leetcode/tree/master/tag/topological-sort) | [拓扑排序](https://github.com/openset/leetcode/tree/master/tag/topological-sort) |
44-
| 33 | [Memoization](https://github.com/openset/leetcode/tree/master/tag/memoization) | [记忆化](https://github.com/openset/leetcode/tree/master/tag/memoization) |
45-
| 34 | [Binary Indexed Tree](https://github.com/openset/leetcode/tree/master/tag/binary-indexed-tree) | [树状数组](https://github.com/openset/leetcode/tree/master/tag/binary-indexed-tree) |
10+
| # | Title | 标题 | | # | Title | 标题 |
11+
| :-: | - | :-: | - | :-: | - | :-: |
12+
| 1 | [Array](https://github.com/openset/leetcode/tree/master/tag/array) | [数组](https://github.com/openset/leetcode/tree/master/tag/array) | | 2 | [Dynamic Programming](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming) | [动态规划](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming) |
13+
| 3 | [String](https://github.com/openset/leetcode/tree/master/tag/string) | [字符串](https://github.com/openset/leetcode/tree/master/tag/string) | | 4 | [Math](https://github.com/openset/leetcode/tree/master/tag/math) | [数学](https://github.com/openset/leetcode/tree/master/tag/math) |
14+
| 5 | [Tree](https://github.com/openset/leetcode/tree/master/tag/tree) | [](https://github.com/openset/leetcode/tree/master/tag/tree) | | 6 | [Hash Table](https://github.com/openset/leetcode/tree/master/tag/hash-table) | [哈希表](https://github.com/openset/leetcode/tree/master/tag/hash-table) |
15+
| 7 | [Depth-first Search](https://github.com/openset/leetcode/tree/master/tag/depth-first-search) | [深度优先搜索](https://github.com/openset/leetcode/tree/master/tag/depth-first-search) | | 8 | [Binary Search](https://github.com/openset/leetcode/tree/master/tag/binary-search) | [二分查找](https://github.com/openset/leetcode/tree/master/tag/binary-search) |
16+
| 9 | [Two Pointers](https://github.com/openset/leetcode/tree/master/tag/two-pointers) | [双指针](https://github.com/openset/leetcode/tree/master/tag/two-pointers) | | 10 | [Breadth-first Search](https://github.com/openset/leetcode/tree/master/tag/breadth-first-search) | [广度优先搜索](https://github.com/openset/leetcode/tree/master/tag/breadth-first-search) |
17+
| 11 | [Greedy](https://github.com/openset/leetcode/tree/master/tag/greedy) | [贪心算法](https://github.com/openset/leetcode/tree/master/tag/greedy) | | 12 | [Stack](https://github.com/openset/leetcode/tree/master/tag/stack) | [](https://github.com/openset/leetcode/tree/master/tag/stack) |
18+
| 13 | [Backtracking](https://github.com/openset/leetcode/tree/master/tag/backtracking) | [回溯算法](https://github.com/openset/leetcode/tree/master/tag/backtracking) | | 14 | [Design](https://github.com/openset/leetcode/tree/master/tag/design) | [设计](https://github.com/openset/leetcode/tree/master/tag/design) |
19+
| 15 | [Linked List](https://github.com/openset/leetcode/tree/master/tag/linked-list) | [链表](https://github.com/openset/leetcode/tree/master/tag/linked-list) | | 16 | [Bit Manipulation](https://github.com/openset/leetcode/tree/master/tag/bit-manipulation) | [位运算](https://github.com/openset/leetcode/tree/master/tag/bit-manipulation) |
20+
| 17 | [Heap](https://github.com/openset/leetcode/tree/master/tag/heap) | [](https://github.com/openset/leetcode/tree/master/tag/heap) | | 18 | [Divide and Conquer](https://github.com/openset/leetcode/tree/master/tag/divide-and-conquer) | [分治算法](https://github.com/openset/leetcode/tree/master/tag/divide-and-conquer) |
21+
| 19 | [Sort](https://github.com/openset/leetcode/tree/master/tag/sort) | [排序](https://github.com/openset/leetcode/tree/master/tag/sort) | | 20 | [Union Find](https://github.com/openset/leetcode/tree/master/tag/union-find) | [并查集](https://github.com/openset/leetcode/tree/master/tag/union-find) |
22+
| 21 | [Queue](https://github.com/openset/leetcode/tree/master/tag/queue) | [队列](https://github.com/openset/leetcode/tree/master/tag/queue) | | 22 | [Binary Search Tree](https://github.com/openset/leetcode/tree/master/tag/binary-search-tree) | [二叉搜索树](https://github.com/openset/leetcode/tree/master/tag/binary-search-tree) |
23+
| 23 | [Segment Tree](https://github.com/openset/leetcode/tree/master/tag/segment-tree) | [线段树](https://github.com/openset/leetcode/tree/master/tag/segment-tree) | | 24 | [Minimax](https://github.com/openset/leetcode/tree/master/tag/minimax) | [极小化极大](https://github.com/openset/leetcode/tree/master/tag/minimax) |
24+
| 25 | [Trie](https://github.com/openset/leetcode/tree/master/tag/trie) | [字典树](https://github.com/openset/leetcode/tree/master/tag/trie) | | 26 | [Recursion](https://github.com/openset/leetcode/tree/master/tag/recursion) | [递归](https://github.com/openset/leetcode/tree/master/tag/recursion) |
25+
| 27 | [Brainteaser](https://github.com/openset/leetcode/tree/master/tag/brainteaser) | [脑筋急转弯](https://github.com/openset/leetcode/tree/master/tag/brainteaser) | | 28 | [Random](https://github.com/openset/leetcode/tree/master/tag/random) | [](https://github.com/openset/leetcode/tree/master/tag/random) |
26+
| 29 | [Rejection Sampling](https://github.com/openset/leetcode/tree/master/tag/rejection-sampling) | [](https://github.com/openset/leetcode/tree/master/tag/rejection-sampling) | | 30 | [Geometry](https://github.com/openset/leetcode/tree/master/tag/geometry) | [几何](https://github.com/openset/leetcode/tree/master/tag/geometry) |
27+
| 31 | [Graph](https://github.com/openset/leetcode/tree/master/tag/graph) | [](https://github.com/openset/leetcode/tree/master/tag/graph) | | 32 | [Topological Sort](https://github.com/openset/leetcode/tree/master/tag/topological-sort) | [拓扑排序](https://github.com/openset/leetcode/tree/master/tag/topological-sort) |
28+
| 33 | [Memoization](https://github.com/openset/leetcode/tree/master/tag/memoization) | [记忆化](https://github.com/openset/leetcode/tree/master/tag/memoization) | | 34 | [Binary Indexed Tree](https://github.com/openset/leetcode/tree/master/tag/binary-indexed-tree) | [树状数组](https://github.com/openset/leetcode/tree/master/tag/binary-indexed-tree) |

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /