• + 1 comment

    Agree. not sure what this "medium" difficulty quesion is aiming at.

    Shorter description: Given an array of strings FOO and a an array of strings BAR find the count of string in BAR that occurs in FOO.

    C#. Linq is your friend.

    var results = new int[queries.Length];

            var index = 0;
    
            foreach (string s in queries)
            {
                 results[index++] = strings.Where(i => i == s).Count();
            }
    
            return results;