add: leetcode 396 test

This commit is contained in:
Don2025
2022-07-06 15:14:10 +08:00
parent 0ecc089e36
commit e85bad3027

View File

@ -0,0 +1,46 @@
package leetcode
import (
"fmt"
"testing"
)
type question396 struct {
para396
ans396
}
// para 是参数
// one 代表第一个参数
type para396 struct {
one []int
}
// ans 是答案
// one 代表第一个答案
type ans396 struct {
one int
}
func Test_Problem396(t *testing.T) {
qs := []question396{
{
para396{[]int{4, 3, 2, 6}},
ans396{26},
},
{
para396{[]int{100}},
ans396{0},
},
}
fmt.Printf("------------------------Leetcode Problem 396------------------------\n")
for _, q := range qs {
_, p := q.ans396, q.para396
fmt.Printf("【input】:%v 【output】:%v\n", p, maxRotateFunction(p.one))
}
fmt.Printf("\n\n\n")
}