Skip to content

Commit b4eab90

Browse files
committed
Fix 303、307、167、653、1017 multi ‘--’ cause link bad
1 parent c839a96 commit b4eab90

37 files changed

+329
-317
lines changed

README.md

Lines changed: 206 additions & 206 deletions
Large diffs are not rendered by default.

ctl/models/tagproblem.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,18 @@ func GenerateTagMdRows(solutionIds []int, metaMap map[int]TagList, mdrows []Mdro
131131
s6 := strings.Replace(s5, ",", "", -1)
132132
s7 := strings.Replace(s6, "?", "", -1)
133133
if internal {
134+
count := 0
135+
// 去掉 --- 这种情况,这种情况是由于题目标题中包含 - ,左右有空格,左右一填充,造成了 ---,3 个 -
136+
for i := 0; i < len(s7)-2; i++ {
137+
if s7[i] == '-' && s7[i+1] == '-' && s7[i+2] == '-' {
138+
fmt.Printf("【需要修正的标题是 %v】\n", fmt.Sprintf("%04d.%v", int(row.FrontendQuestionID), s7))
139+
s7 = s7[:i+1] + s7[i+3:]
140+
count++
141+
}
142+
}
143+
if count > 0 {
144+
fmt.Printf("总共修正了 %v 个标题\n", count)
145+
}
134146
tmp.SolutionPath = fmt.Sprintf("[Go]({{< relref \"/ChapterFour/%v/%v.md\" >}})", util.GetChpaterFourFileNum(int(row.FrontendQuestionID)), fmt.Sprintf("%04d.%v", int(row.FrontendQuestionID), s7))
135147
} else {
136148
tmp.SolutionPath = fmt.Sprintf("[Go](https://books.halfrost.com/leetcode/ChapterFour/%v/%v)", util.GetChpaterFourFileNum(int(row.FrontendQuestionID)), fmt.Sprintf("%04d.%v", int(row.FrontendQuestionID), s7))
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
package leetcode
22

3-
import "fmt"
4-
53
func validateStackSequences(pushed []int, popped []int) bool {
64
stack, j, N := []int{}, 0, len(pushed)
75
for _, x := range pushed {
86
stack = append(stack, x)
9-
fmt.Printf("stack = %v j = %v\n", stack, j)
107
for len(stack) != 0 && j < N && stack[len(stack)-1] == popped[j] {
118
stack = stack[0 : len(stack)-1]
129
j++
1310
}
14-
fmt.Printf("*****stack = %v j = %v\n", stack, j)
1511
}
1612
return j == N
1713
}

website/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,5 +147,5 @@ disablePathToLower = true
147147
pagerDirection= "last" # Comment sorting direction, available values are 'last' and 'first'.
148148
createIssueManually= true # If it is 'false', it is auto to make a Github issue when the administrators login.
149149
distractionFreeMode= true # Enable hot key (cmd|ctrl + enter) submit comment.
150-
proxy= "https://netnr-proxy.cloudno.de/https://github.com/login/oauth/access_token"
150+
proxy= "https://shielded-brushlands-08810.herokuapp.com/https://github.com/login/oauth/access_token"
151151

website/content/ChapterFour/0100~0199/0164.Maximum-Gap.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,5 +140,5 @@ func max(a int, b int) int {
140140
----------------------------------------------
141141
<div style="display: flex;justify-content: space-between;align-items: center;">
142142
<p><a href="https://books.halfrost.com/leetcode/ChapterFour/0100~0199/0162.Find-Peak-Element/">⬅️上一页</a></p>
143-
<p><a href="https://books.halfrost.com/leetcode/ChapterFour/0100~0199/0167.Two-Sum-II---Input-array-is-sorted/">下一页➡️</a></p>
143+
<p><a href="https://books.halfrost.com/leetcode/ChapterFour/0100~0199/0167.Two-Sum-II-Input-array-is-sorted/">下一页➡️</a></p>
144144
</div>

website/content/ChapterFour/0100~0199/0168.Excel-Sheet-Column-Title.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,6 @@ func convertToTitle(n int) string {
8282

8383
----------------------------------------------
8484
<div style="display: flex;justify-content: space-between;align-items: center;">
85-
<p><a href="https://books.halfrost.com/leetcode/ChapterFour/0100~0199/0167.Two-Sum-II---Input-array-is-sorted/">⬅️上一页</a></p>
85+
<p><a href="https://books.halfrost.com/leetcode/ChapterFour/0100~0199/0167.Two-Sum-II-Input-array-is-sorted/">⬅️上一页</a></p>
8686
<p><a href="https://books.halfrost.com/leetcode/ChapterFour/0100~0199/0169.Majority-Element/">下一页➡️</a></p>
8787
</div>

website/content/ChapterFour/0300~0399/0300.Longest-Increasing-Subsequence.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,5 +83,5 @@ func lengthOfLIS1(nums []int) int {
8383
----------------------------------------------
8484
<div style="display: flex;justify-content: space-between;align-items: center;">
8585
<p><a href="https://books.halfrost.com/leetcode/ChapterFour/0200~0299/0290.Word-Pattern/">⬅️上一页</a></p>
86-
<p><a href="https://books.halfrost.com/leetcode/ChapterFour/0300~0399/0303.Range-Sum-Query---Immutable/">下一页➡️</a></p>
86+
<p><a href="https://books.halfrost.com/leetcode/ChapterFour/0300~0399/0303.Range-Sum-Query-Immutable/">下一页➡️</a></p>
8787
</div>
File renamed without changes.

website/content/ChapterFour/0300~0399/0306.Additive-Number.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,6 @@ func recursiveCheck(num string, x1 int, x2 int, left int) bool {
9191

9292
----------------------------------------------
9393
<div style="display: flex;justify-content: space-between;align-items: center;">
94-
<p><a href="https://books.halfrost.com/leetcode/ChapterFour/0300~0399/0303.Range-Sum-Query---Immutable/">⬅️上一页</a></p>
95-
<p><a href="https://books.halfrost.com/leetcode/ChapterFour/0300~0399/0307.Range-Sum-Query---Mutable/">下一页➡️</a></p>
94+
<p><a href="https://books.halfrost.com/leetcode/ChapterFour/0300~0399/0303.Range-Sum-Query-Immutable/">⬅️上一页</a></p>
95+
<p><a href="https://books.halfrost.com/leetcode/ChapterFour/0300~0399/0307.Range-Sum-Query-Mutable/">下一页➡️</a></p>
9696
</div>

0 commit comments

Comments
 (0)