about | help | code help+videos | done | prefs |
Write a method called replaceEvery2ndString, which is given three Strings as input parameters. The method should return the first String which was passed to the method with every second occurrence of the second String replaced in the first String with the third String. For example replaceEvery2ndString("Mississippi", "iss", "3") would return "Miss3ippi". replaceEvery2ndString("Mississippi", "iss", "3") → "Miss3ippi" replaceEvery2ndString("Honolulu", "o", "O") → "HonOlulu" replaceEvery2ndString("banana", "a", "ii") → "baniina" ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 200
Copyright Nick Parlante 2017 - privacy