1. Add solution 1091、1614、1619、1624、1629、1636、1704

2. ctl strings.TrimSpace question.Title
This commit is contained in:
YDZ
2021-02-14 12:30:19 +08:00
parent af41c91d60
commit 14d0942f5a
57 changed files with 2046 additions and 271 deletions

View File

@ -5,48 +5,48 @@ import (
"testing"
)
type question1690 struct {
para1690
ans1690
type question1696 struct {
para1696
ans1696
}
// para 是参数
// one 代表第一个参数
type para1690 struct {
type para1696 struct {
nums []int
k int
}
// ans 是答案
// one 代表第一个答案
type ans1690 struct {
type ans1696 struct {
one int
}
func Test_Problem1690(t *testing.T) {
func Test_Problem1696(t *testing.T) {
qs := []question1690{
// {
// para1690{[]int{1, -1, -2, 4, -7, 3}, 2},
// ans1690{7},
// },
// {
// para1690{[]int{10, -5, -2, 4, 0, 3}, 3},
// ans1690{17},
// },
qs := []question1696{
{
para1690{[]int{1, -5, -20, 4, -1, 3, -6, -3}, 2},
ans1690{0},
para1696{[]int{1, -1, -2, 4, -7, 3}, 2},
ans1696{7},
},
{
para1696{[]int{10, -5, -2, 4, 0, 3}, 3},
ans1696{17},
},
{
para1696{[]int{1, -5, -20, 4, -1, 3, -6, -3}, 2},
ans1696{0},
},
}
fmt.Printf("------------------------Leetcode Problem 1690------------------------\n")
fmt.Printf("------------------------Leetcode Problem 1696------------------------\n")
for _, q := range qs {
_, p := q.ans1690, q.para1690
_, p := q.ans1696, q.para1696
fmt.Printf("【input】:%v 【output】:%v\n", p, maxResult(p.nums, p.k))
}
fmt.Printf("\n\n\n")