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

  1. 为运算表达式设计优先级
更多...

class  Solution
 

函数

 TEST (different_ways_to_add_parentheses, case1)
 
 TEST (different_ways_to_add_parentheses, case2)
 

详细描述

  1. 为运算表达式设计优先级

函数说明

◆ TEST() [1/2]

leetcode::different_ways_to_add_parentheses::TEST ( different_ways_to_add_parentheses  ,
case1   
)

在文件 leetcode_test.cpp3915 行定义.

3915 {
3916 const vector ans = {0, 2};
3917 ASSERT_EQ(ans, Solution::diffWaysToCompute("2-1-1"));
3918 }

引用了 leetcode::different_ways_to_add_parentheses::Solution::diffWaysToCompute().

◆ TEST() [2/2]

leetcode::different_ways_to_add_parentheses::TEST ( different_ways_to_add_parentheses  ,
case2   
)

在文件 leetcode_test.cpp3920 行定义.

3920 {
3921 const vector ans = {-34, -14, -10, -10, 10};
3922 ASSERT_EQ(ans, Solution::diffWaysToCompute("2*3-4*5"));
3923 }

引用了 leetcode::different_ways_to_add_parentheses::Solution::diffWaysToCompute().