I have seen a similar post here here which is giving a single key-value pair which has maximum value in the entire Map.
But I would like to get List of pairs which has m
Using map.filter(_._2 == map.values.max) will do the trick.
map.filter(_._2 == map.values.max)
val maxValue = map.values.max map.filter(_._2 == maxValue).toList