Question: String start _ word is read from input. In scramble _ word ( ) , complete the recursive case to perform the following tasks for
String startword is read from input. In scrambleword complete the recursive case to perform the following tasks for each letter at index i in rletters:
Create a new string that contains all the letters of rletters except the letter at index i
Create a second new string that contains all the letters in sletters with the letter at index i added at the end of the string.
Recursively call scrambleword with the two newly created strings as the arguments.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
