阅读背景:

在C/ c++中使用任何子字符串的顺序查找字符串内部的子字符串

来源:互联网 

Suppose I have a string "abcdpqrs", now "dcb" can be counted as a substring of above string as the characters are together. Also "pdq" is a part of above string. But "bcpq" is not. I hope you got what I want. Is there any efficient way to do this. All I can think is taking help of hash to do this. But it is taking long time even in O(n) program as backtracking is required in many cases. Any help will be appreciated.Suppose I have a string "abcdpqrs", now "dcb" c




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: