Suppose I have this hash
{ 1 => 4 , 2 => 3 , 4 => 1}
Now I want to make a loop where I can find any value which is greater then 3.
I know with hash.values?3 I can find the pairs has a value of 3.
But how can I find all the values which are greater of equal as 3.
Roelof
Edit 1 :
I try to make this pseudo code at work in ruby.
while there are sets of 3 ones:
remove the set from the hash (h[1] -= 3)
sum 1000 to the score
end
Use
#selectmethod: