logo CodeStepByStep logo

MoveToEnd

Language/Type: C# recursion string return
Related Links:

Write a recursive method named MoveToEnd that accepts a string s and a character c as parameters, and returns a new string similar to s but with all instances of c moved to the end of the string. The relative order of the other characters should be unchanged from their order in the original string s. If the character is a letter of the alphabet, all occurrences of that letter in either upper or lowercase should be moved to the end and converted to uppercase. If s does not contain c, it should be returned unmodified.

Method: Write a C# method as described, not a complete program or class.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.