Question: Write a static method String removal(String str, String removal ), No Arrays/ArrayList for this method Remove all occurrences of the removal string from the original
Write a static method String removal(String str, String removal ), No Arrays/ArrayList for this method
Remove all occurrences of the removal string from the original string. Each time you take out the removal string you must also remove the letter that preceded the removal string. After you remove a string and its leading character, you must check to see if any more occurrences of the removal string exist
Example::
xR-MxR-MHelloxR-M - String to remove R-M
Output: Hello
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
