0

Consider I have a map with Key-Value pairs, e. g:

{
    "foo": 1,
    "bar": 2,
    "yes": 4,
}

Lets say the map can hold over 1000 objects, and is unsorted. What would be the most efficient way to calculate the median of the values and as a result return the key to the median value?

Cerbrus
  • 70,800
  • 18
  • 132
  • 147

0 Answers0