Find All Anagrams in a String
MediumGiven strings s and p, print every start index where a substring of s is an anagram of p.
Input format:
- First line: s
- Second line: p
Print indices in increasing order on one line separated by spaces. Print `EMPTY` if there are none.
Constraints
1 <= p.length <= s.length <= 2 * 10^5 Strings contain lowercase English letters.