Sparse Arrays

  • + 0 comments

    C# Code

    public static List matchingStrings(List strings, List queries) { var resultList = new List();

        foreach(string queryItem in queries)
        {
            resultList.Add(strings.Count(e => e == queryItem));
        }
    
        return resultList;
    }