Files
LeetCode-Go/leetcode/0064.Minimum-Path-Sum/64. Minimum Path Sum_test.go
2020-08-27 00:58:22 +08:00

47 lines
649 B
Go

package leetcode
import (
"fmt"
"testing"
)
type question64 struct {
para64
ans64
}
// para 是参数
// one 代表第一个参数
type para64 struct {
og [][]int
}
// ans 是答案
// one 代表第一个答案
type ans64 struct {
one int
}
func Test_Problem64(t *testing.T) {
qs := []question64{
{
para64{[][]int{
{1, 3, 1},
{1, 5, 1},
{4, 2, 1},
}},
ans64{7},
},
}
fmt.Printf("------------------------Leetcode Problem 64------------------------\n")
for _, q := range qs {
_, p := q.ans64, q.para64
fmt.Printf("【input】:%v 【output】:%v\n", p, minPathSum(p.og))
}
fmt.Printf("\n\n\n")
}