about | help | code help+videos | done | prefs |
Write a method that accepts a string 'str' and another string 'add'. Return a copy of 'str' but with 'add' inserted between each successive letter such that the number of copies between each successive letter continues to increase by one each time. For example, if 'str' is "Summer" and 'add' is "^*" you would return "S^*u^*^*m^*^*^*m^*^*^*^*e^*^*^*^*^*r" quiz2023_05_31_SL_addString("Summer", "^*") → "S^*u^*^*m^*^*^*m^*^*^*^*e^*^*^*^*^*r" quiz2023_05_31_SL_addString("abcdefg", "V") → "aVbVVcVVVdVVVVeVVVVVfVVVVVVg" quiz2023_05_31_SL_addString("437", "01") → "401301017" ...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: 220
Copyright Nick Parlante 2017 - privacy