You are viewing a single comment's thread. Return to all comments →
Kotlin Solution
fun sockMerchant(n: Int, ar: Array<Int>): Int { var numberOfPairs = 0 ar.groupBy { it }.forEach { numberOfPairs += it.value.size / 2 } return numberOfPairs }
Seems like cookies are disabled on this browser, please enable them to open this website
Sales by Match
You are viewing a single comment's thread. Return to all comments →
Kotlin Solution