From 28ca7e4c488e33151b57045250a7648766f7798b Mon Sep 17 00:00:00 2001 From: openset Date: Mon, 6 May 2019 11:07:21 +0800 Subject: [PATCH] Add: TranslatedName --- internal/leetcode/topic_tag.go | 1 + tag/README.md | 12 ++++++------ tag/tags.json | 15 ++++++++++----- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/internal/leetcode/topic_tag.go b/internal/leetcode/topic_tag.go index f04f60619..0048a048b 100644 --- a/internal/leetcode/topic_tag.go +++ b/internal/leetcode/topic_tag.go @@ -53,6 +53,7 @@ func tagsUnique(tags []tagType) []tagType { } else { if tag.Name != "" { rs[i-1].Name = tag.Name + rs[i-1].TranslatedName = tag.Name } if tag.TranslatedName != "" { rs[i-1].TranslatedName = tag.TranslatedName diff --git a/tag/README.md b/tag/README.md index 79adf5ed9..b4586a0dd 100644 --- a/tag/README.md +++ b/tag/README.md @@ -20,11 +20,11 @@ | 17 | [Heap](https://github.com/openset/leetcode/tree/master/tag/heap/README.md) | [堆](https://github.com/openset/leetcode/tree/master/tag/heap/README.md) | | 18 | [Sort](https://github.com/openset/leetcode/tree/master/tag/sort/README.md) | [排序](https://github.com/openset/leetcode/tree/master/tag/sort/README.md) | | 19 | [Graph](https://github.com/openset/leetcode/tree/master/tag/graph/README.md) | [图](https://github.com/openset/leetcode/tree/master/tag/graph/README.md) | | 20 | [Union Find](https://github.com/openset/leetcode/tree/master/tag/union-find/README.md) | [并查集](https://github.com/openset/leetcode/tree/master/tag/union-find/README.md) | | 21 | [Divide and Conquer](https://github.com/openset/leetcode/tree/master/tag/divide-and-conquer/README.md) | [分治算法](https://github.com/openset/leetcode/tree/master/tag/divide-and-conquer/README.md) | | 22 | [Trie](https://github.com/openset/leetcode/tree/master/tag/trie/README.md) | [字典树](https://github.com/openset/leetcode/tree/master/tag/trie/README.md) | -| 23 | [Recursion](https://github.com/openset/leetcode/tree/master/tag/recursion/README.md) | [递归](https://github.com/openset/leetcode/tree/master/tag/recursion/README.md) | | 24 | [Sliding Window](https://github.com/openset/leetcode/tree/master/tag/sliding-window/README.md) | [](https://github.com/openset/leetcode/tree/master/tag/sliding-window/README.md) | -| 25 | [Ordered Map](https://github.com/openset/leetcode/tree/master/tag/ordered-map/README.md) | [](https://github.com/openset/leetcode/tree/master/tag/ordered-map/README.md) | | 26 | [Segment Tree](https://github.com/openset/leetcode/tree/master/tag/segment-tree/README.md) | [线段树](https://github.com/openset/leetcode/tree/master/tag/segment-tree/README.md) | +| 23 | [Recursion](https://github.com/openset/leetcode/tree/master/tag/recursion/README.md) | [递归](https://github.com/openset/leetcode/tree/master/tag/recursion/README.md) | | 24 | [Sliding Window](https://github.com/openset/leetcode/tree/master/tag/sliding-window/README.md) | [Sliding Window](https://github.com/openset/leetcode/tree/master/tag/sliding-window/README.md) | +| 25 | [Ordered Map](https://github.com/openset/leetcode/tree/master/tag/ordered-map/README.md) | [Ordered Map](https://github.com/openset/leetcode/tree/master/tag/ordered-map/README.md) | | 26 | [Segment Tree](https://github.com/openset/leetcode/tree/master/tag/segment-tree/README.md) | [线段树](https://github.com/openset/leetcode/tree/master/tag/segment-tree/README.md) | | 27 | [Queue](https://github.com/openset/leetcode/tree/master/tag/queue/README.md) | [队列](https://github.com/openset/leetcode/tree/master/tag/queue/README.md) | | 28 | [Minimax](https://github.com/openset/leetcode/tree/master/tag/minimax/README.md) | [极小化极大](https://github.com/openset/leetcode/tree/master/tag/minimax/README.md) | -| 29 | [Binary Indexed Tree](https://github.com/openset/leetcode/tree/master/tag/binary-indexed-tree/README.md) | [树状数组](https://github.com/openset/leetcode/tree/master/tag/binary-indexed-tree/README.md) | | 30 | [Random](https://github.com/openset/leetcode/tree/master/tag/random/README.md) | [](https://github.com/openset/leetcode/tree/master/tag/random/README.md) | +| 29 | [Binary Indexed Tree](https://github.com/openset/leetcode/tree/master/tag/binary-indexed-tree/README.md) | [树状数组](https://github.com/openset/leetcode/tree/master/tag/binary-indexed-tree/README.md) | | 30 | [Random](https://github.com/openset/leetcode/tree/master/tag/random/README.md) | [Random](https://github.com/openset/leetcode/tree/master/tag/random/README.md) | | 31 | [Topological Sort](https://github.com/openset/leetcode/tree/master/tag/topological-sort/README.md) | [拓扑排序](https://github.com/openset/leetcode/tree/master/tag/topological-sort/README.md) | | 32 | [Brainteaser](https://github.com/openset/leetcode/tree/master/tag/brainteaser/README.md) | [脑筋急转弯](https://github.com/openset/leetcode/tree/master/tag/brainteaser/README.md) | -| 33 | [Geometry](https://github.com/openset/leetcode/tree/master/tag/geometry/README.md) | [几何](https://github.com/openset/leetcode/tree/master/tag/geometry/README.md) | | 34 | [Line Sweep](https://github.com/openset/leetcode/tree/master/tag/line-sweep/README.md) | [](https://github.com/openset/leetcode/tree/master/tag/line-sweep/README.md) | -| 35 | [Rejection Sampling](https://github.com/openset/leetcode/tree/master/tag/rejection-sampling/README.md) | [](https://github.com/openset/leetcode/tree/master/tag/rejection-sampling/README.md) | | 36 | [Reservoir Sampling](https://github.com/openset/leetcode/tree/master/tag/reservoir-sampling/README.md) | [蓄水池抽样](https://github.com/openset/leetcode/tree/master/tag/reservoir-sampling/README.md) | -| 37 | [Memoization](https://github.com/openset/leetcode/tree/master/tag/memoization/README.md) | [记忆化](https://github.com/openset/leetcode/tree/master/tag/memoization/README.md) | \ No newline at end of file +| 33 | [Geometry](https://github.com/openset/leetcode/tree/master/tag/geometry/README.md) | [几何](https://github.com/openset/leetcode/tree/master/tag/geometry/README.md) | | 34 | [Line Sweep](https://github.com/openset/leetcode/tree/master/tag/line-sweep/README.md) | [Line Sweep](https://github.com/openset/leetcode/tree/master/tag/line-sweep/README.md) | +| 35 | [Rejection Sampling](https://github.com/openset/leetcode/tree/master/tag/rejection-sampling/README.md) | [Rejection Sampling](https://github.com/openset/leetcode/tree/master/tag/rejection-sampling/README.md) | | 36 | [Reservoir Sampling](https://github.com/openset/leetcode/tree/master/tag/reservoir-sampling/README.md) | [蓄水池抽样](https://github.com/openset/leetcode/tree/master/tag/reservoir-sampling/README.md) | +| 37 | [Binary Search Tree](https://github.com/openset/leetcode/tree/master/tag/binary-search-tree/README.md) | [二叉搜索树](https://github.com/openset/leetcode/tree/master/tag/binary-search-tree/README.md) | | 38 | [Memoization](https://github.com/openset/leetcode/tree/master/tag/memoization/README.md) | [记忆化](https://github.com/openset/leetcode/tree/master/tag/memoization/README.md) | diff --git a/tag/tags.json b/tag/tags.json index f8342bc3b..559cfd8f9 100644 --- a/tag/tags.json +++ b/tag/tags.json @@ -117,12 +117,12 @@ { "Name": "Sliding Window", "Slug": "sliding-window", - "TranslatedName": "" + "TranslatedName": "Sliding Window" }, { "Name": "Ordered Map", "Slug": "ordered-map", - "TranslatedName": "" + "TranslatedName": "Ordered Map" }, { "Name": "Segment Tree", @@ -147,7 +147,7 @@ { "Name": "Random", "Slug": "random", - "TranslatedName": "" + "TranslatedName": "Random" }, { "Name": "Topological Sort", @@ -167,18 +167,23 @@ { "Name": "Line Sweep", "Slug": "line-sweep", - "TranslatedName": "" + "TranslatedName": "Line Sweep" }, { "Name": "Rejection Sampling", "Slug": "rejection-sampling", - "TranslatedName": "" + "TranslatedName": "Rejection Sampling" }, { "Name": "Reservoir Sampling", "Slug": "reservoir-sampling", "TranslatedName": "蓄水池抽样" }, + { + "Name": "Binary Search Tree", + "Slug": "binary-search-tree", + "TranslatedName": "二叉搜索树" + }, { "Name": "Memoization", "Slug": "memoization",