You are viewing a single comment's thread. Return to all comments →
` public static List matchingStrings(List stringList, List queries) { List ans = new ArrayList<>();
queries.forEach(query -> { Long count = stringList.stream().filter(ele -> ele.equals(query)).count(); ans.add(count.intValue()); }); return ans; }
`
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 →
` public static List matchingStrings(List stringList, List queries) { List ans = new ArrayList<>();
`