problemscpp
A collection of my answers to algorithm problems in c++.
| 函数
leetcode::maximum_nesting_depth_of_the_parentheses 命名空间参考

LeetCode 1614. 括号的最大嵌套深度 更多...

class  Solution
 

函数

 TEST (maximum_nesting_depth_of_the_parentheses, case1)
 
 TEST (maximum_nesting_depth_of_the_parentheses, case2)
 
 TEST (maximum_nesting_depth_of_the_parentheses, case3)
 
 TEST (maximum_nesting_depth_of_the_parentheses, case4)
 

详细描述

LeetCode 1614. 括号的最大嵌套深度

函数说明

◆ TEST() [1/4]

leetcode::maximum_nesting_depth_of_the_parentheses::TEST ( maximum_nesting_depth_of_the_parentheses  ,
case1   
)

在文件 leetcode_test.cpp345 行定义.

345 {
346 ASSERT_EQ(3, Solution::maxDepth("(1+(2*3)+((8)/4))+1"));
347 }

引用了 leetcode::maximum_nesting_depth_of_the_parentheses::Solution::maxDepth().

◆ TEST() [2/4]

leetcode::maximum_nesting_depth_of_the_parentheses::TEST ( maximum_nesting_depth_of_the_parentheses  ,
case2   
)

在文件 leetcode_test.cpp349 行定义.

349 {
350 ASSERT_EQ(3, Solution::maxDepth("(1)+((2))+(((3)))"));
351 }

引用了 leetcode::maximum_nesting_depth_of_the_parentheses::Solution::maxDepth().

◆ TEST() [3/4]

leetcode::maximum_nesting_depth_of_the_parentheses::TEST ( maximum_nesting_depth_of_the_parentheses  ,
case3   
)

在文件 leetcode_test.cpp353 行定义.

353 {
354 ASSERT_EQ(1, Solution::maxDepth("1+(2*3)/(2-1)"));
355 }

引用了 leetcode::maximum_nesting_depth_of_the_parentheses::Solution::maxDepth().

◆ TEST() [4/4]

leetcode::maximum_nesting_depth_of_the_parentheses::TEST ( maximum_nesting_depth_of_the_parentheses  ,
case4   
)

在文件 leetcode_test.cpp357 行定义.

357 {
358 ASSERT_EQ(0, Solution::maxDepth("1"));
359 }

引用了 leetcode::maximum_nesting_depth_of_the_parentheses::Solution::maxDepth().