Skip to content

Commit 98c1be1

Browse files
author
Shuo
authored
Merge pull request #662 from openset/develop
Add: link
2 parents a02073b + 2537e0e commit 98c1be1

File tree

1,199 files changed

+1273
-1212
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,199 files changed

+1273
-1212
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ LeetCode Problems' Solutions
5454

5555
| # | Title | Solution | Difficulty |
5656
| :-: | - | - | :-: |
57+
| <span id="1195">1195</span> | [Fizz Buzz Multithreaded](https://leetcode.com/problems/fizz-buzz-multithreaded) | [Go](https://github.com/openset/leetcode/tree/master/problems/fizz-buzz-multithreaded) | Medium |
5758
| <span id="1194">1194</span> | [Tournament Winners](https://leetcode.com/problems/tournament-winners) 🔒 | [MySQL](https://github.com/openset/leetcode/tree/master/problems/tournament-winners) | Hard |
5859
| <span id="1193">1193</span> | [Monthly Transactions I](https://leetcode.com/problems/monthly-transactions-i) 🔒 | [MySQL](https://github.com/openset/leetcode/tree/master/problems/monthly-transactions-i) | Medium |
5960
| <span id="1192">1192</span> | [Critical Connections in a Network](https://leetcode.com/problems/critical-connections-in-a-network "查找集群内的「关键连接」") | [Go](https://github.com/openset/leetcode/tree/master/problems/critical-connections-in-a-network) | Hard |
@@ -165,7 +166,7 @@ LeetCode Problems' Solutions
165166
| <span id="1086">1086</span> | [High Five](https://leetcode.com/problems/high-five "前五科的均分") 🔒 | [Go](https://github.com/openset/leetcode/tree/master/problems/high-five) | Easy |
166167
| <span id="1085">1085</span> | [Sum of Digits in the Minimum Number](https://leetcode.com/problems/sum-of-digits-in-the-minimum-number "最小元素各数位之和") 🔒 | [Go](https://github.com/openset/leetcode/tree/master/problems/sum-of-digits-in-the-minimum-number) | Easy |
167168
| <span id="1084">1084</span> | [Sales Analysis III](https://leetcode.com/problems/sales-analysis-iii) 🔒 | [MySQL](https://github.com/openset/leetcode/tree/master/problems/sales-analysis-iii) | Easy |
168-
| <span id="1083">1083</span> | [Sales Analysis II](https://leetcode.com/problems/sales-analysis-ii) 🔒 | [MySQL](https://github.com/openset/leetcode/tree/master/problems/sales-analysis-ii) | Easy |
169+
| <span id="1083">1083</span> | [Sales Analysis II](https://leetcode.com/problems/sales-analysis-ii "1083. 销售分析II") 🔒 | [MySQL](https://github.com/openset/leetcode/tree/master/problems/sales-analysis-ii) | Easy |
169170
| <span id="1082">1082</span> | [Sales Analysis I](https://leetcode.com/problems/sales-analysis-i "销售分析 I ") 🔒 | [MySQL](https://github.com/openset/leetcode/tree/master/problems/sales-analysis-i) | Easy |
170171
| <span id="1081">1081</span> | [Smallest Subsequence of Distinct Characters](https://leetcode.com/problems/smallest-subsequence-of-distinct-characters "不同字符的最小子序列") | [Go](https://github.com/openset/leetcode/tree/master/problems/smallest-subsequence-of-distinct-characters) | Medium |
171172
| <span id="1080">1080</span> | [Insufficient Nodes in Root to Leaf Paths](https://leetcode.com/problems/insufficient-nodes-in-root-to-leaf-paths "根到叶路径上的不足节点") | [Go](https://github.com/openset/leetcode/tree/master/problems/insufficient-nodes-in-root-to-leaf-paths) | Medium |

internal/leetcode/question_data.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,13 @@ func (question *questionType) getDescContent() []byte {
112112
var buf bytes.Buffer
113113
buf.WriteString(authInfo("description"))
114114
buf.WriteString(question.getNavigation())
115-
buf.WriteString(fmt.Sprintf("\n## %s. %s%s\n\n", question.QuestionFrontendId, question.Title, question.Difficulty.Str()))
115+
buf.WriteString(fmt.Sprintf("\n## [%s. %s%s](%s \"%s\")\n\n",
116+
question.QuestionFrontendId,
117+
question.Title,
118+
question.Difficulty.Str(),
119+
question.LeetCodeUrl(),
120+
question.TranslatedTitle,
121+
))
116122
cts := filterContents(question.Content)
117123
// remove style
118124
reg := regexp.MustCompile(`<style[\S\s]+?</style>`)
@@ -197,6 +203,10 @@ func (question *questionType) TitleSnake() string {
197203
return slugToSnake(question.TitleSlug)
198204
}
199205

206+
func (question *questionType) LeetCodeUrl() string {
207+
return "https://leetcode.com/problems/" + question.TitleSlug
208+
}
209+
200210
func (question *questionType) PackageName() string {
201211
return "problem_" + question.QuestionFrontendId
202212
}

internal/version/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"github.com/openset/leetcode/internal/base"
88
)
99

10-
const version = "1.4.7"
10+
const version = "1.4.8"
1111

1212
var CmdVersion = &base.Command{
1313
Run: runVersion,

problems/01-matrix/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
[Next >](https://github.com/openset/leetcode/tree/master/problems/diameter-of-binary-tree "Diameter of Binary Tree")
1111

12-
## 542. 01 Matrix (Medium)
12+
## [542. 01 Matrix (Medium)](https://leetcode.com/problems/01-matrix "01 矩阵")
1313

1414
<p>Given a matrix consists of 0 and 1, find the distance of the nearest 0 for each cell.</p>
1515

problems/1-bit-and-2-bit-characters/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
[Next >](https://github.com/openset/leetcode/tree/master/problems/maximum-length-of-repeated-subarray "Maximum Length of Repeated Subarray")
1111

12-
## 717. 1-bit and 2-bit Characters (Easy)
12+
## [717. 1-bit and 2-bit Characters (Easy)](https://leetcode.com/problems/1-bit-and-2-bit-characters "1比特与2比特字符")
1313

1414
<p>We have two special characters. The first character can be represented by one bit <code>0</code>. The second character can be represented by two bits (<code>10</code> or <code>11</code>). </p>
1515

problems/132-pattern/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
[Next >](https://github.com/openset/leetcode/tree/master/problems/circular-array-loop "Circular Array Loop")
1111

12-
## 456. 132 Pattern (Medium)
12+
## [456. 132 Pattern (Medium)](https://leetcode.com/problems/132-pattern "132模式")
1313

1414
<p>
1515
Given a sequence of n integers a<sub>1</sub>, a<sub>2</sub>, ..., a<sub>n</sub>, a 132 pattern is a subsequence a<sub><b>i</b></sub>, a<sub><b>j</b></sub>, a<sub><b>k</b></sub> such

problems/2-keys-keyboard/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
[Next >](https://github.com/openset/leetcode/tree/master/problems/4-keys-keyboard "4 Keys Keyboard")
1111

12-
## 650. 2 Keys Keyboard (Medium)
12+
## [650. 2 Keys Keyboard (Medium)](https://leetcode.com/problems/2-keys-keyboard "只有两个键的键盘")
1313

1414
<p>Initially on a notepad only one character &#39;A&#39; is present. You can perform two operations on this notepad for each step:</p>
1515

problems/24-game/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
[Next >](https://github.com/openset/leetcode/tree/master/problems/valid-palindrome-ii "Valid Palindrome II")
1111

12-
## 679. 24 Game (Hard)
12+
## [679. 24 Game (Hard)](https://leetcode.com/problems/24-game "24 点游戏")
1313

1414
<p>
1515
You have 4 cards each containing a number from 1 to 9. You need to judge whether they could operated through <code>*</code>, <code>/</code>, <code>+</code>, <code>-</code>, <code>(</code>, <code>)</code> to get the value of 24.

problems/3sum-closest/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
[Next >](https://github.com/openset/leetcode/tree/master/problems/letter-combinations-of-a-phone-number "Letter Combinations of a Phone Number")
1111

12-
## 16. 3Sum Closest (Medium)
12+
## [16. 3Sum Closest (Medium)](https://leetcode.com/problems/3sum-closest "最接近的三数之和")
1313

1414
<p>Given an array <code>nums</code> of <em>n</em> integers and an integer <code>target</code>, find three integers in <code>nums</code>&nbsp;such that the sum is closest to&nbsp;<code>target</code>. Return the sum of the three integers. You may assume that each input would have exactly one solution.</p>
1515

problems/3sum-smaller/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
[Next >](https://github.com/openset/leetcode/tree/master/problems/single-number-iii "Single Number III")
1111

12-
## 259. 3Sum Smaller (Medium)
12+
## [259. 3Sum Smaller (Medium)](https://leetcode.com/problems/3sum-smaller "较小的三数之和")
1313

1414

1515

0 commit comments

Comments
 (0)