in reply to max "value " of an hash

Shouldn't you better ask for the keys of a maximum value?

UPDATE:

Otherwise you can simply invert the hash with reverse to get the one and only corresponding key of a max value.

The "best" solution depends on other criteria like time, memory or code complexity, which can only be specified by you...

Cheers Rolf