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

LeetCode 6008. 统计包含给定前缀的字符串 更多...

class  Solution
 

函数

 TEST (counting_words_with_a_given_prefix, case1)
 
 TEST (counting_words_with_a_given_prefix, case2)
 

详细描述

LeetCode 6008. 统计包含给定前缀的字符串

函数说明

◆ TEST() [1/2]

leetcode::counting_words_with_a_given_prefix::TEST ( counting_words_with_a_given_prefix  ,
case1   
)

在文件 leetcode_test.cpp1779 行定义.

1779 {
1780 vector<string> input = {"pay", "attention", "practice", "attend"};
1781 ASSERT_EQ(2, Solution::prefixCount(input, "at"));
1782 }

引用了 leetcode::counting_words_with_a_given_prefix::Solution::prefixCount().

◆ TEST() [2/2]

leetcode::counting_words_with_a_given_prefix::TEST ( counting_words_with_a_given_prefix  ,
case2   
)

在文件 leetcode_test.cpp1784 行定义.

1784 {
1785 vector<string> input = {"leetcode", "win", "loops", "success"};
1786 ASSERT_EQ(0, Solution::prefixCount(input, "code"));
1787 }

引用了 leetcode::counting_words_with_a_given_prefix::Solution::prefixCount().