Anagram Substring Search (Or Search for all permutations)
Given a text txt and a pattern pat of size n and m respectively, the task is to find all occurrences of pat and its permutations (or anagrams) in txt. You may assume n > m. Examples: Input: txt = "BACDGABCDA", pat = "ABCD"Output: [0, 5, 6]Explanation: "BACD" is at 0, "ABCD" at 5 and "BCDA" at 6In