Return the start indices (in increasing order) of every substring of s that is a rearrangement (anagram) of p. For s = "cbaebabacd" and p = "abc" the answer is [0, 6].
Example 1
Input:
find_anagrams('cbaebabacd', 'abc')
Output:
[0, 6]
Example 2
Input:
find_anagrams('abab', 'ab')
Output:
[0, 1, 2]
0 <= len(p) <= 1000000 <= len(s) <= 200000p has no matches.No results yet
Run your code to check it against the examples, or submit to run every test.