Find All Anagrams — slide a fixed window
A window the size of the pattern moves one character at a time. Whenever the window's letters are a rearrangement of the pattern, record its start index.
Try:
← Prev
Next →
▶ Play
Reset
s
start indices found