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

  1. Find All Anagrams in a String
更多...

class  Solution
 

函数

 TEST (find_all_anagrams_in_a_string, case1)
 
 TEST (find_all_anagrams_in_a_string, case2)
 

详细描述

  1. Find All Anagrams in a String

函数说明

◆ TEST() [1/2]

leetcode::find_all_anagrams_in_a_string::TEST ( find_all_anagrams_in_a_string  ,
case1   
)

在文件 leetcode_test.cpp2901 行定义.

2901 {
2902 const string s = "cbaebabacd";
2903 const string p = "abc";
2904 const vector expected = {0, 6};
2905 ASSERT_EQ(expected, Solution::findAnagrams(s, p));
2906 }

引用了 leetcode::find_all_anagrams_in_a_string::Solution::findAnagrams().

◆ TEST() [2/2]

leetcode::find_all_anagrams_in_a_string::TEST ( find_all_anagrams_in_a_string  ,
case2   
)

在文件 leetcode_test.cpp2908 行定义.

2908 {
2909 const string s = "abab";
2910 const string p = "ab";
2911 const vector expected = {0, 1, 2};
2912 ASSERT_EQ(expected, Solution::findAnagrams(s, p));
2913 }

引用了 leetcode::find_all_anagrams_in_a_string::Solution::findAnagrams().