Coding
Count Anagrammatic Substrings
Count the number of anagrammatic substrings from one string present in another.
Input: s = "abab", p = "ab"
Output: [0, 1, 2]
Explanation: The substrings "ab", "ba", and "ab" starting at indices 0, 1, and 2 respectively are all anagrams of the string "ab".
Was asked at