随笔分类 - KMP
摘要:Given a string s, you are allowed to convert it to a palindrome by adding characters in front of it. Find and return the shortest palindrome you can f
阅读全文
摘要:The key of Kmp is to build a look up table that records the match result of prefix and postfix. Value in the table means the max len of matching subst
阅读全文