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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!