Question: in ruby, Write a method clever_char that accepts a string as an argument, the method should return array containging the characters of the string that
in ruby,
Write a method clever_char that accepts a string as an argument, the method should return array containging the characters of the string that appeared more than twice. the characters in returned array may be in any order.
clever_char("that's alright folks') #["t"]
clever_char("mississippi") # ["i", "s"]
clever_char("hot potato soup please") # ["o", "t", "" , "p"]
clever_char("runtime") # []
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
