Add solution 0791

This commit is contained in:
YDZ
2021-07-13 21:21:21 +08:00
parent 41b03831b3
commit eda4953c3d
7 changed files with 180 additions and 5 deletions

View File

@ -0,0 +1,43 @@
package leetcode
import (
"fmt"
"testing"
)
type question791 struct {
para791
ans791
}
// para 是参数
// one 代表第一个参数
type para791 struct {
order string
str string
}
// ans 是答案
// one 代表第一个答案
type ans791 struct {
one string
}
func Test_Problem791(t *testing.T) {
qs := []question791{
{
para791{"cba", "abcd"},
ans791{"cbad"},
},
}
fmt.Printf("------------------------Leetcode Problem 791------------------------\n")
for _, q := range qs {
_, p := q.ans791, q.para791
fmt.Printf("【input】:%v 【output】:%v\n", p, customSortString(p.order, p.str))
}
fmt.Printf("\n\n\n")
}