首页 > 代码库 > LeetCode "459. Repeated Substring Pattern"

LeetCode "459. Repeated Substring Pattern"

Brutal force works - and a smarter way is to utilize KMP. The most popular two solutions are essentially the same - one is obvious KMP, and another one is https://discuss.leetcode.com/topic/68206/easy-python-solution-with-explaination , which simplifies the code a lot - bravo!

LeetCode "459. Repeated Substring Pattern"