mirror of
https://github.com/halfrost/LeetCode-Go.git
synced 2025-07-28 22:51:54 +08:00
添加 18 题
This commit is contained in:
46
leetcode/1037.Valid-Boomerang/1037. Valid Boomerang_test.go
Normal file
46
leetcode/1037.Valid-Boomerang/1037. Valid Boomerang_test.go
Normal file
@ -0,0 +1,46 @@
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
)
|
||||
|
||||
type question1037 struct {
|
||||
para1037
|
||||
ans1037
|
||||
}
|
||||
|
||||
// para 是参数
|
||||
// one 代表第一个参数
|
||||
type para1037 struct {
|
||||
one [][]int
|
||||
}
|
||||
|
||||
// ans 是答案
|
||||
// one 代表第一个答案
|
||||
type ans1037 struct {
|
||||
one bool
|
||||
}
|
||||
|
||||
func Test_Problem1037(t *testing.T) {
|
||||
|
||||
qs := []question1037{
|
||||
question1037{
|
||||
para1037{[][]int{[]int{1, 2}, []int{2, 3}, []int{3, 2}}},
|
||||
ans1037{true},
|
||||
},
|
||||
|
||||
question1037{
|
||||
para1037{[][]int{[]int{1, 1}, []int{2, 2}, []int{3, 3}}},
|
||||
ans1037{false},
|
||||
},
|
||||
}
|
||||
|
||||
fmt.Printf("------------------------Leetcode Problem 1037------------------------\n")
|
||||
|
||||
for _, q := range qs {
|
||||
_, p := q.ans1037, q.para1037
|
||||
fmt.Printf("【input】:%v 【output】:%v\n", p, isBoomerang(p.one))
|
||||
}
|
||||
fmt.Printf("\n\n\n")
|
||||
}
|
Reference in New Issue
Block a user