Question: String Challenge Have the function stringchallenge (stz) take the str parameter being passed and return the first word with the greatest number of repeated letters.

 String Challenge Have the function stringchallenge (stz) take the str parameter

String Challenge Have the function stringchallenge (stz) take the str parameter being passed and return the first word with the greatest number of repeated letters. For example: "Today, is the greatest day ever!" should return greatest because it has 2 e's (and 2 t's) and it comes before ever which also has 2e 's. If there are no words with repeating letters return - 1. Words will be separated by spaces. Examples Input: "Hello apple pie" Output: Hello Input: "No words" Output: 1

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!