B
Bart Braem
A very simple question: what's the best way to get the maximum value of a
hash? Currently I have something like:
max = 0
hash.each_value do |value|
if (value > max )
max = value
end
end
But it does not feel ruby... Same question for sum, but I guess the answer
will be similar?
Bart
hash? Currently I have something like:
max = 0
hash.each_value do |value|
if (value > max )
max = value
end
end
But it does not feel ruby... Same question for sum, but I guess the answer
will be similar?
Bart