Kotlin HashMap maxWith()
Syntax & Examples
Syntax of HashMap.maxWith()
The syntax of HashMap.maxWith() extension function is:
fun <K, V> Map<out K, V>.maxWith( comparator: Comparator<in Entry<K, V>> ): Entry<K, V>
This maxWith() extension function of HashMap returns the first entry having the largest value according to the provided comparator.