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

class  Solution
 

函数

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

函数说明

◆ TEST() [1/4]

leetcode::hand_of_straights::TEST ( hand_of_straights  ,
case1   
)

在文件 leetcode_test.cpp147 行定义.

147 {
148 int input[] = {1, 2, 3, 6, 2, 3, 4, 7, 8};
149 auto vec = vector(begin(input), end(input));
150 ASSERT_TRUE(Solution::isNStraightHand(vec, 3));
151 }
int vec[100010]
Definition: pat.cpp:5095

引用了 leetcode::hand_of_straights::Solution::isNStraightHand() , 以及 pat::a::a7_2::vec.

◆ TEST() [2/4]

leetcode::hand_of_straights::TEST ( hand_of_straights  ,
case2   
)

在文件 leetcode_test.cpp153 行定义.

153 {
154 int input[] = {1, 2, 3, 4, 5};
155 auto vec = vector(begin(input), end(input));
156 ASSERT_FALSE(Solution::isNStraightHand(vec, 4));
157 }

引用了 leetcode::hand_of_straights::Solution::isNStraightHand() , 以及 pat::a::a7_2::vec.

◆ TEST() [3/4]

leetcode::hand_of_straights::TEST ( hand_of_straights  ,
case3   
)

在文件 leetcode_test.cpp159 行定义.

159 {
160 int input[] = {1, 2, 3, 4, 5, 6};
161 auto vec = vector(begin(input), end(input));
162 ASSERT_TRUE(Solution::isNStraightHand(vec, 2));
163 }

引用了 leetcode::hand_of_straights::Solution::isNStraightHand() , 以及 pat::a::a7_2::vec.

◆ TEST() [4/4]

leetcode::hand_of_straights::TEST ( hand_of_straights  ,
case4   
)

在文件 leetcode_test.cpp165 行定义.

165 {
166 int input[] = {
167 9, 13, 15, 23, 22, 25, 4, 4, 29, 15, 8, 23, 12, 19, 24, 17, 18, 11, 22, 24, 17, 17, 10, 23,
168 21, 18, 14, 18, 7, 6, 3, 6, 19, 11, 16, 11, 12, 13, 8, 26, 17, 20, 13, 19, 22, 21, 27, 9, 20,
169 15, 20, 27, 8, 13, 25, 23, 22, 15, 9, 14, 20, 10, 6, 5, 14, 12, 7, 16, 21, 18, 21, 24, 23,
170 10, 21, 16, 18, 16, 18, 5, 20, 19, 20, 10, 14, 26, 2, 9, 19, 12, 28, 17, 5, 7, 25, 22, 16,
171 17, 21, 11};
172 auto vec = vector(begin(input), end(input));
173 ASSERT_FALSE(Solution::isNStraightHand(vec, 10));
174 }

引用了 leetcode::hand_of_straights::Solution::isNStraightHand() , 以及 pat::a::a7_2::vec.