about | help | code help+videos | done | prefs |
Write a method that accepts a non-negative integer length called 'howMany' and two characters. Return a string array with howMany copies of the first character followed by howMany copies of the second character. Look at the test data for examples. sep9_2016_SLHL_copyChars(3, "a", "b") → ["a", "a", "a", "b", "b", "b"] sep9_2016_SLHL_copyChars(1, "6", "q") → ["6", "q"] sep9_2016_SLHL_copyChars(2, "h", "w") → ["h", "h", "w", "w"] ...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