Given a string s and a non-empty string p, find all the start indices of p's anagrams in s. Strings consists of lowercase English letters only and the length of both strings s and pwill not be larger than 20,100. The order of output does not matter.…
public class Solution {;public IList<int> FindAnagrams(string s, string p) { List<int> list = new List<int>(); || p == ) return list; ]; //character hash //record each character in p to hash foreach (char c in p) { hash[c]++; } //two poi…