You are viewing a single comment's thread. Return to all comments →
fun matchingStrings(strings: Array<String>, queries: Array<String>): Array<Int> { val resultArray = Array(queries.size){0} queries.forEachIndexed { index, element -> resultArray[index] = strings.count { it == element } } return resultArray }
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 →