Add solution 0792

This commit is contained in:
YDZ
2021-06-22 21:21:21 +08:00
parent 578c85e416
commit 014e437944
25 changed files with 1408 additions and 683 deletions

View File

@ -0,0 +1,43 @@
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")
}