fvasco / jug-2017-07

6 stars 4 forks source link

ruby version #4

Closed gicappa closed 7 years ago

gicappa commented 7 years ago

Loving the ruby simplicity and readability.

fvasco commented 7 years ago

Do you miss the occurrences map?

gicappa commented 7 years ago

The map was there the output transformation map was in the wrong line. I really don't love temp variables 😄 Fixed

fvasco commented 7 years ago

Sorry, if I understand well then the map is of type <int, list<int>>, the requirements is a <int, int> map where the key is number and the value is occurrence.

So the last line will be:

puts occurrences.map {|k, v| "#{k}=#{v}"}
gicappa commented 7 years ago

Done.

Suggestion: given the growing number of contributions, in the readme you could explain better the requirements on how to contribute (variables expected, type and other details).

Thanks

fvasco commented 7 years ago

Nice suggestion, I'll do it.