about | help | code help+videos | done | prefs |
apcsaListIncreasingStrings
Given a String with at least 1 character, return an ArrayList of Strings made from successive characters of the String, such that each element of the ArrayList has one more character than its index value. In other words the first element at index 0 of the returned ArrayList contains just one character of the input, the next element has the next two characters, the next element has the next three characters and so on. Process only until you do not have enough remaining characters to build the next String - this means that in many cases the returned String values will not contain all characters from the input. apcsaListIncreasingStrings("abc") → ["a", "bc"] apcsaListIncreasingStrings("abcd") → ["a", "bc"] apcsaListIncreasingStrings("abcde") → ["a", "bc"] ...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: 240
Copyright Nick Parlante 2017 - privacy