The approach is simply a sliding window approach. Keep 2 hashmaps and one hashmap will always be a hashmap of the sliding window substring and the other hashmap would be a constant hashmap of the string whose anagram is supposed to be found out(in our case p)