You are viewing a single comment's thread. Return to all comments →
public static List<Integer> matchingStrings(List<String> stringList, List<String> queries) { List<Integer> results = new ArrayList<>(); for (String query: queries) { results.add(Collections.frequency(stringList, query)); } return results; }
}
Seems like cookies are disabled on this browser, please enable them to open this website
An unexpected error occurred. Please try reloading the page. If problem persists, please contact support@hackerrank.com
Sparse Arrays
You are viewing a single comment's thread. Return to all comments →
}