Skip to content

Commit 99cbdf9

Browse files
authored
Merge pull request #1171 from 0xff-dev/3301-3400
add 3301-3400 problems
2 parents db65857 + a2061af commit 99cbdf9

File tree

238 files changed

+6005
-0
lines changed

Some content is hidden

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

238 files changed

+6005
-0
lines changed

cmd/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ func main() {
3535
//leetcode.MakeDirFromTo(problems, 2901, 3000)
3636
//leetcode.MakeDirFromTo(problems, 3101, 3200)
3737
//leetcode.MakeDirFromTo(problems, 3201, 3300)
38+
leetcode.MakeDirFromTo(problems, 3301, 3400)
3839

3940
// leetcode.MakeDir(problems)
4041

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# [3301.Maximize the Total Height of Unique Towers][title]
2+
3+
> [!WARNING|style:flat]
4+
> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm)
5+
6+
## Description
7+
8+
**Example 1:**
9+
10+
```
11+
Input: a = "11", b = "1"
12+
Output: "100"
13+
```
14+
15+
## 题意
16+
> ...
17+
18+
## 题解
19+
20+
### 思路1
21+
> ...
22+
Maximize the Total Height of Unique Towers
23+
```go
24+
```
25+
26+
27+
## 结语
28+
29+
如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me]
30+
31+
[title]: https://leetcode.com/problems/maximize-the-total-height-of-unique-towers/
32+
[me]: https://github.com/kylesliu/awesome-golang-algorithm
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package Solution
2+
3+
func Solution(x bool) bool {
4+
return x
5+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
package Solution
2+
3+
import (
4+
"reflect"
5+
"strconv"
6+
"testing"
7+
)
8+
9+
func TestSolution(t *testing.T) {
10+
// 测试用例
11+
cases := []struct {
12+
name string
13+
inputs bool
14+
expect bool
15+
}{
16+
{"TestCase", true, true},
17+
{"TestCase", true, true},
18+
{"TestCase", false, false},
19+
}
20+
21+
// 开始测试
22+
for i, c := range cases {
23+
t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) {
24+
got := Solution(c.inputs)
25+
if !reflect.DeepEqual(got, c.expect) {
26+
t.Fatalf("expected: %v, but got: %v, with inputs: %v",
27+
c.expect, got, c.inputs)
28+
}
29+
})
30+
}
31+
}
32+
33+
// 压力测试
34+
func BenchmarkSolution(b *testing.B) {
35+
}
36+
37+
// 使用案列
38+
func ExampleSolution() {
39+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# [3302.Find the Lexicographically Smallest Valid Sequence][title]
2+
3+
> [!WARNING|style:flat]
4+
> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm)
5+
6+
## Description
7+
8+
**Example 1:**
9+
10+
```
11+
Input: a = "11", b = "1"
12+
Output: "100"
13+
```
14+
15+
## 题意
16+
> ...
17+
18+
## 题解
19+
20+
### 思路1
21+
> ...
22+
Find the Lexicographically Smallest Valid Sequence
23+
```go
24+
```
25+
26+
27+
## 结语
28+
29+
如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me]
30+
31+
[title]: https://leetcode.com/problems/find-the-lexicographically-smallest-valid-sequence/
32+
[me]: https://github.com/kylesliu/awesome-golang-algorithm
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package Solution
2+
3+
func Solution(x bool) bool {
4+
return x
5+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
package Solution
2+
3+
import (
4+
"reflect"
5+
"strconv"
6+
"testing"
7+
)
8+
9+
func TestSolution(t *testing.T) {
10+
// 测试用例
11+
cases := []struct {
12+
name string
13+
inputs bool
14+
expect bool
15+
}{
16+
{"TestCase", true, true},
17+
{"TestCase", true, true},
18+
{"TestCase", false, false},
19+
}
20+
21+
// 开始测试
22+
for i, c := range cases {
23+
t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) {
24+
got := Solution(c.inputs)
25+
if !reflect.DeepEqual(got, c.expect) {
26+
t.Fatalf("expected: %v, but got: %v, with inputs: %v",
27+
c.expect, got, c.inputs)
28+
}
29+
})
30+
}
31+
}
32+
33+
// 压力测试
34+
func BenchmarkSolution(b *testing.B) {
35+
}
36+
37+
// 使用案列
38+
func ExampleSolution() {
39+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# [3303.Find the Occurrence of First Almost Equal Substring][title]
2+
3+
> [!WARNING|style:flat]
4+
> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm)
5+
6+
## Description
7+
8+
**Example 1:**
9+
10+
```
11+
Input: a = "11", b = "1"
12+
Output: "100"
13+
```
14+
15+
## 题意
16+
> ...
17+
18+
## 题解
19+
20+
### 思路1
21+
> ...
22+
Find the Occurrence of First Almost Equal Substring
23+
```go
24+
```
25+
26+
27+
## 结语
28+
29+
如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me]
30+
31+
[title]: https://leetcode.com/problems/find-the-occurrence-of-first-almost-equal-substring/
32+
[me]: https://github.com/kylesliu/awesome-golang-algorithm
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package Solution
2+
3+
func Solution(x bool) bool {
4+
return x
5+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
package Solution
2+
3+
import (
4+
"reflect"
5+
"strconv"
6+
"testing"
7+
)
8+
9+
func TestSolution(t *testing.T) {
10+
// 测试用例
11+
cases := []struct {
12+
name string
13+
inputs bool
14+
expect bool
15+
}{
16+
{"TestCase", true, true},
17+
{"TestCase", true, true},
18+
{"TestCase", false, false},
19+
}
20+
21+
// 开始测试
22+
for i, c := range cases {
23+
t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) {
24+
got := Solution(c.inputs)
25+
if !reflect.DeepEqual(got, c.expect) {
26+
t.Fatalf("expected: %v, but got: %v, with inputs: %v",
27+
c.expect, got, c.inputs)
28+
}
29+
})
30+
}
31+
}
32+
33+
// 压力测试
34+
func BenchmarkSolution(b *testing.B) {
35+
}
36+
37+
// 使用案列
38+
func ExampleSolution() {
39+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# [3304.Find the K-th Character in String Game I][title]
2+
3+
> [!WARNING|style:flat]
4+
> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm)
5+
6+
## Description
7+
8+
**Example 1:**
9+
10+
```
11+
Input: a = "11", b = "1"
12+
Output: "100"
13+
```
14+
15+
## 题意
16+
> ...
17+
18+
## 题解
19+
20+
### 思路1
21+
> ...
22+
Find the K-th Character in String Game I
23+
```go
24+
```
25+
26+
27+
## 结语
28+
29+
如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me]
30+
31+
[title]: https://leetcode.com/problems/find-the-k-th-character-in-string-game-i/
32+
[me]: https://github.com/kylesliu/awesome-golang-algorithm
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package Solution
2+
3+
func Solution(x bool) bool {
4+
return x
5+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
package Solution
2+
3+
import (
4+
"reflect"
5+
"strconv"
6+
"testing"
7+
)
8+
9+
func TestSolution(t *testing.T) {
10+
// 测试用例
11+
cases := []struct {
12+
name string
13+
inputs bool
14+
expect bool
15+
}{
16+
{"TestCase", true, true},
17+
{"TestCase", true, true},
18+
{"TestCase", false, false},
19+
}
20+
21+
// 开始测试
22+
for i, c := range cases {
23+
t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) {
24+
got := Solution(c.inputs)
25+
if !reflect.DeepEqual(got, c.expect) {
26+
t.Fatalf("expected: %v, but got: %v, with inputs: %v",
27+
c.expect, got, c.inputs)
28+
}
29+
})
30+
}
31+
}
32+
33+
// 压力测试
34+
func BenchmarkSolution(b *testing.B) {
35+
}
36+
37+
// 使用案列
38+
func ExampleSolution() {
39+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# [3305.Count of Substrings Containing Every Vowel and K Consonants I][title]
2+
3+
> [!WARNING|style:flat]
4+
> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm)
5+
6+
## Description
7+
8+
**Example 1:**
9+
10+
```
11+
Input: a = "11", b = "1"
12+
Output: "100"
13+
```
14+
15+
## 题意
16+
> ...
17+
18+
## 题解
19+
20+
### 思路1
21+
> ...
22+
Count of Substrings Containing Every Vowel and K Consonants I
23+
```go
24+
```
25+
26+
27+
## 结语
28+
29+
如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me]
30+
31+
[title]: https://leetcode.com/problems/count-of-substrings-containing-every-vowel-and-k-consonants-i/
32+
[me]: https://github.com/kylesliu/awesome-golang-algorithm
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package Solution
2+
3+
func Solution(x bool) bool {
4+
return x
5+
}

0 commit comments

Comments
 (0)