Solved using AI. Python version I had solved myself. Slide pattern over text. At every new character, remove the old character which is now out of sliding window and add the new character. After ...