Question: String input _ word is read from input. In scramble _ letters ( ) , complete the recursive case to perform the following tasks for

String input_word is read from input. In scramble_letters(), complete the recursive case to perform the following tasks for each letter at index i in remaining_letters:
Create a new string that contains all the letters of remaining_letters except the letter at index i.
Create a second new string that contains all the letters in used_letters with the letter at index i added at the end of the string.
Recursively call scramble_letters() with the two newly created strings and count as the arguments. Assign count with the value returned by scramble_letters().

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 Programming Questions!