about | help | code help+videos | done | prefs |
makeWords
Recursively create a list of all possible words of size 'remaining' using the provided alphabet. (Due to codingbat limitations, all the letters are numbers) Since coding bat only checks returned values, you must always return the list. The base case should add the word to the provided list of words, and return that list. After all recursive cases complete, you should return the list as well. makeWords(1, "", "123", []) → [1, 2, 3] makeWords(2, "", "12", []) → [11, 12, 21, 22] makeWords(2, "", "75", []) → [77, 75, 57, 55] ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy