about | help | code help+videos | done | prefs |
Write a method that accepts a string 'str' and an integer 'copies' parameter. Use that string to construct a new string with 'copies' number of occurances of each character from the original 'str' string. For example, using "ace" for the string and 3 for 'copies' you would return "aaaccceee". For additional examples, look at the test data. Recursion is NOT required for this problem. vpeepsMakeString("Jump", 5) → "JJJJJuuuuummmmmppppp" vpeepsMakeString("xj97", 2) → "xxjj9977" vpeepsMakeString("", 5) → "" ...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: 250
Copyright Nick Parlante 2017 - privacy