Files
LeetCode-Go/leetcode/0792.Number-of-Matching-Subsequences/792. Number of Matching Subsequences_test.go
2021-06-24 02:13:06 +08:00

44 lines
678 B
Go

package leetcode
import (
"fmt"
"testing"
)
type question792 struct {
para792
ans792
}
// para 是参数
// one 代表第一个参数
type para792 struct {
s string
words []string
}
// ans 是答案
// one 代表第一个答案
type ans792 struct {
one int
}
func Test_Problem792(t *testing.T) {
qs := []question792{
{
para792{"abcde", []string{"a", "bb", "acd", "ace"}},
ans792{3},
},
}
fmt.Printf("------------------------Leetcode Problem 792------------------------\n")
for _, q := range qs {
_, p := q.ans792, q.para792
fmt.Printf("【input】:%v 【output】:%v\n", p, numMatchingSubseq(p.s, p.words))
}
fmt.Printf("\n\n\n")
}