I have got a lot of TLE while trying to solve this problem. After trying for a certain period I came up with a HIGHLY modified brute force algorithm to solve this problem. I saw this thread's discussion about the KMP algorithm & tried to learn it. The problem is I don't know how to use this KMP ...