PUZZLE TIME how would you implement in ruby a method that takes ["a", "b", "a", "c", "c"] and returns {"a" => 2, "b" => 1, "c" => 2} ?
-
-
Replying to @Carols10cents
@Carols10cents ``` def some_method(hash) {"a" => 2, "b" => 1, "c" => 2} end ``` I bet it fails your _next_ test though. :P1 reply 0 retweets 1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.