Skip to content

Instantly share code, notes, and snippets.

View caroltr's full-sized avatar

Caroline Ribeiro caroltr

View GitHub Profile
@caroltr
caroltr / Extensions.kt
Last active May 4, 2020 02:05
Kotlin Word Count Challenge
fun Map<String, Int>.orderDescendingByValue(): Map<String, Int> {
return this.toList().sortedByDescending { it.second }.toMap()
}