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 ...
// Given two strings s1 and s2, return true if s2 contains a permutation of s1, or false otherwise. // In other words, return true if one of s1's permutations is the substring of s2.