You are viewing a single comment's thread. Return to all comments →
Here's how we can do it in c#
public static List matchingStrings(List stringList, List queries) { List totalCount = new List();
foreach(var query in queries){ int count = 0; for(int i = 0; i < stringList.Count; i++){ if(query == stringList[i]){ count++; } } totalCount.Add(count); } return totalCount; }
Seems like cookies are disabled on this browser, please enable them to open this website
Sparse Arrays
You are viewing a single comment's thread. Return to all comments →
Here's how we can do it in c#
public static List matchingStrings(List stringList, List queries) { List totalCount = new List();