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

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

class  Solution
 

函数

 TEST (longest_substring_with_at_most_two_distinct_characters, case1)
 
 TEST (longest_substring_with_at_most_two_distinct_characters, case2)
 

详细描述

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

函数说明

◆ TEST() [1/2]

leetcode::longest_substring_with_at_most_two_distinct_characters::TEST ( longest_substring_with_at_most_two_distinct_characters  ,
case1   
)

在文件 leetcode_test.cpp3636 行定义.

3636 {
3637 ASSERT_EQ(3, Solution::lengthOfLongestSubstringTwoDistinct("eceba"));
3638 }

引用了 leetcode::longest_substring_with_at_most_two_distinct_characters::Solution::lengthOfLongestSubstringTwoDistinct().

◆ TEST() [2/2]

leetcode::longest_substring_with_at_most_two_distinct_characters::TEST ( longest_substring_with_at_most_two_distinct_characters  ,
case2   
)

在文件 leetcode_test.cpp3640 行定义.

3640 {
3641 ASSERT_EQ(5, Solution::lengthOfLongestSubstringTwoDistinct("ccaabbb"));
3642 }

引用了 leetcode::longest_substring_with_at_most_two_distinct_characters::Solution::lengthOfLongestSubstringTwoDistinct().