Posts
Largest Value Nested Hash
I came across this question on the Ruby Reddit the other day:
How do I select the largest key: value pair in a nested hash?
The problem specifies a hash of data, which I’ll include in full in the gist containing my solution. Omitting data we don’t care about, and removing repetitions, the hash is structured like this:
game_hash = { home: { players: { player1: { shoe_size: 16, rebounds: 12, .