cplusplus-_Implementation_Of_Introduction_to_Algorithms
cplusplus-_Implementation_Of_Introduction_to_Algorithms copied to clipboard
判断字符串有效后缀,增加判断避免访问越界
有限自动机字符串匹配算法中判断字符串后缀,若输入的子串长度大于字符串长度,迭代器从后向前访问发生越界。
编译的debug版本在 TEST(MatchTest,test_is_end_with) 用例中,a = 2,k = 2,q = 0 时, Assertion failed: cannot seek vector iterator before begin