Files
LeetCode-Go/leetcode/1614.Maximum-Nesting-Depth-of-the-Parentheses/1614. Maximum Nesting Depth of the Parentheses_test.go
YDZ 14d0942f5a 1. Add solution 1091、1614、1619、1624、1629、1636、1704
2. ctl strings.TrimSpace question.Title
2021-02-15 11:37:57 +08:00

58 lines
793 B
Go

package leetcode
import (
"fmt"
"testing"
)
type question1614 struct {
para1614
ans1614
}
// para 是参数
// one 代表第一个参数
type para1614 struct {
p string
}
// ans 是答案
// one 代表第一个答案
type ans1614 struct {
one int
}
func Test_Problem1614(t *testing.T) {
qs := []question1614{
{
para1614{"(1+(2*3)+((8)/4))+1"},
ans1614{3},
},
{
para1614{"(1)+((2))+(((3)))"},
ans1614{3},
},
{
para1614{"1+(2*3)/(2-1)"},
ans1614{1},
},
{
para1614{"1"},
ans1614{0},
},
}
fmt.Printf("------------------------Leetcode Problem 1614------------------------\n")
for _, q := range qs {
_, p := q.ans1614, q.para1614
fmt.Printf("【input】:%v 【output】:%v \n", p, maxDepth(p.p))
}
fmt.Printf("\n\n\n")
}