Home > Back-end >  Give a string of a string, at least can add a few characters as a cycle
Give a string of a string, at least can add a few characters as a cycle

Time:10-24

http://acm.hdu.edu.cn/showproblem.php? Pid=3746
Hangzhou electric oj on this topic is behind the given string add character as a cycle, with KMP can solve,
And if there is no requirement to add the location of the string at least add number?
Abcb, for example, in the final add is need to 4, and so the ABC b (a) (c), just two, please help!

CodePudding user response:

No limit, if add character position to exist within the search string is repetitive patterns, if you have, will make the fullest use of these repetitive patterns, to reduce the number of characters that are inserted
  • Related