about | help | code help+videos | done | prefs |
repeatMe
Given a String and and an integer n, return a string with the first letter appearing n times, the second repeating n-1 times, and so on, but make sure each character appears at least once. (Credit to Abby) repeatMe("dog", 4) → "ddddooogg" repeatMe("Tower", 3) → "TTToower" repeatMe("Yay", 6) → "YYYYYYaaaaayyyy" ...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