Closed gicappa closed 7 years ago
Do you miss the occurrences
map?
The map was there the output transformation map was in the wrong line. I really don't love temp variables 😄 Fixed
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}"}
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
Nice suggestion, I'll do it.
Loving the ruby simplicity and readability.