Skip to content

Commit 408497d

Browse files
author
Openset
committed
Update: problems
1 parent 479d0ab commit 408497d

File tree

2,874 files changed

+961
-2829
lines changed

Some content is hidden

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

2,874 files changed

+961
-2829
lines changed

README.md

Lines changed: 957 additions & 957 deletions

internal/leetcode/question_data.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func (question questionType) getSimilarQuestion() []byte {
9999
if len(sq) > 0 {
100100
buf.WriteString("\n\n### Similar Questions\n")
101101
}
102-
format := " 1. [%s](https://github.com/openset/leetcode/tree/master/solution/%s)%s\n"
102+
format := " 1. [%s](https://github.com/openset/leetcode/tree/master/problems/%s)%s\n"
103103
for _, q := range sq {
104104
if q.Difficulty != "" {
105105
q.Difficulty = fmt.Sprintf(" (%s)", q.Difficulty)
@@ -110,7 +110,7 @@ func (question questionType) getSimilarQuestion() []byte {
110110
}
111111

112112
func (question questionType) getFilePath(filename string) string {
113-
return path.Join("solution", question.TitleSlug, filename)
113+
return path.Join("problems", question.TitleSlug, filename)
114114
}
115115

116116
func (question questionType) TitleSnake() string {

internal/open/open.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func runOpen(cmd *base.Command, args []string) {
2626
for _, problem := range problems.StatStatusPairs {
2727
if problem.Stat.FrontendQuestionId == questionId {
2828
titleSlug := problem.Stat.QuestionTitleSlug
29-
browser.Open("https://github.com/openset/leetcode/tree/master/solution/" + titleSlug)
29+
browser.Open("https://github.com/openset/leetcode/tree/master/problems/" + titleSlug)
3030
break
3131
}
3232
}

internal/readme/readme.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func writeProblems(buf *bytes.Buffer) {
4646
}
4747
slug := problem.Stat.QuestionTitleSlug
4848
levelName := problem.Difficulty.LevelName()
49-
format := "| <span id=\"%d\">%d</span> | [%s](https://leetcode.com/problems/%s)%s | [%s](https://github.com/openset/leetcode/tree/master/solution/%s) | %s |\n"
49+
format := "| <span id=\"%d\">%d</span> | [%s](https://leetcode.com/problems/%s)%s | [%s](https://github.com/openset/leetcode/tree/master/problems/%s) | %s |\n"
5050
problemsSet[id] = fmt.Sprintf(format, id, id, title, slug, needPaid, getLangBySlug(slug), slug, levelName)
5151
if id > maxId {
5252
maxId = id
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
package p_01_matrix
2-
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
package p_01_matrix
2-

solution/1-bit-and-2-bit-characters/1_bit_and_2_bit_characters.go renamed to problems/1-bit-and-2-bit-characters/1_bit_and_2_bit_characters.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
package p_1_bit_and_2_bit_characters
2-

0 commit comments

Comments
 (0)