You are viewing a single comment's thread. Return to all comments →
public static List<Integer> matchingStrings(List<String> strings, List<String> queries) { int count; List<Integer> results = new ArrayList<Integer>(); for (String str : queries) { count = 0; for (String s : strings) { if (str.equals(s)) { count++; } } results.add(count); } return results; }
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 →