You are viewing a single comment's thread. Return to all comments →
Did something very similar in swift: func matchingStrings(strings: [String], queries: [String]) -> [Int] {
let arrayMatching: [Int] = queries.compactMap({ let query = $0 return strings.filter({$0 == query}).count }) return arrayMatching
}
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 →
Did something very similar in swift: func matchingStrings(strings: [String], queries: [String]) -> [Int] {
}