about | help | code help+videos | done | prefs |
switchXwithNext
Given a string, switch every "x" with the letter following it. You are guaranteed that "x" is not the last letter, and that there are no consecutive "x"s. There might be multiple occurrences of x in the String. switchXwithNext("axb") → "abx" switchXwithNext("xabc") → "axbc" switchXwithNext("axbxcxd") → "abxcxdx" ...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: 100
Copyright Nick Parlante 2017 - privacy