diff --git a/leetcode/3501-3600/3501.Maximize-Active-Section-with-Trade-II/README.md b/leetcode/3501-3600/3501.Maximize-Active-Section-with-Trade-II/README.md new file mode 100755 index 000000000..fc5b1c57f --- /dev/null +++ b/leetcode/3501-3600/3501.Maximize-Active-Section-with-Trade-II/README.md @@ -0,0 +1,32 @@ +# [3501.Maximize Active Section with Trade II][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Maximize Active Section with Trade II +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximize-active-section-with-trade-ii/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3501.Maximize-Active-Section-with-Trade-II/Solution.go b/leetcode/3501-3600/3501.Maximize-Active-Section-with-Trade-II/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3501.Maximize-Active-Section-with-Trade-II/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3501.Maximize-Active-Section-with-Trade-II/Solution_test.go b/leetcode/3501-3600/3501.Maximize-Active-Section-with-Trade-II/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3501.Maximize-Active-Section-with-Trade-II/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3502.Minimum-Cost-to-Reach-Every-Position/README.md b/leetcode/3501-3600/3502.Minimum-Cost-to-Reach-Every-Position/README.md new file mode 100755 index 000000000..d20f27e18 --- /dev/null +++ b/leetcode/3501-3600/3502.Minimum-Cost-to-Reach-Every-Position/README.md @@ -0,0 +1,32 @@ +# [3502.Minimum Cost to Reach Every Position][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Minimum Cost to Reach Every Position +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/minimum-cost-to-reach-every-position/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3502.Minimum-Cost-to-Reach-Every-Position/Solution.go b/leetcode/3501-3600/3502.Minimum-Cost-to-Reach-Every-Position/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3502.Minimum-Cost-to-Reach-Every-Position/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3502.Minimum-Cost-to-Reach-Every-Position/Solution_test.go b/leetcode/3501-3600/3502.Minimum-Cost-to-Reach-Every-Position/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3502.Minimum-Cost-to-Reach-Every-Position/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3503.Longest-Palindrome-After-Substring-Concatenation-I/README.md b/leetcode/3501-3600/3503.Longest-Palindrome-After-Substring-Concatenation-I/README.md new file mode 100755 index 000000000..6a6779f8b --- /dev/null +++ b/leetcode/3501-3600/3503.Longest-Palindrome-After-Substring-Concatenation-I/README.md @@ -0,0 +1,32 @@ +# [3503.Longest Palindrome After Substring Concatenation I][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Longest Palindrome After Substring Concatenation I +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/longest-palindrome-after-substring-concatenation-i/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3503.Longest-Palindrome-After-Substring-Concatenation-I/Solution.go b/leetcode/3501-3600/3503.Longest-Palindrome-After-Substring-Concatenation-I/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3503.Longest-Palindrome-After-Substring-Concatenation-I/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3503.Longest-Palindrome-After-Substring-Concatenation-I/Solution_test.go b/leetcode/3501-3600/3503.Longest-Palindrome-After-Substring-Concatenation-I/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3503.Longest-Palindrome-After-Substring-Concatenation-I/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3504.Longest-Palindrome-After-Substring-Concatenation-II/README.md b/leetcode/3501-3600/3504.Longest-Palindrome-After-Substring-Concatenation-II/README.md new file mode 100755 index 000000000..f33af7868 --- /dev/null +++ b/leetcode/3501-3600/3504.Longest-Palindrome-After-Substring-Concatenation-II/README.md @@ -0,0 +1,32 @@ +# [3504.Longest Palindrome After Substring Concatenation II][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Longest Palindrome After Substring Concatenation II +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/longest-palindrome-after-substring-concatenation-ii/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3504.Longest-Palindrome-After-Substring-Concatenation-II/Solution.go b/leetcode/3501-3600/3504.Longest-Palindrome-After-Substring-Concatenation-II/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3504.Longest-Palindrome-After-Substring-Concatenation-II/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3504.Longest-Palindrome-After-Substring-Concatenation-II/Solution_test.go b/leetcode/3501-3600/3504.Longest-Palindrome-After-Substring-Concatenation-II/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3504.Longest-Palindrome-After-Substring-Concatenation-II/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3505.Minimum-Operations-to-Make-Elements-Within-K-Subarrays-Equal/README.md b/leetcode/3501-3600/3505.Minimum-Operations-to-Make-Elements-Within-K-Subarrays-Equal/README.md new file mode 100755 index 000000000..115c6acb7 --- /dev/null +++ b/leetcode/3501-3600/3505.Minimum-Operations-to-Make-Elements-Within-K-Subarrays-Equal/README.md @@ -0,0 +1,32 @@ +# [3505.Minimum Operations to Make Elements Within K Subarrays Equal][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Minimum Operations to Make Elements Within K Subarrays Equal +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/minimum-operations-to-make-elements-within-k-subarrays-equal/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3505.Minimum-Operations-to-Make-Elements-Within-K-Subarrays-Equal/Solution.go b/leetcode/3501-3600/3505.Minimum-Operations-to-Make-Elements-Within-K-Subarrays-Equal/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3505.Minimum-Operations-to-Make-Elements-Within-K-Subarrays-Equal/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3505.Minimum-Operations-to-Make-Elements-Within-K-Subarrays-Equal/Solution_test.go b/leetcode/3501-3600/3505.Minimum-Operations-to-Make-Elements-Within-K-Subarrays-Equal/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3505.Minimum-Operations-to-Make-Elements-Within-K-Subarrays-Equal/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3507.Minimum-Pair-Removal-to-Sort-Array-I/README.md b/leetcode/3501-3600/3507.Minimum-Pair-Removal-to-Sort-Array-I/README.md new file mode 100755 index 000000000..fd088dc80 --- /dev/null +++ b/leetcode/3501-3600/3507.Minimum-Pair-Removal-to-Sort-Array-I/README.md @@ -0,0 +1,32 @@ +# [3507.Minimum Pair Removal to Sort Array I][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Minimum Pair Removal to Sort Array I +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/minimum-pair-removal-to-sort-array-i/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3507.Minimum-Pair-Removal-to-Sort-Array-I/Solution.go b/leetcode/3501-3600/3507.Minimum-Pair-Removal-to-Sort-Array-I/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3507.Minimum-Pair-Removal-to-Sort-Array-I/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3507.Minimum-Pair-Removal-to-Sort-Array-I/Solution_test.go b/leetcode/3501-3600/3507.Minimum-Pair-Removal-to-Sort-Array-I/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3507.Minimum-Pair-Removal-to-Sort-Array-I/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3508.Implement-Router/README.md b/leetcode/3501-3600/3508.Implement-Router/README.md new file mode 100755 index 000000000..313346934 --- /dev/null +++ b/leetcode/3501-3600/3508.Implement-Router/README.md @@ -0,0 +1,32 @@ +# [3508.Implement Router][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Implement Router +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/implement-router/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3508.Implement-Router/Solution.go b/leetcode/3501-3600/3508.Implement-Router/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3508.Implement-Router/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3508.Implement-Router/Solution_test.go b/leetcode/3501-3600/3508.Implement-Router/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3508.Implement-Router/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3509.Maximum-Product-of-Subsequences-With-an-Alternating-Sum-Equal-to-K/README.md b/leetcode/3501-3600/3509.Maximum-Product-of-Subsequences-With-an-Alternating-Sum-Equal-to-K/README.md new file mode 100755 index 000000000..e54f3be09 --- /dev/null +++ b/leetcode/3501-3600/3509.Maximum-Product-of-Subsequences-With-an-Alternating-Sum-Equal-to-K/README.md @@ -0,0 +1,32 @@ +# [3509.Maximum Product of Subsequences With an Alternating Sum Equal to K][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Maximum Product of Subsequences With an Alternating Sum Equal to K +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximum-product-of-subsequences-with-an-alternating-sum-equal-to-k/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3509.Maximum-Product-of-Subsequences-With-an-Alternating-Sum-Equal-to-K/Solution.go b/leetcode/3501-3600/3509.Maximum-Product-of-Subsequences-With-an-Alternating-Sum-Equal-to-K/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3509.Maximum-Product-of-Subsequences-With-an-Alternating-Sum-Equal-to-K/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3509.Maximum-Product-of-Subsequences-With-an-Alternating-Sum-Equal-to-K/Solution_test.go b/leetcode/3501-3600/3509.Maximum-Product-of-Subsequences-With-an-Alternating-Sum-Equal-to-K/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3509.Maximum-Product-of-Subsequences-With-an-Alternating-Sum-Equal-to-K/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3510.Minimum-Pair-Removal-to-Sort-Array-II/README.md b/leetcode/3501-3600/3510.Minimum-Pair-Removal-to-Sort-Array-II/README.md new file mode 100755 index 000000000..3b3754368 --- /dev/null +++ b/leetcode/3501-3600/3510.Minimum-Pair-Removal-to-Sort-Array-II/README.md @@ -0,0 +1,32 @@ +# [3510.Minimum Pair Removal to Sort Array II][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Minimum Pair Removal to Sort Array II +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/minimum-pair-removal-to-sort-array-ii/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3510.Minimum-Pair-Removal-to-Sort-Array-II/Solution.go b/leetcode/3501-3600/3510.Minimum-Pair-Removal-to-Sort-Array-II/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3510.Minimum-Pair-Removal-to-Sort-Array-II/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3510.Minimum-Pair-Removal-to-Sort-Array-II/Solution_test.go b/leetcode/3501-3600/3510.Minimum-Pair-Removal-to-Sort-Array-II/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3510.Minimum-Pair-Removal-to-Sort-Array-II/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3512.Minimum-Operations-to-Make-Array-Sum-Divisible-by-K/README.md b/leetcode/3501-3600/3512.Minimum-Operations-to-Make-Array-Sum-Divisible-by-K/README.md new file mode 100755 index 000000000..c03fb90e1 --- /dev/null +++ b/leetcode/3501-3600/3512.Minimum-Operations-to-Make-Array-Sum-Divisible-by-K/README.md @@ -0,0 +1,32 @@ +# [3512.Minimum Operations to Make Array Sum Divisible by K][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Minimum Operations to Make Array Sum Divisible by K +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/minimum-operations-to-make-array-sum-divisible-by-k/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3512.Minimum-Operations-to-Make-Array-Sum-Divisible-by-K/Solution.go b/leetcode/3501-3600/3512.Minimum-Operations-to-Make-Array-Sum-Divisible-by-K/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3512.Minimum-Operations-to-Make-Array-Sum-Divisible-by-K/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3512.Minimum-Operations-to-Make-Array-Sum-Divisible-by-K/Solution_test.go b/leetcode/3501-3600/3512.Minimum-Operations-to-Make-Array-Sum-Divisible-by-K/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3512.Minimum-Operations-to-Make-Array-Sum-Divisible-by-K/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3513.Number-of-Unique-XOR-Triplets-I/README.md b/leetcode/3501-3600/3513.Number-of-Unique-XOR-Triplets-I/README.md new file mode 100755 index 000000000..c28231457 --- /dev/null +++ b/leetcode/3501-3600/3513.Number-of-Unique-XOR-Triplets-I/README.md @@ -0,0 +1,32 @@ +# [3513.Number of Unique XOR Triplets I][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Number of Unique XOR Triplets I +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/number-of-unique-xor-triplets-i/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3513.Number-of-Unique-XOR-Triplets-I/Solution.go b/leetcode/3501-3600/3513.Number-of-Unique-XOR-Triplets-I/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3513.Number-of-Unique-XOR-Triplets-I/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3513.Number-of-Unique-XOR-Triplets-I/Solution_test.go b/leetcode/3501-3600/3513.Number-of-Unique-XOR-Triplets-I/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3513.Number-of-Unique-XOR-Triplets-I/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3514.Number-of-Unique-XOR-Triplets-II/README.md b/leetcode/3501-3600/3514.Number-of-Unique-XOR-Triplets-II/README.md new file mode 100755 index 000000000..44639b488 --- /dev/null +++ b/leetcode/3501-3600/3514.Number-of-Unique-XOR-Triplets-II/README.md @@ -0,0 +1,32 @@ +# [3514.Number of Unique XOR Triplets II][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Number of Unique XOR Triplets II +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/number-of-unique-xor-triplets-ii/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3514.Number-of-Unique-XOR-Triplets-II/Solution.go b/leetcode/3501-3600/3514.Number-of-Unique-XOR-Triplets-II/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3514.Number-of-Unique-XOR-Triplets-II/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3514.Number-of-Unique-XOR-Triplets-II/Solution_test.go b/leetcode/3501-3600/3514.Number-of-Unique-XOR-Triplets-II/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3514.Number-of-Unique-XOR-Triplets-II/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3515.Shortest-Path-in-a-Weighted-Tree/README.md b/leetcode/3501-3600/3515.Shortest-Path-in-a-Weighted-Tree/README.md new file mode 100755 index 000000000..f092f335a --- /dev/null +++ b/leetcode/3501-3600/3515.Shortest-Path-in-a-Weighted-Tree/README.md @@ -0,0 +1,32 @@ +# [3515.Shortest Path in a Weighted Tree][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Shortest Path in a Weighted Tree +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/shortest-path-in-a-weighted-tree/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3515.Shortest-Path-in-a-Weighted-Tree/Solution.go b/leetcode/3501-3600/3515.Shortest-Path-in-a-Weighted-Tree/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3515.Shortest-Path-in-a-Weighted-Tree/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3515.Shortest-Path-in-a-Weighted-Tree/Solution_test.go b/leetcode/3501-3600/3515.Shortest-Path-in-a-Weighted-Tree/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3515.Shortest-Path-in-a-Weighted-Tree/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3516.Find-Closest-Person/README.md b/leetcode/3501-3600/3516.Find-Closest-Person/README.md new file mode 100755 index 000000000..525609e18 --- /dev/null +++ b/leetcode/3501-3600/3516.Find-Closest-Person/README.md @@ -0,0 +1,32 @@ +# [3516.Find Closest Person][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Find Closest Person +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/find-closest-person/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3516.Find-Closest-Person/Solution.go b/leetcode/3501-3600/3516.Find-Closest-Person/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3516.Find-Closest-Person/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3516.Find-Closest-Person/Solution_test.go b/leetcode/3501-3600/3516.Find-Closest-Person/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3516.Find-Closest-Person/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3517.Smallest-Palindromic-Rearrangement-I/README.md b/leetcode/3501-3600/3517.Smallest-Palindromic-Rearrangement-I/README.md new file mode 100755 index 000000000..f8370693e --- /dev/null +++ b/leetcode/3501-3600/3517.Smallest-Palindromic-Rearrangement-I/README.md @@ -0,0 +1,32 @@ +# [3517.Smallest Palindromic Rearrangement I][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Smallest Palindromic Rearrangement I +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/smallest-palindromic-rearrangement-i/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3517.Smallest-Palindromic-Rearrangement-I/Solution.go b/leetcode/3501-3600/3517.Smallest-Palindromic-Rearrangement-I/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3517.Smallest-Palindromic-Rearrangement-I/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3517.Smallest-Palindromic-Rearrangement-I/Solution_test.go b/leetcode/3501-3600/3517.Smallest-Palindromic-Rearrangement-I/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3517.Smallest-Palindromic-Rearrangement-I/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3518.Smallest-Palindromic-Rearrangement-II/README.md b/leetcode/3501-3600/3518.Smallest-Palindromic-Rearrangement-II/README.md new file mode 100755 index 000000000..e58e0c587 --- /dev/null +++ b/leetcode/3501-3600/3518.Smallest-Palindromic-Rearrangement-II/README.md @@ -0,0 +1,32 @@ +# [3518.Smallest Palindromic Rearrangement II][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Smallest Palindromic Rearrangement II +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/smallest-palindromic-rearrangement-ii/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3518.Smallest-Palindromic-Rearrangement-II/Solution.go b/leetcode/3501-3600/3518.Smallest-Palindromic-Rearrangement-II/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3518.Smallest-Palindromic-Rearrangement-II/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3518.Smallest-Palindromic-Rearrangement-II/Solution_test.go b/leetcode/3501-3600/3518.Smallest-Palindromic-Rearrangement-II/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3518.Smallest-Palindromic-Rearrangement-II/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3519.Count-Numbers-with-Non-Decreasing-Digits-/README.md b/leetcode/3501-3600/3519.Count-Numbers-with-Non-Decreasing-Digits-/README.md new file mode 100755 index 000000000..4f9afceee --- /dev/null +++ b/leetcode/3501-3600/3519.Count-Numbers-with-Non-Decreasing-Digits-/README.md @@ -0,0 +1,32 @@ +# [3519.Count Numbers with Non-Decreasing Digits ][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Count Numbers with Non-Decreasing Digits +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/count-numbers-with-non-decreasing-digits/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3519.Count-Numbers-with-Non-Decreasing-Digits-/Solution.go b/leetcode/3501-3600/3519.Count-Numbers-with-Non-Decreasing-Digits-/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3519.Count-Numbers-with-Non-Decreasing-Digits-/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3519.Count-Numbers-with-Non-Decreasing-Digits-/Solution_test.go b/leetcode/3501-3600/3519.Count-Numbers-with-Non-Decreasing-Digits-/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3519.Count-Numbers-with-Non-Decreasing-Digits-/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3522.Calculate-Score-After-Performing-Instructions/README.md b/leetcode/3501-3600/3522.Calculate-Score-After-Performing-Instructions/README.md new file mode 100755 index 000000000..c195cd7e6 --- /dev/null +++ b/leetcode/3501-3600/3522.Calculate-Score-After-Performing-Instructions/README.md @@ -0,0 +1,32 @@ +# [3522.Calculate Score After Performing Instructions][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Calculate Score After Performing Instructions +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/calculate-score-after-performing-instructions/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3522.Calculate-Score-After-Performing-Instructions/Solution.go b/leetcode/3501-3600/3522.Calculate-Score-After-Performing-Instructions/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3522.Calculate-Score-After-Performing-Instructions/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3522.Calculate-Score-After-Performing-Instructions/Solution_test.go b/leetcode/3501-3600/3522.Calculate-Score-After-Performing-Instructions/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3522.Calculate-Score-After-Performing-Instructions/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3523.Make-Array-Non-decreasing/README.md b/leetcode/3501-3600/3523.Make-Array-Non-decreasing/README.md new file mode 100755 index 000000000..b3d0f086d --- /dev/null +++ b/leetcode/3501-3600/3523.Make-Array-Non-decreasing/README.md @@ -0,0 +1,32 @@ +# [3523.Make Array Non-decreasing][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Make Array Non-decreasing +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/make-array-non-decreasing/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3523.Make-Array-Non-decreasing/Solution.go b/leetcode/3501-3600/3523.Make-Array-Non-decreasing/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3523.Make-Array-Non-decreasing/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3523.Make-Array-Non-decreasing/Solution_test.go b/leetcode/3501-3600/3523.Make-Array-Non-decreasing/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3523.Make-Array-Non-decreasing/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3524.Find-X-Value-of-Array-I/README.md b/leetcode/3501-3600/3524.Find-X-Value-of-Array-I/README.md new file mode 100755 index 000000000..eeddcaa08 --- /dev/null +++ b/leetcode/3501-3600/3524.Find-X-Value-of-Array-I/README.md @@ -0,0 +1,32 @@ +# [3524.Find X Value of Array I][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Find X Value of Array I +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/find-x-value-of-array-i/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3524.Find-X-Value-of-Array-I/Solution.go b/leetcode/3501-3600/3524.Find-X-Value-of-Array-I/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3524.Find-X-Value-of-Array-I/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3524.Find-X-Value-of-Array-I/Solution_test.go b/leetcode/3501-3600/3524.Find-X-Value-of-Array-I/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3524.Find-X-Value-of-Array-I/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3525.Find-X-Value-of-Array-II/README.md b/leetcode/3501-3600/3525.Find-X-Value-of-Array-II/README.md new file mode 100755 index 000000000..9bf7b4977 --- /dev/null +++ b/leetcode/3501-3600/3525.Find-X-Value-of-Array-II/README.md @@ -0,0 +1,32 @@ +# [3525.Find X Value of Array II][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Find X Value of Array II +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/find-x-value-of-array-ii/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3525.Find-X-Value-of-Array-II/Solution.go b/leetcode/3501-3600/3525.Find-X-Value-of-Array-II/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3525.Find-X-Value-of-Array-II/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3525.Find-X-Value-of-Array-II/Solution_test.go b/leetcode/3501-3600/3525.Find-X-Value-of-Array-II/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3525.Find-X-Value-of-Array-II/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3527.Find-the-Most-Common-Response/README.md b/leetcode/3501-3600/3527.Find-the-Most-Common-Response/README.md new file mode 100755 index 000000000..fbf3d0959 --- /dev/null +++ b/leetcode/3501-3600/3527.Find-the-Most-Common-Response/README.md @@ -0,0 +1,32 @@ +# [3527.Find the Most Common Response][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Find the Most Common Response +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/find-the-most-common-response/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3527.Find-the-Most-Common-Response/Solution.go b/leetcode/3501-3600/3527.Find-the-Most-Common-Response/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3527.Find-the-Most-Common-Response/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3527.Find-the-Most-Common-Response/Solution_test.go b/leetcode/3501-3600/3527.Find-the-Most-Common-Response/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3527.Find-the-Most-Common-Response/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3528.Unit-Conversion-I/README.md b/leetcode/3501-3600/3528.Unit-Conversion-I/README.md new file mode 100755 index 000000000..397c1a58b --- /dev/null +++ b/leetcode/3501-3600/3528.Unit-Conversion-I/README.md @@ -0,0 +1,32 @@ +# [3528.Unit Conversion I][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Unit Conversion I +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/unit-conversion-i/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3528.Unit-Conversion-I/Solution.go b/leetcode/3501-3600/3528.Unit-Conversion-I/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3528.Unit-Conversion-I/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3528.Unit-Conversion-I/Solution_test.go b/leetcode/3501-3600/3528.Unit-Conversion-I/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3528.Unit-Conversion-I/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3529.Count-Cells-in-Overlapping-Horizontal-and-Vertical-Substrings/README.md b/leetcode/3501-3600/3529.Count-Cells-in-Overlapping-Horizontal-and-Vertical-Substrings/README.md new file mode 100755 index 000000000..d67648067 --- /dev/null +++ b/leetcode/3501-3600/3529.Count-Cells-in-Overlapping-Horizontal-and-Vertical-Substrings/README.md @@ -0,0 +1,32 @@ +# [3529.Count Cells in Overlapping Horizontal and Vertical Substrings][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Count Cells in Overlapping Horizontal and Vertical Substrings +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/count-cells-in-overlapping-horizontal-and-vertical-substrings/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3529.Count-Cells-in-Overlapping-Horizontal-and-Vertical-Substrings/Solution.go b/leetcode/3501-3600/3529.Count-Cells-in-Overlapping-Horizontal-and-Vertical-Substrings/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3529.Count-Cells-in-Overlapping-Horizontal-and-Vertical-Substrings/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3529.Count-Cells-in-Overlapping-Horizontal-and-Vertical-Substrings/Solution_test.go b/leetcode/3501-3600/3529.Count-Cells-in-Overlapping-Horizontal-and-Vertical-Substrings/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3529.Count-Cells-in-Overlapping-Horizontal-and-Vertical-Substrings/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3530.Maximum-Profit-from-Valid-Topological-Order-in-DAG/README.md b/leetcode/3501-3600/3530.Maximum-Profit-from-Valid-Topological-Order-in-DAG/README.md new file mode 100755 index 000000000..846769f73 --- /dev/null +++ b/leetcode/3501-3600/3530.Maximum-Profit-from-Valid-Topological-Order-in-DAG/README.md @@ -0,0 +1,32 @@ +# [3530.Maximum Profit from Valid Topological Order in DAG][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Maximum Profit from Valid Topological Order in DAG +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximum-profit-from-valid-topological-order-in-dag/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3530.Maximum-Profit-from-Valid-Topological-Order-in-DAG/Solution.go b/leetcode/3501-3600/3530.Maximum-Profit-from-Valid-Topological-Order-in-DAG/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3530.Maximum-Profit-from-Valid-Topological-Order-in-DAG/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3530.Maximum-Profit-from-Valid-Topological-Order-in-DAG/Solution_test.go b/leetcode/3501-3600/3530.Maximum-Profit-from-Valid-Topological-Order-in-DAG/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3530.Maximum-Profit-from-Valid-Topological-Order-in-DAG/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3531.Count-Covered-Buildings/README.md b/leetcode/3501-3600/3531.Count-Covered-Buildings/README.md new file mode 100755 index 000000000..e391cb6e2 --- /dev/null +++ b/leetcode/3501-3600/3531.Count-Covered-Buildings/README.md @@ -0,0 +1,32 @@ +# [3531.Count Covered Buildings][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Count Covered Buildings +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/count-covered-buildings/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3531.Count-Covered-Buildings/Solution.go b/leetcode/3501-3600/3531.Count-Covered-Buildings/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3531.Count-Covered-Buildings/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3531.Count-Covered-Buildings/Solution_test.go b/leetcode/3501-3600/3531.Count-Covered-Buildings/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3531.Count-Covered-Buildings/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3532.Path-Existence-Queries-in-a-Graph-I/README.md b/leetcode/3501-3600/3532.Path-Existence-Queries-in-a-Graph-I/README.md new file mode 100755 index 000000000..aad35e164 --- /dev/null +++ b/leetcode/3501-3600/3532.Path-Existence-Queries-in-a-Graph-I/README.md @@ -0,0 +1,32 @@ +# [3532.Path Existence Queries in a Graph I][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Path Existence Queries in a Graph I +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/path-existence-queries-in-a-graph-i/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3532.Path-Existence-Queries-in-a-Graph-I/Solution.go b/leetcode/3501-3600/3532.Path-Existence-Queries-in-a-Graph-I/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3532.Path-Existence-Queries-in-a-Graph-I/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3532.Path-Existence-Queries-in-a-Graph-I/Solution_test.go b/leetcode/3501-3600/3532.Path-Existence-Queries-in-a-Graph-I/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3532.Path-Existence-Queries-in-a-Graph-I/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3533.Concatenated-Divisibility/README.md b/leetcode/3501-3600/3533.Concatenated-Divisibility/README.md new file mode 100755 index 000000000..5d91100d8 --- /dev/null +++ b/leetcode/3501-3600/3533.Concatenated-Divisibility/README.md @@ -0,0 +1,32 @@ +# [3533.Concatenated Divisibility][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Concatenated Divisibility +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/concatenated-divisibility/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3533.Concatenated-Divisibility/Solution.go b/leetcode/3501-3600/3533.Concatenated-Divisibility/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3533.Concatenated-Divisibility/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3533.Concatenated-Divisibility/Solution_test.go b/leetcode/3501-3600/3533.Concatenated-Divisibility/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3533.Concatenated-Divisibility/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3534.Path-Existence-Queries-in-a-Graph-II/README.md b/leetcode/3501-3600/3534.Path-Existence-Queries-in-a-Graph-II/README.md new file mode 100755 index 000000000..bbdfc81fc --- /dev/null +++ b/leetcode/3501-3600/3534.Path-Existence-Queries-in-a-Graph-II/README.md @@ -0,0 +1,32 @@ +# [3534.Path Existence Queries in a Graph II][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Path Existence Queries in a Graph II +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/path-existence-queries-in-a-graph-ii/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3534.Path-Existence-Queries-in-a-Graph-II/Solution.go b/leetcode/3501-3600/3534.Path-Existence-Queries-in-a-Graph-II/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3534.Path-Existence-Queries-in-a-Graph-II/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3534.Path-Existence-Queries-in-a-Graph-II/Solution_test.go b/leetcode/3501-3600/3534.Path-Existence-Queries-in-a-Graph-II/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3534.Path-Existence-Queries-in-a-Graph-II/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3536.Maximum-Product-of-Two-Digits/README.md b/leetcode/3501-3600/3536.Maximum-Product-of-Two-Digits/README.md new file mode 100755 index 000000000..a4d84e23b --- /dev/null +++ b/leetcode/3501-3600/3536.Maximum-Product-of-Two-Digits/README.md @@ -0,0 +1,32 @@ +# [3536.Maximum Product of Two Digits][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Maximum Product of Two Digits +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximum-product-of-two-digits/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3536.Maximum-Product-of-Two-Digits/Solution.go b/leetcode/3501-3600/3536.Maximum-Product-of-Two-Digits/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3536.Maximum-Product-of-Two-Digits/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3536.Maximum-Product-of-Two-Digits/Solution_test.go b/leetcode/3501-3600/3536.Maximum-Product-of-Two-Digits/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3536.Maximum-Product-of-Two-Digits/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3537.Fill-a-Special-Grid/README.md b/leetcode/3501-3600/3537.Fill-a-Special-Grid/README.md new file mode 100755 index 000000000..2f7996057 --- /dev/null +++ b/leetcode/3501-3600/3537.Fill-a-Special-Grid/README.md @@ -0,0 +1,32 @@ +# [3537.Fill a Special Grid][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Fill a Special Grid +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/fill-a-special-grid/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3537.Fill-a-Special-Grid/Solution.go b/leetcode/3501-3600/3537.Fill-a-Special-Grid/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3537.Fill-a-Special-Grid/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3537.Fill-a-Special-Grid/Solution_test.go b/leetcode/3501-3600/3537.Fill-a-Special-Grid/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3537.Fill-a-Special-Grid/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3538.Merge-Operations-for-Minimum-Travel-Time/README.md b/leetcode/3501-3600/3538.Merge-Operations-for-Minimum-Travel-Time/README.md new file mode 100755 index 000000000..19c48f264 --- /dev/null +++ b/leetcode/3501-3600/3538.Merge-Operations-for-Minimum-Travel-Time/README.md @@ -0,0 +1,32 @@ +# [3538.Merge Operations for Minimum Travel Time][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Merge Operations for Minimum Travel Time +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/merge-operations-for-minimum-travel-time/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3538.Merge-Operations-for-Minimum-Travel-Time/Solution.go b/leetcode/3501-3600/3538.Merge-Operations-for-Minimum-Travel-Time/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3538.Merge-Operations-for-Minimum-Travel-Time/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3538.Merge-Operations-for-Minimum-Travel-Time/Solution_test.go b/leetcode/3501-3600/3538.Merge-Operations-for-Minimum-Travel-Time/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3538.Merge-Operations-for-Minimum-Travel-Time/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3539.Find-Sum-of-Array-Product-of-Magical-Sequences/README.md b/leetcode/3501-3600/3539.Find-Sum-of-Array-Product-of-Magical-Sequences/README.md new file mode 100755 index 000000000..9e78a7f99 --- /dev/null +++ b/leetcode/3501-3600/3539.Find-Sum-of-Array-Product-of-Magical-Sequences/README.md @@ -0,0 +1,32 @@ +# [3539.Find Sum of Array Product of Magical Sequences][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Find Sum of Array Product of Magical Sequences +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/find-sum-of-array-product-of-magical-sequences/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3539.Find-Sum-of-Array-Product-of-Magical-Sequences/Solution.go b/leetcode/3501-3600/3539.Find-Sum-of-Array-Product-of-Magical-Sequences/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3539.Find-Sum-of-Array-Product-of-Magical-Sequences/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3539.Find-Sum-of-Array-Product-of-Magical-Sequences/Solution_test.go b/leetcode/3501-3600/3539.Find-Sum-of-Array-Product-of-Magical-Sequences/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3539.Find-Sum-of-Array-Product-of-Magical-Sequences/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3541.Find-Most-Frequent-Vowel-and-Consonant/README.md b/leetcode/3501-3600/3541.Find-Most-Frequent-Vowel-and-Consonant/README.md new file mode 100755 index 000000000..6547fb9ae --- /dev/null +++ b/leetcode/3501-3600/3541.Find-Most-Frequent-Vowel-and-Consonant/README.md @@ -0,0 +1,32 @@ +# [3541.Find Most Frequent Vowel and Consonant][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Find Most Frequent Vowel and Consonant +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/find-most-frequent-vowel-and-consonant/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3541.Find-Most-Frequent-Vowel-and-Consonant/Solution.go b/leetcode/3501-3600/3541.Find-Most-Frequent-Vowel-and-Consonant/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3541.Find-Most-Frequent-Vowel-and-Consonant/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3541.Find-Most-Frequent-Vowel-and-Consonant/Solution_test.go b/leetcode/3501-3600/3541.Find-Most-Frequent-Vowel-and-Consonant/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3541.Find-Most-Frequent-Vowel-and-Consonant/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3542.Minimum-Operations-to-Convert-All-Elements-to-Zero/README.md b/leetcode/3501-3600/3542.Minimum-Operations-to-Convert-All-Elements-to-Zero/README.md new file mode 100755 index 000000000..e674601f0 --- /dev/null +++ b/leetcode/3501-3600/3542.Minimum-Operations-to-Convert-All-Elements-to-Zero/README.md @@ -0,0 +1,32 @@ +# [3542.Minimum Operations to Convert All Elements to Zero][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Minimum Operations to Convert All Elements to Zero +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/minimum-operations-to-convert-all-elements-to-zero/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3542.Minimum-Operations-to-Convert-All-Elements-to-Zero/Solution.go b/leetcode/3501-3600/3542.Minimum-Operations-to-Convert-All-Elements-to-Zero/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3542.Minimum-Operations-to-Convert-All-Elements-to-Zero/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3542.Minimum-Operations-to-Convert-All-Elements-to-Zero/Solution_test.go b/leetcode/3501-3600/3542.Minimum-Operations-to-Convert-All-Elements-to-Zero/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3542.Minimum-Operations-to-Convert-All-Elements-to-Zero/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3543.Maximum-Weighted-K-Edge-Path/README.md b/leetcode/3501-3600/3543.Maximum-Weighted-K-Edge-Path/README.md new file mode 100755 index 000000000..680f918cc --- /dev/null +++ b/leetcode/3501-3600/3543.Maximum-Weighted-K-Edge-Path/README.md @@ -0,0 +1,32 @@ +# [3543.Maximum Weighted K-Edge Path][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Maximum Weighted K-Edge Path +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximum-weighted-k-edge-path/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3543.Maximum-Weighted-K-Edge-Path/Solution.go b/leetcode/3501-3600/3543.Maximum-Weighted-K-Edge-Path/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3543.Maximum-Weighted-K-Edge-Path/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3543.Maximum-Weighted-K-Edge-Path/Solution_test.go b/leetcode/3501-3600/3543.Maximum-Weighted-K-Edge-Path/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3543.Maximum-Weighted-K-Edge-Path/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3544.Subtree-Inversion-Sum/README.md b/leetcode/3501-3600/3544.Subtree-Inversion-Sum/README.md new file mode 100755 index 000000000..264f5dc10 --- /dev/null +++ b/leetcode/3501-3600/3544.Subtree-Inversion-Sum/README.md @@ -0,0 +1,32 @@ +# [3544.Subtree Inversion Sum][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Subtree Inversion Sum +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/subtree-inversion-sum/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3544.Subtree-Inversion-Sum/Solution.go b/leetcode/3501-3600/3544.Subtree-Inversion-Sum/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3544.Subtree-Inversion-Sum/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3544.Subtree-Inversion-Sum/Solution_test.go b/leetcode/3501-3600/3544.Subtree-Inversion-Sum/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3544.Subtree-Inversion-Sum/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3545.Minimum-Deletions-for-At-Most-K-Distinct-Characters/README.md b/leetcode/3501-3600/3545.Minimum-Deletions-for-At-Most-K-Distinct-Characters/README.md new file mode 100755 index 000000000..69dd579bd --- /dev/null +++ b/leetcode/3501-3600/3545.Minimum-Deletions-for-At-Most-K-Distinct-Characters/README.md @@ -0,0 +1,32 @@ +# [3545.Minimum Deletions for At Most K Distinct Characters][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Minimum Deletions for At Most K Distinct Characters +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/minimum-deletions-for-at-most-k-distinct-characters/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3545.Minimum-Deletions-for-At-Most-K-Distinct-Characters/Solution.go b/leetcode/3501-3600/3545.Minimum-Deletions-for-At-Most-K-Distinct-Characters/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3545.Minimum-Deletions-for-At-Most-K-Distinct-Characters/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3545.Minimum-Deletions-for-At-Most-K-Distinct-Characters/Solution_test.go b/leetcode/3501-3600/3545.Minimum-Deletions-for-At-Most-K-Distinct-Characters/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3545.Minimum-Deletions-for-At-Most-K-Distinct-Characters/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3546.Equal-Sum-Grid-Partition-I/README.md b/leetcode/3501-3600/3546.Equal-Sum-Grid-Partition-I/README.md new file mode 100755 index 000000000..94fb6b850 --- /dev/null +++ b/leetcode/3501-3600/3546.Equal-Sum-Grid-Partition-I/README.md @@ -0,0 +1,32 @@ +# [3546.Equal Sum Grid Partition I][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Equal Sum Grid Partition I +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/equal-sum-grid-partition-i/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3546.Equal-Sum-Grid-Partition-I/Solution.go b/leetcode/3501-3600/3546.Equal-Sum-Grid-Partition-I/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3546.Equal-Sum-Grid-Partition-I/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3546.Equal-Sum-Grid-Partition-I/Solution_test.go b/leetcode/3501-3600/3546.Equal-Sum-Grid-Partition-I/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3546.Equal-Sum-Grid-Partition-I/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3547.Maximum-Sum-of-Edge-Values-in-a-Graph/README.md b/leetcode/3501-3600/3547.Maximum-Sum-of-Edge-Values-in-a-Graph/README.md new file mode 100755 index 000000000..3b996cb2a --- /dev/null +++ b/leetcode/3501-3600/3547.Maximum-Sum-of-Edge-Values-in-a-Graph/README.md @@ -0,0 +1,32 @@ +# [3547.Maximum Sum of Edge Values in a Graph][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Maximum Sum of Edge Values in a Graph +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximum-sum-of-edge-values-in-a-graph/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3547.Maximum-Sum-of-Edge-Values-in-a-Graph/Solution.go b/leetcode/3501-3600/3547.Maximum-Sum-of-Edge-Values-in-a-Graph/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3547.Maximum-Sum-of-Edge-Values-in-a-Graph/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3547.Maximum-Sum-of-Edge-Values-in-a-Graph/Solution_test.go b/leetcode/3501-3600/3547.Maximum-Sum-of-Edge-Values-in-a-Graph/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3547.Maximum-Sum-of-Edge-Values-in-a-Graph/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3548.Equal-Sum-Grid-Partition-II/README.md b/leetcode/3501-3600/3548.Equal-Sum-Grid-Partition-II/README.md new file mode 100755 index 000000000..71e0a769e --- /dev/null +++ b/leetcode/3501-3600/3548.Equal-Sum-Grid-Partition-II/README.md @@ -0,0 +1,32 @@ +# [3548.Equal Sum Grid Partition II][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Equal Sum Grid Partition II +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/equal-sum-grid-partition-ii/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3548.Equal-Sum-Grid-Partition-II/Solution.go b/leetcode/3501-3600/3548.Equal-Sum-Grid-Partition-II/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3548.Equal-Sum-Grid-Partition-II/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3548.Equal-Sum-Grid-Partition-II/Solution_test.go b/leetcode/3501-3600/3548.Equal-Sum-Grid-Partition-II/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3548.Equal-Sum-Grid-Partition-II/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3550.Smallest-Index-With-Digit-Sum-Equal-to-Index/README.md b/leetcode/3501-3600/3550.Smallest-Index-With-Digit-Sum-Equal-to-Index/README.md new file mode 100755 index 000000000..9d291792f --- /dev/null +++ b/leetcode/3501-3600/3550.Smallest-Index-With-Digit-Sum-Equal-to-Index/README.md @@ -0,0 +1,32 @@ +# [3550.Smallest Index With Digit Sum Equal to Index][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Smallest Index With Digit Sum Equal to Index +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/smallest-index-with-digit-sum-equal-to-index/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3550.Smallest-Index-With-Digit-Sum-Equal-to-Index/Solution.go b/leetcode/3501-3600/3550.Smallest-Index-With-Digit-Sum-Equal-to-Index/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3550.Smallest-Index-With-Digit-Sum-Equal-to-Index/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3550.Smallest-Index-With-Digit-Sum-Equal-to-Index/Solution_test.go b/leetcode/3501-3600/3550.Smallest-Index-With-Digit-Sum-Equal-to-Index/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3550.Smallest-Index-With-Digit-Sum-Equal-to-Index/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3551.Minimum-Swaps-to-Sort-by-Digit-Sum/README.md b/leetcode/3501-3600/3551.Minimum-Swaps-to-Sort-by-Digit-Sum/README.md new file mode 100755 index 000000000..9fc741d08 --- /dev/null +++ b/leetcode/3501-3600/3551.Minimum-Swaps-to-Sort-by-Digit-Sum/README.md @@ -0,0 +1,32 @@ +# [3551.Minimum Swaps to Sort by Digit Sum][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Minimum Swaps to Sort by Digit Sum +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/minimum-swaps-to-sort-by-digit-sum/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3551.Minimum-Swaps-to-Sort-by-Digit-Sum/Solution.go b/leetcode/3501-3600/3551.Minimum-Swaps-to-Sort-by-Digit-Sum/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3551.Minimum-Swaps-to-Sort-by-Digit-Sum/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3551.Minimum-Swaps-to-Sort-by-Digit-Sum/Solution_test.go b/leetcode/3501-3600/3551.Minimum-Swaps-to-Sort-by-Digit-Sum/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3551.Minimum-Swaps-to-Sort-by-Digit-Sum/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3552.Grid-Teleportation-Traversal/README.md b/leetcode/3501-3600/3552.Grid-Teleportation-Traversal/README.md new file mode 100755 index 000000000..6bc31822a --- /dev/null +++ b/leetcode/3501-3600/3552.Grid-Teleportation-Traversal/README.md @@ -0,0 +1,32 @@ +# [3552.Grid Teleportation Traversal][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Grid Teleportation Traversal +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/grid-teleportation-traversal/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3552.Grid-Teleportation-Traversal/Solution.go b/leetcode/3501-3600/3552.Grid-Teleportation-Traversal/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3552.Grid-Teleportation-Traversal/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3552.Grid-Teleportation-Traversal/Solution_test.go b/leetcode/3501-3600/3552.Grid-Teleportation-Traversal/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3552.Grid-Teleportation-Traversal/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3553.Minimum-Weighted-Subgraph-With-the-Required-Paths-II/README.md b/leetcode/3501-3600/3553.Minimum-Weighted-Subgraph-With-the-Required-Paths-II/README.md new file mode 100755 index 000000000..a979adec3 --- /dev/null +++ b/leetcode/3501-3600/3553.Minimum-Weighted-Subgraph-With-the-Required-Paths-II/README.md @@ -0,0 +1,32 @@ +# [3553.Minimum Weighted Subgraph With the Required Paths II][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Minimum Weighted Subgraph With the Required Paths II +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/minimum-weighted-subgraph-with-the-required-paths-ii/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3553.Minimum-Weighted-Subgraph-With-the-Required-Paths-II/Solution.go b/leetcode/3501-3600/3553.Minimum-Weighted-Subgraph-With-the-Required-Paths-II/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3553.Minimum-Weighted-Subgraph-With-the-Required-Paths-II/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3553.Minimum-Weighted-Subgraph-With-the-Required-Paths-II/Solution_test.go b/leetcode/3501-3600/3553.Minimum-Weighted-Subgraph-With-the-Required-Paths-II/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3553.Minimum-Weighted-Subgraph-With-the-Required-Paths-II/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3556.Sum-of-Largest-Prime-Substrings/README.md b/leetcode/3501-3600/3556.Sum-of-Largest-Prime-Substrings/README.md new file mode 100755 index 000000000..ca5a6a466 --- /dev/null +++ b/leetcode/3501-3600/3556.Sum-of-Largest-Prime-Substrings/README.md @@ -0,0 +1,32 @@ +# [3556.Sum of Largest Prime Substrings][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Sum of Largest Prime Substrings +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/sum-of-largest-prime-substrings/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3556.Sum-of-Largest-Prime-Substrings/Solution.go b/leetcode/3501-3600/3556.Sum-of-Largest-Prime-Substrings/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3556.Sum-of-Largest-Prime-Substrings/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3556.Sum-of-Largest-Prime-Substrings/Solution_test.go b/leetcode/3501-3600/3556.Sum-of-Largest-Prime-Substrings/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3556.Sum-of-Largest-Prime-Substrings/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3557.Find-Maximum-Number-of-Non-Intersecting-Substrings/README.md b/leetcode/3501-3600/3557.Find-Maximum-Number-of-Non-Intersecting-Substrings/README.md new file mode 100755 index 000000000..781317cdb --- /dev/null +++ b/leetcode/3501-3600/3557.Find-Maximum-Number-of-Non-Intersecting-Substrings/README.md @@ -0,0 +1,32 @@ +# [3557.Find Maximum Number of Non Intersecting Substrings][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Find Maximum Number of Non Intersecting Substrings +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/find-maximum-number-of-non-intersecting-substrings/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3557.Find-Maximum-Number-of-Non-Intersecting-Substrings/Solution.go b/leetcode/3501-3600/3557.Find-Maximum-Number-of-Non-Intersecting-Substrings/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3557.Find-Maximum-Number-of-Non-Intersecting-Substrings/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3557.Find-Maximum-Number-of-Non-Intersecting-Substrings/Solution_test.go b/leetcode/3501-3600/3557.Find-Maximum-Number-of-Non-Intersecting-Substrings/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3557.Find-Maximum-Number-of-Non-Intersecting-Substrings/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3558.Number-of-Ways-to-Assign-Edge-Weights-I/README.md b/leetcode/3501-3600/3558.Number-of-Ways-to-Assign-Edge-Weights-I/README.md new file mode 100755 index 000000000..0acdcd3b6 --- /dev/null +++ b/leetcode/3501-3600/3558.Number-of-Ways-to-Assign-Edge-Weights-I/README.md @@ -0,0 +1,32 @@ +# [3558.Number of Ways to Assign Edge Weights I][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Number of Ways to Assign Edge Weights I +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/number-of-ways-to-assign-edge-weights-i/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3558.Number-of-Ways-to-Assign-Edge-Weights-I/Solution.go b/leetcode/3501-3600/3558.Number-of-Ways-to-Assign-Edge-Weights-I/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3558.Number-of-Ways-to-Assign-Edge-Weights-I/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3558.Number-of-Ways-to-Assign-Edge-Weights-I/Solution_test.go b/leetcode/3501-3600/3558.Number-of-Ways-to-Assign-Edge-Weights-I/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3558.Number-of-Ways-to-Assign-Edge-Weights-I/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3559.Number-of-Ways-to-Assign-Edge-Weights-II/README.md b/leetcode/3501-3600/3559.Number-of-Ways-to-Assign-Edge-Weights-II/README.md new file mode 100755 index 000000000..588a2d9eb --- /dev/null +++ b/leetcode/3501-3600/3559.Number-of-Ways-to-Assign-Edge-Weights-II/README.md @@ -0,0 +1,32 @@ +# [3559.Number of Ways to Assign Edge Weights II][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Number of Ways to Assign Edge Weights II +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/number-of-ways-to-assign-edge-weights-ii/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3559.Number-of-Ways-to-Assign-Edge-Weights-II/Solution.go b/leetcode/3501-3600/3559.Number-of-Ways-to-Assign-Edge-Weights-II/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3559.Number-of-Ways-to-Assign-Edge-Weights-II/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3559.Number-of-Ways-to-Assign-Edge-Weights-II/Solution_test.go b/leetcode/3501-3600/3559.Number-of-Ways-to-Assign-Edge-Weights-II/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3559.Number-of-Ways-to-Assign-Edge-Weights-II/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3560.Find-Minimum-Log-Transportation-Cost/README.md b/leetcode/3501-3600/3560.Find-Minimum-Log-Transportation-Cost/README.md new file mode 100755 index 000000000..eb9e756d7 --- /dev/null +++ b/leetcode/3501-3600/3560.Find-Minimum-Log-Transportation-Cost/README.md @@ -0,0 +1,32 @@ +# [3560.Find Minimum Log Transportation Cost][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Find Minimum Log Transportation Cost +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/find-minimum-log-transportation-cost/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3560.Find-Minimum-Log-Transportation-Cost/Solution.go b/leetcode/3501-3600/3560.Find-Minimum-Log-Transportation-Cost/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3560.Find-Minimum-Log-Transportation-Cost/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3560.Find-Minimum-Log-Transportation-Cost/Solution_test.go b/leetcode/3501-3600/3560.Find-Minimum-Log-Transportation-Cost/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3560.Find-Minimum-Log-Transportation-Cost/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3561.Resulting-String-After-Adjacent-Removals/README.md b/leetcode/3501-3600/3561.Resulting-String-After-Adjacent-Removals/README.md new file mode 100755 index 000000000..7e25c30fd --- /dev/null +++ b/leetcode/3501-3600/3561.Resulting-String-After-Adjacent-Removals/README.md @@ -0,0 +1,32 @@ +# [3561.Resulting String After Adjacent Removals][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Resulting String After Adjacent Removals +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/resulting-string-after-adjacent-removals/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3561.Resulting-String-After-Adjacent-Removals/Solution.go b/leetcode/3501-3600/3561.Resulting-String-After-Adjacent-Removals/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3561.Resulting-String-After-Adjacent-Removals/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3561.Resulting-String-After-Adjacent-Removals/Solution_test.go b/leetcode/3501-3600/3561.Resulting-String-After-Adjacent-Removals/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3561.Resulting-String-After-Adjacent-Removals/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3562.Maximum-Profit-from-Trading-Stocks-with-Discounts/README.md b/leetcode/3501-3600/3562.Maximum-Profit-from-Trading-Stocks-with-Discounts/README.md new file mode 100755 index 000000000..871572a31 --- /dev/null +++ b/leetcode/3501-3600/3562.Maximum-Profit-from-Trading-Stocks-with-Discounts/README.md @@ -0,0 +1,32 @@ +# [3562.Maximum Profit from Trading Stocks with Discounts][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Maximum Profit from Trading Stocks with Discounts +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximum-profit-from-trading-stocks-with-discounts/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3562.Maximum-Profit-from-Trading-Stocks-with-Discounts/Solution.go b/leetcode/3501-3600/3562.Maximum-Profit-from-Trading-Stocks-with-Discounts/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3562.Maximum-Profit-from-Trading-Stocks-with-Discounts/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3562.Maximum-Profit-from-Trading-Stocks-with-Discounts/Solution_test.go b/leetcode/3501-3600/3562.Maximum-Profit-from-Trading-Stocks-with-Discounts/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3562.Maximum-Profit-from-Trading-Stocks-with-Discounts/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3563.Lexicographically-Smallest-String-After-Adjacent-Removals/README.md b/leetcode/3501-3600/3563.Lexicographically-Smallest-String-After-Adjacent-Removals/README.md new file mode 100755 index 000000000..bda9d47a4 --- /dev/null +++ b/leetcode/3501-3600/3563.Lexicographically-Smallest-String-After-Adjacent-Removals/README.md @@ -0,0 +1,32 @@ +# [3563.Lexicographically Smallest String After Adjacent Removals][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Lexicographically Smallest String After Adjacent Removals +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/lexicographically-smallest-string-after-adjacent-removals/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3563.Lexicographically-Smallest-String-After-Adjacent-Removals/Solution.go b/leetcode/3501-3600/3563.Lexicographically-Smallest-String-After-Adjacent-Removals/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3563.Lexicographically-Smallest-String-After-Adjacent-Removals/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3563.Lexicographically-Smallest-String-After-Adjacent-Removals/Solution_test.go b/leetcode/3501-3600/3563.Lexicographically-Smallest-String-After-Adjacent-Removals/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3563.Lexicographically-Smallest-String-After-Adjacent-Removals/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3566.Partition-Array-into-Two-Equal-Product-Subsets/README.md b/leetcode/3501-3600/3566.Partition-Array-into-Two-Equal-Product-Subsets/README.md new file mode 100755 index 000000000..22921f46d --- /dev/null +++ b/leetcode/3501-3600/3566.Partition-Array-into-Two-Equal-Product-Subsets/README.md @@ -0,0 +1,32 @@ +# [3566.Partition Array into Two Equal Product Subsets][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Partition Array into Two Equal Product Subsets +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/partition-array-into-two-equal-product-subsets/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3566.Partition-Array-into-Two-Equal-Product-Subsets/Solution.go b/leetcode/3501-3600/3566.Partition-Array-into-Two-Equal-Product-Subsets/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3566.Partition-Array-into-Two-Equal-Product-Subsets/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3566.Partition-Array-into-Two-Equal-Product-Subsets/Solution_test.go b/leetcode/3501-3600/3566.Partition-Array-into-Two-Equal-Product-Subsets/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3566.Partition-Array-into-Two-Equal-Product-Subsets/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3567.Minimum-Absolute-Difference-in-Sliding-Submatrix/README.md b/leetcode/3501-3600/3567.Minimum-Absolute-Difference-in-Sliding-Submatrix/README.md new file mode 100755 index 000000000..cae3b0020 --- /dev/null +++ b/leetcode/3501-3600/3567.Minimum-Absolute-Difference-in-Sliding-Submatrix/README.md @@ -0,0 +1,32 @@ +# [3567.Minimum Absolute Difference in Sliding Submatrix][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Minimum Absolute Difference in Sliding Submatrix +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/minimum-absolute-difference-in-sliding-submatrix/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3567.Minimum-Absolute-Difference-in-Sliding-Submatrix/Solution.go b/leetcode/3501-3600/3567.Minimum-Absolute-Difference-in-Sliding-Submatrix/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3567.Minimum-Absolute-Difference-in-Sliding-Submatrix/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3567.Minimum-Absolute-Difference-in-Sliding-Submatrix/Solution_test.go b/leetcode/3501-3600/3567.Minimum-Absolute-Difference-in-Sliding-Submatrix/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3567.Minimum-Absolute-Difference-in-Sliding-Submatrix/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3568.Minimum-Moves-to-Clean-the-Classroom/README.md b/leetcode/3501-3600/3568.Minimum-Moves-to-Clean-the-Classroom/README.md new file mode 100755 index 000000000..ffee5b3e8 --- /dev/null +++ b/leetcode/3501-3600/3568.Minimum-Moves-to-Clean-the-Classroom/README.md @@ -0,0 +1,32 @@ +# [3568.Minimum Moves to Clean the Classroom][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Minimum Moves to Clean the Classroom +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/minimum-moves-to-clean-the-classroom/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3568.Minimum-Moves-to-Clean-the-Classroom/Solution.go b/leetcode/3501-3600/3568.Minimum-Moves-to-Clean-the-Classroom/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3568.Minimum-Moves-to-Clean-the-Classroom/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3568.Minimum-Moves-to-Clean-the-Classroom/Solution_test.go b/leetcode/3501-3600/3568.Minimum-Moves-to-Clean-the-Classroom/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3568.Minimum-Moves-to-Clean-the-Classroom/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3569.Maximize-Count-of-Distinct-Primes-After-Split/README.md b/leetcode/3501-3600/3569.Maximize-Count-of-Distinct-Primes-After-Split/README.md new file mode 100755 index 000000000..ca964ad5f --- /dev/null +++ b/leetcode/3501-3600/3569.Maximize-Count-of-Distinct-Primes-After-Split/README.md @@ -0,0 +1,32 @@ +# [3569.Maximize Count of Distinct Primes After Split][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Maximize Count of Distinct Primes After Split +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximize-count-of-distinct-primes-after-split/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3569.Maximize-Count-of-Distinct-Primes-After-Split/Solution.go b/leetcode/3501-3600/3569.Maximize-Count-of-Distinct-Primes-After-Split/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3569.Maximize-Count-of-Distinct-Primes-After-Split/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3569.Maximize-Count-of-Distinct-Primes-After-Split/Solution_test.go b/leetcode/3501-3600/3569.Maximize-Count-of-Distinct-Primes-After-Split/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3569.Maximize-Count-of-Distinct-Primes-After-Split/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git "a/leetcode/3501-3600/3572.Maximize-Y\342\200\221Sum-by-Picking-a-Triplet-of-Distinct-X\342\200\221Values/README.md" "b/leetcode/3501-3600/3572.Maximize-Y\342\200\221Sum-by-Picking-a-Triplet-of-Distinct-X\342\200\221Values/README.md" new file mode 100755 index 000000000..56cd72f41 --- /dev/null +++ "b/leetcode/3501-3600/3572.Maximize-Y\342\200\221Sum-by-Picking-a-Triplet-of-Distinct-X\342\200\221Values/README.md" @@ -0,0 +1,32 @@ +# [3572.Maximize Y‑Sum by Picking a Triplet of Distinct X‑Values][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Maximize Y‑Sum by Picking a Triplet of Distinct X‑Values +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximize-ysum-by-picking-a-triplet-of-distinct-xvalues/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git "a/leetcode/3501-3600/3572.Maximize-Y\342\200\221Sum-by-Picking-a-Triplet-of-Distinct-X\342\200\221Values/Solution.go" "b/leetcode/3501-3600/3572.Maximize-Y\342\200\221Sum-by-Picking-a-Triplet-of-Distinct-X\342\200\221Values/Solution.go" new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ "b/leetcode/3501-3600/3572.Maximize-Y\342\200\221Sum-by-Picking-a-Triplet-of-Distinct-X\342\200\221Values/Solution.go" @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git "a/leetcode/3501-3600/3572.Maximize-Y\342\200\221Sum-by-Picking-a-Triplet-of-Distinct-X\342\200\221Values/Solution_test.go" "b/leetcode/3501-3600/3572.Maximize-Y\342\200\221Sum-by-Picking-a-Triplet-of-Distinct-X\342\200\221Values/Solution_test.go" new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ "b/leetcode/3501-3600/3572.Maximize-Y\342\200\221Sum-by-Picking-a-Triplet-of-Distinct-X\342\200\221Values/Solution_test.go" @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3573.Best-Time-to-Buy-and-Sell-Stock-V/README.md b/leetcode/3501-3600/3573.Best-Time-to-Buy-and-Sell-Stock-V/README.md new file mode 100755 index 000000000..df3bf9d1a --- /dev/null +++ b/leetcode/3501-3600/3573.Best-Time-to-Buy-and-Sell-Stock-V/README.md @@ -0,0 +1,32 @@ +# [3573.Best Time to Buy and Sell Stock V][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Best Time to Buy and Sell Stock V +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/best-time-to-buy-and-sell-stock-v/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3573.Best-Time-to-Buy-and-Sell-Stock-V/Solution.go b/leetcode/3501-3600/3573.Best-Time-to-Buy-and-Sell-Stock-V/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3573.Best-Time-to-Buy-and-Sell-Stock-V/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3573.Best-Time-to-Buy-and-Sell-Stock-V/Solution_test.go b/leetcode/3501-3600/3573.Best-Time-to-Buy-and-Sell-Stock-V/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3573.Best-Time-to-Buy-and-Sell-Stock-V/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3574.Maximize-Subarray-GCD-Score/README.md b/leetcode/3501-3600/3574.Maximize-Subarray-GCD-Score/README.md new file mode 100755 index 000000000..2ab0dea4b --- /dev/null +++ b/leetcode/3501-3600/3574.Maximize-Subarray-GCD-Score/README.md @@ -0,0 +1,32 @@ +# [3574.Maximize Subarray GCD Score][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Maximize Subarray GCD Score +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximize-subarray-gcd-score/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3574.Maximize-Subarray-GCD-Score/Solution.go b/leetcode/3501-3600/3574.Maximize-Subarray-GCD-Score/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3574.Maximize-Subarray-GCD-Score/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3574.Maximize-Subarray-GCD-Score/Solution_test.go b/leetcode/3501-3600/3574.Maximize-Subarray-GCD-Score/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3574.Maximize-Subarray-GCD-Score/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3575.Maximum-Good-Subtree-Score/README.md b/leetcode/3501-3600/3575.Maximum-Good-Subtree-Score/README.md new file mode 100755 index 000000000..209e42031 --- /dev/null +++ b/leetcode/3501-3600/3575.Maximum-Good-Subtree-Score/README.md @@ -0,0 +1,32 @@ +# [3575.Maximum Good Subtree Score][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Maximum Good Subtree Score +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximum-good-subtree-score/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3575.Maximum-Good-Subtree-Score/Solution.go b/leetcode/3501-3600/3575.Maximum-Good-Subtree-Score/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3575.Maximum-Good-Subtree-Score/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3575.Maximum-Good-Subtree-Score/Solution_test.go b/leetcode/3501-3600/3575.Maximum-Good-Subtree-Score/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3575.Maximum-Good-Subtree-Score/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3576.Transform-Array-to-All-Equal-Elements/README.md b/leetcode/3501-3600/3576.Transform-Array-to-All-Equal-Elements/README.md new file mode 100755 index 000000000..5eda86605 --- /dev/null +++ b/leetcode/3501-3600/3576.Transform-Array-to-All-Equal-Elements/README.md @@ -0,0 +1,32 @@ +# [3576.Transform Array to All Equal Elements][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Transform Array to All Equal Elements +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/transform-array-to-all-equal-elements/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3576.Transform-Array-to-All-Equal-Elements/Solution.go b/leetcode/3501-3600/3576.Transform-Array-to-All-Equal-Elements/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3576.Transform-Array-to-All-Equal-Elements/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3576.Transform-Array-to-All-Equal-Elements/Solution_test.go b/leetcode/3501-3600/3576.Transform-Array-to-All-Equal-Elements/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3576.Transform-Array-to-All-Equal-Elements/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3577.Count-the-Number-of-Computer-Unlocking-Permutations/README.md b/leetcode/3501-3600/3577.Count-the-Number-of-Computer-Unlocking-Permutations/README.md new file mode 100755 index 000000000..ec6077aa8 --- /dev/null +++ b/leetcode/3501-3600/3577.Count-the-Number-of-Computer-Unlocking-Permutations/README.md @@ -0,0 +1,32 @@ +# [3577.Count the Number of Computer Unlocking Permutations][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Count the Number of Computer Unlocking Permutations +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/count-the-number-of-computer-unlocking-permutations/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3577.Count-the-Number-of-Computer-Unlocking-Permutations/Solution.go b/leetcode/3501-3600/3577.Count-the-Number-of-Computer-Unlocking-Permutations/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3577.Count-the-Number-of-Computer-Unlocking-Permutations/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3577.Count-the-Number-of-Computer-Unlocking-Permutations/Solution_test.go b/leetcode/3501-3600/3577.Count-the-Number-of-Computer-Unlocking-Permutations/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3577.Count-the-Number-of-Computer-Unlocking-Permutations/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3578.Count-Partitions-With-Max-Min-Difference-at-Most-K/README.md b/leetcode/3501-3600/3578.Count-Partitions-With-Max-Min-Difference-at-Most-K/README.md new file mode 100755 index 000000000..6f63cbb59 --- /dev/null +++ b/leetcode/3501-3600/3578.Count-Partitions-With-Max-Min-Difference-at-Most-K/README.md @@ -0,0 +1,32 @@ +# [3578.Count Partitions With Max-Min Difference at Most K][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Count Partitions With Max-Min Difference at Most K +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/count-partitions-with-max-min-difference-at-most-k/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3578.Count-Partitions-With-Max-Min-Difference-at-Most-K/Solution.go b/leetcode/3501-3600/3578.Count-Partitions-With-Max-Min-Difference-at-Most-K/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3578.Count-Partitions-With-Max-Min-Difference-at-Most-K/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3578.Count-Partitions-With-Max-Min-Difference-at-Most-K/Solution_test.go b/leetcode/3501-3600/3578.Count-Partitions-With-Max-Min-Difference-at-Most-K/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3578.Count-Partitions-With-Max-Min-Difference-at-Most-K/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3579.Minimum-Steps-to-Convert-String-with-Operations/README.md b/leetcode/3501-3600/3579.Minimum-Steps-to-Convert-String-with-Operations/README.md new file mode 100755 index 000000000..5ec3f2080 --- /dev/null +++ b/leetcode/3501-3600/3579.Minimum-Steps-to-Convert-String-with-Operations/README.md @@ -0,0 +1,32 @@ +# [3579.Minimum Steps to Convert String with Operations][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Minimum Steps to Convert String with Operations +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/minimum-steps-to-convert-string-with-operations/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3579.Minimum-Steps-to-Convert-String-with-Operations/Solution.go b/leetcode/3501-3600/3579.Minimum-Steps-to-Convert-String-with-Operations/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3579.Minimum-Steps-to-Convert-String-with-Operations/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3579.Minimum-Steps-to-Convert-String-with-Operations/Solution_test.go b/leetcode/3501-3600/3579.Minimum-Steps-to-Convert-String-with-Operations/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3579.Minimum-Steps-to-Convert-String-with-Operations/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3582.Generate-Tag-for-Video-Caption/README.md b/leetcode/3501-3600/3582.Generate-Tag-for-Video-Caption/README.md new file mode 100755 index 000000000..23e4f7d50 --- /dev/null +++ b/leetcode/3501-3600/3582.Generate-Tag-for-Video-Caption/README.md @@ -0,0 +1,32 @@ +# [3582.Generate Tag for Video Caption][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Generate Tag for Video Caption +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/generate-tag-for-video-caption/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3582.Generate-Tag-for-Video-Caption/Solution.go b/leetcode/3501-3600/3582.Generate-Tag-for-Video-Caption/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3582.Generate-Tag-for-Video-Caption/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3582.Generate-Tag-for-Video-Caption/Solution_test.go b/leetcode/3501-3600/3582.Generate-Tag-for-Video-Caption/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3582.Generate-Tag-for-Video-Caption/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3583.Count-Special-Triplets/README.md b/leetcode/3501-3600/3583.Count-Special-Triplets/README.md new file mode 100755 index 000000000..6ce577ba5 --- /dev/null +++ b/leetcode/3501-3600/3583.Count-Special-Triplets/README.md @@ -0,0 +1,32 @@ +# [3583.Count Special Triplets][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Count Special Triplets +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/count-special-triplets/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3583.Count-Special-Triplets/Solution.go b/leetcode/3501-3600/3583.Count-Special-Triplets/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3583.Count-Special-Triplets/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3583.Count-Special-Triplets/Solution_test.go b/leetcode/3501-3600/3583.Count-Special-Triplets/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3583.Count-Special-Triplets/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3584.Maximum-Product-of-First-and-Last-Elements-of-a-Subsequence/README.md b/leetcode/3501-3600/3584.Maximum-Product-of-First-and-Last-Elements-of-a-Subsequence/README.md new file mode 100755 index 000000000..a9a55ff11 --- /dev/null +++ b/leetcode/3501-3600/3584.Maximum-Product-of-First-and-Last-Elements-of-a-Subsequence/README.md @@ -0,0 +1,32 @@ +# [3584.Maximum Product of First and Last Elements of a Subsequence][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Maximum Product of First and Last Elements of a Subsequence +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximum-product-of-first-and-last-elements-of-a-subsequence/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3584.Maximum-Product-of-First-and-Last-Elements-of-a-Subsequence/Solution.go b/leetcode/3501-3600/3584.Maximum-Product-of-First-and-Last-Elements-of-a-Subsequence/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3584.Maximum-Product-of-First-and-Last-Elements-of-a-Subsequence/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3584.Maximum-Product-of-First-and-Last-Elements-of-a-Subsequence/Solution_test.go b/leetcode/3501-3600/3584.Maximum-Product-of-First-and-Last-Elements-of-a-Subsequence/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3584.Maximum-Product-of-First-and-Last-Elements-of-a-Subsequence/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3585.Find-Weighted-Median-Node-in-Tree/README.md b/leetcode/3501-3600/3585.Find-Weighted-Median-Node-in-Tree/README.md new file mode 100755 index 000000000..dbb23be02 --- /dev/null +++ b/leetcode/3501-3600/3585.Find-Weighted-Median-Node-in-Tree/README.md @@ -0,0 +1,32 @@ +# [3585.Find Weighted Median Node in Tree][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Find Weighted Median Node in Tree +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/find-weighted-median-node-in-tree/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3585.Find-Weighted-Median-Node-in-Tree/Solution.go b/leetcode/3501-3600/3585.Find-Weighted-Median-Node-in-Tree/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3585.Find-Weighted-Median-Node-in-Tree/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3585.Find-Weighted-Median-Node-in-Tree/Solution_test.go b/leetcode/3501-3600/3585.Find-Weighted-Median-Node-in-Tree/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3585.Find-Weighted-Median-Node-in-Tree/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3587.Minimum-Adjacent-Swaps-to-Alternate-Parity/README.md b/leetcode/3501-3600/3587.Minimum-Adjacent-Swaps-to-Alternate-Parity/README.md new file mode 100755 index 000000000..04dcab0a5 --- /dev/null +++ b/leetcode/3501-3600/3587.Minimum-Adjacent-Swaps-to-Alternate-Parity/README.md @@ -0,0 +1,32 @@ +# [3587.Minimum Adjacent Swaps to Alternate Parity][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Minimum Adjacent Swaps to Alternate Parity +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/minimum-adjacent-swaps-to-alternate-parity/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3587.Minimum-Adjacent-Swaps-to-Alternate-Parity/Solution.go b/leetcode/3501-3600/3587.Minimum-Adjacent-Swaps-to-Alternate-Parity/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3587.Minimum-Adjacent-Swaps-to-Alternate-Parity/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3587.Minimum-Adjacent-Swaps-to-Alternate-Parity/Solution_test.go b/leetcode/3501-3600/3587.Minimum-Adjacent-Swaps-to-Alternate-Parity/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3587.Minimum-Adjacent-Swaps-to-Alternate-Parity/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3588.Find-Maximum-Area-of-a-Triangle/README.md b/leetcode/3501-3600/3588.Find-Maximum-Area-of-a-Triangle/README.md new file mode 100755 index 000000000..7919eef2a --- /dev/null +++ b/leetcode/3501-3600/3588.Find-Maximum-Area-of-a-Triangle/README.md @@ -0,0 +1,32 @@ +# [3588.Find Maximum Area of a Triangle][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Find Maximum Area of a Triangle +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/find-maximum-area-of-a-triangle/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3588.Find-Maximum-Area-of-a-Triangle/Solution.go b/leetcode/3501-3600/3588.Find-Maximum-Area-of-a-Triangle/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3588.Find-Maximum-Area-of-a-Triangle/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3588.Find-Maximum-Area-of-a-Triangle/Solution_test.go b/leetcode/3501-3600/3588.Find-Maximum-Area-of-a-Triangle/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3588.Find-Maximum-Area-of-a-Triangle/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3589.Count-Prime-Gap-Balanced-Subarrays/README.md b/leetcode/3501-3600/3589.Count-Prime-Gap-Balanced-Subarrays/README.md new file mode 100755 index 000000000..8cf1d6642 --- /dev/null +++ b/leetcode/3501-3600/3589.Count-Prime-Gap-Balanced-Subarrays/README.md @@ -0,0 +1,32 @@ +# [3589.Count Prime-Gap Balanced Subarrays][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Count Prime-Gap Balanced Subarrays +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/count-prime-gap-balanced-subarrays/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3589.Count-Prime-Gap-Balanced-Subarrays/Solution.go b/leetcode/3501-3600/3589.Count-Prime-Gap-Balanced-Subarrays/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3589.Count-Prime-Gap-Balanced-Subarrays/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3589.Count-Prime-Gap-Balanced-Subarrays/Solution_test.go b/leetcode/3501-3600/3589.Count-Prime-Gap-Balanced-Subarrays/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3589.Count-Prime-Gap-Balanced-Subarrays/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3590.Kth-Smallest-Path-XOR-Sum/README.md b/leetcode/3501-3600/3590.Kth-Smallest-Path-XOR-Sum/README.md new file mode 100755 index 000000000..d87a03c74 --- /dev/null +++ b/leetcode/3501-3600/3590.Kth-Smallest-Path-XOR-Sum/README.md @@ -0,0 +1,32 @@ +# [3590.Kth Smallest Path XOR Sum][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Kth Smallest Path XOR Sum +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/kth-smallest-path-xor-sum/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3590.Kth-Smallest-Path-XOR-Sum/Solution.go b/leetcode/3501-3600/3590.Kth-Smallest-Path-XOR-Sum/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3590.Kth-Smallest-Path-XOR-Sum/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3590.Kth-Smallest-Path-XOR-Sum/Solution_test.go b/leetcode/3501-3600/3590.Kth-Smallest-Path-XOR-Sum/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3590.Kth-Smallest-Path-XOR-Sum/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3591.Check-if-Any-Element-Has-Prime-Frequency/README.md b/leetcode/3501-3600/3591.Check-if-Any-Element-Has-Prime-Frequency/README.md new file mode 100755 index 000000000..f600c5863 --- /dev/null +++ b/leetcode/3501-3600/3591.Check-if-Any-Element-Has-Prime-Frequency/README.md @@ -0,0 +1,32 @@ +# [3591.Check if Any Element Has Prime Frequency][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Check if Any Element Has Prime Frequency +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/check-if-any-element-has-prime-frequency/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3591.Check-if-Any-Element-Has-Prime-Frequency/Solution.go b/leetcode/3501-3600/3591.Check-if-Any-Element-Has-Prime-Frequency/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3591.Check-if-Any-Element-Has-Prime-Frequency/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3591.Check-if-Any-Element-Has-Prime-Frequency/Solution_test.go b/leetcode/3501-3600/3591.Check-if-Any-Element-Has-Prime-Frequency/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3591.Check-if-Any-Element-Has-Prime-Frequency/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3592.Inverse-Coin-Change/README.md b/leetcode/3501-3600/3592.Inverse-Coin-Change/README.md new file mode 100755 index 000000000..eb270b0df --- /dev/null +++ b/leetcode/3501-3600/3592.Inverse-Coin-Change/README.md @@ -0,0 +1,32 @@ +# [3592.Inverse Coin Change][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Inverse Coin Change +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/inverse-coin-change/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3592.Inverse-Coin-Change/Solution.go b/leetcode/3501-3600/3592.Inverse-Coin-Change/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3592.Inverse-Coin-Change/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3592.Inverse-Coin-Change/Solution_test.go b/leetcode/3501-3600/3592.Inverse-Coin-Change/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3592.Inverse-Coin-Change/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3593.Minimum-Increments-to-Equalize-Leaf-Paths/README.md b/leetcode/3501-3600/3593.Minimum-Increments-to-Equalize-Leaf-Paths/README.md new file mode 100755 index 000000000..f5e67600f --- /dev/null +++ b/leetcode/3501-3600/3593.Minimum-Increments-to-Equalize-Leaf-Paths/README.md @@ -0,0 +1,32 @@ +# [3593.Minimum Increments to Equalize Leaf Paths][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Minimum Increments to Equalize Leaf Paths +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/minimum-increments-to-equalize-leaf-paths/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3593.Minimum-Increments-to-Equalize-Leaf-Paths/Solution.go b/leetcode/3501-3600/3593.Minimum-Increments-to-Equalize-Leaf-Paths/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3593.Minimum-Increments-to-Equalize-Leaf-Paths/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3593.Minimum-Increments-to-Equalize-Leaf-Paths/Solution_test.go b/leetcode/3501-3600/3593.Minimum-Increments-to-Equalize-Leaf-Paths/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3593.Minimum-Increments-to-Equalize-Leaf-Paths/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3594.Minimum-Time-to-Transport-All-Individuals/README.md b/leetcode/3501-3600/3594.Minimum-Time-to-Transport-All-Individuals/README.md new file mode 100755 index 000000000..520679e58 --- /dev/null +++ b/leetcode/3501-3600/3594.Minimum-Time-to-Transport-All-Individuals/README.md @@ -0,0 +1,32 @@ +# [3594.Minimum Time to Transport All Individuals][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Minimum Time to Transport All Individuals +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/minimum-time-to-transport-all-individuals/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3594.Minimum-Time-to-Transport-All-Individuals/Solution.go b/leetcode/3501-3600/3594.Minimum-Time-to-Transport-All-Individuals/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3594.Minimum-Time-to-Transport-All-Individuals/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3594.Minimum-Time-to-Transport-All-Individuals/Solution_test.go b/leetcode/3501-3600/3594.Minimum-Time-to-Transport-All-Individuals/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3594.Minimum-Time-to-Transport-All-Individuals/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3597.Partition-String-/README.md b/leetcode/3501-3600/3597.Partition-String-/README.md new file mode 100755 index 000000000..9cb204090 --- /dev/null +++ b/leetcode/3501-3600/3597.Partition-String-/README.md @@ -0,0 +1,32 @@ +# [3597.Partition String ][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Partition String +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/partition-string/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3597.Partition-String-/Solution.go b/leetcode/3501-3600/3597.Partition-String-/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3597.Partition-String-/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3597.Partition-String-/Solution_test.go b/leetcode/3501-3600/3597.Partition-String-/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3597.Partition-String-/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3598.Longest-Common-Prefix-Between-Adjacent-Strings-After-Removals/README.md b/leetcode/3501-3600/3598.Longest-Common-Prefix-Between-Adjacent-Strings-After-Removals/README.md new file mode 100755 index 000000000..29f015a18 --- /dev/null +++ b/leetcode/3501-3600/3598.Longest-Common-Prefix-Between-Adjacent-Strings-After-Removals/README.md @@ -0,0 +1,32 @@ +# [3598.Longest Common Prefix Between Adjacent Strings After Removals][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Longest Common Prefix Between Adjacent Strings After Removals +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/longest-common-prefix-between-adjacent-strings-after-removals/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3598.Longest-Common-Prefix-Between-Adjacent-Strings-After-Removals/Solution.go b/leetcode/3501-3600/3598.Longest-Common-Prefix-Between-Adjacent-Strings-After-Removals/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3598.Longest-Common-Prefix-Between-Adjacent-Strings-After-Removals/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3598.Longest-Common-Prefix-Between-Adjacent-Strings-After-Removals/Solution_test.go b/leetcode/3501-3600/3598.Longest-Common-Prefix-Between-Adjacent-Strings-After-Removals/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3598.Longest-Common-Prefix-Between-Adjacent-Strings-After-Removals/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3599.Partition-Array-to-Minimize-XOR/README.md b/leetcode/3501-3600/3599.Partition-Array-to-Minimize-XOR/README.md new file mode 100755 index 000000000..89dd17e60 --- /dev/null +++ b/leetcode/3501-3600/3599.Partition-Array-to-Minimize-XOR/README.md @@ -0,0 +1,32 @@ +# [3599.Partition Array to Minimize XOR][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Partition Array to Minimize XOR +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/partition-array-to-minimize-xor/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3599.Partition-Array-to-Minimize-XOR/Solution.go b/leetcode/3501-3600/3599.Partition-Array-to-Minimize-XOR/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3599.Partition-Array-to-Minimize-XOR/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3599.Partition-Array-to-Minimize-XOR/Solution_test.go b/leetcode/3501-3600/3599.Partition-Array-to-Minimize-XOR/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3599.Partition-Array-to-Minimize-XOR/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +} diff --git a/leetcode/3501-3600/3600.Maximize-Spanning-Tree-Stability-with-Upgrades/README.md b/leetcode/3501-3600/3600.Maximize-Spanning-Tree-Stability-with-Upgrades/README.md new file mode 100755 index 000000000..f7a70f256 --- /dev/null +++ b/leetcode/3501-3600/3600.Maximize-Spanning-Tree-Stability-with-Upgrades/README.md @@ -0,0 +1,32 @@ +# [3600.Maximize Spanning Tree Stability with Upgrades][title] + +> [!WARNING|style:flat] +> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm) + +## Description + +**Example 1:** + +``` +Input: a = "11", b = "1" +Output: "100" +``` + +## 题意 +> ... + +## 题解 + +### 思路1 +> ... +Maximize Spanning Tree Stability with Upgrades +```go +``` + + +## 结语 + +如果你同我一样热爱数据结构、算法、LeetCode,可以关注我 GitHub 上的 LeetCode 题解:[awesome-golang-algorithm][me] + +[title]: https://leetcode.com/problems/maximize-spanning-tree-stability-with-upgrades/ +[me]: https://github.com/kylesliu/awesome-golang-algorithm diff --git a/leetcode/3501-3600/3600.Maximize-Spanning-Tree-Stability-with-Upgrades/Solution.go b/leetcode/3501-3600/3600.Maximize-Spanning-Tree-Stability-with-Upgrades/Solution.go new file mode 100644 index 000000000..d115ccf5e --- /dev/null +++ b/leetcode/3501-3600/3600.Maximize-Spanning-Tree-Stability-with-Upgrades/Solution.go @@ -0,0 +1,5 @@ +package Solution + +func Solution(x bool) bool { + return x +} diff --git a/leetcode/3501-3600/3600.Maximize-Spanning-Tree-Stability-with-Upgrades/Solution_test.go b/leetcode/3501-3600/3600.Maximize-Spanning-Tree-Stability-with-Upgrades/Solution_test.go new file mode 100644 index 000000000..14ff50eb4 --- /dev/null +++ b/leetcode/3501-3600/3600.Maximize-Spanning-Tree-Stability-with-Upgrades/Solution_test.go @@ -0,0 +1,39 @@ +package Solution + +import ( + "reflect" + "strconv" + "testing" +) + +func TestSolution(t *testing.T) { + // 测试用例 + cases := []struct { + name string + inputs bool + expect bool + }{ + {"TestCase", true, true}, + {"TestCase", true, true}, + {"TestCase", false, false}, + } + + // 开始测试 + for i, c := range cases { + t.Run(c.name+" "+strconv.Itoa(i), func(t *testing.T) { + got := Solution(c.inputs) + if !reflect.DeepEqual(got, c.expect) { + t.Fatalf("expected: %v, but got: %v, with inputs: %v", + c.expect, got, c.inputs) + } + }) + } +} + +// 压力测试 +func BenchmarkSolution(b *testing.B) { +} + +// 使用案列 +func ExampleSolution() { +}