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

  1. 至多包含 K 个不同字符的最长子串
更多...

class  Solution
 

函数

 TEST (longest_substring_with_at_most_k_distinct_characters, case1)
 
 TEST (longest_substring_with_at_most_k_distinct_characters, case2)
 

详细描述

  1. 至多包含 K 个不同字符的最长子串

函数说明

◆ TEST() [1/2]

leetcode::longest_substring_with_at_most_k_distinct_characters::TEST ( longest_substring_with_at_most_k_distinct_characters  ,
case1   
)

在文件 leetcode_test.cpp3646 行定义.

3646 {
3647 ASSERT_EQ(3, Solution::lengthOfLongestSubstringKDistinct("eceba", 2));
3648 }

引用了 leetcode::longest_substring_with_at_most_k_distinct_characters::Solution::lengthOfLongestSubstringKDistinct().

◆ TEST() [2/2]

leetcode::longest_substring_with_at_most_k_distinct_characters::TEST ( longest_substring_with_at_most_k_distinct_characters  ,
case2   
)

在文件 leetcode_test.cpp3650 行定义.

3650 {
3651 ASSERT_EQ(2, Solution::lengthOfLongestSubstringKDistinct("aa", 1));
3652 }

引用了 leetcode::longest_substring_with_at_most_k_distinct_characters::Solution::lengthOfLongestSubstringKDistinct().