about | help | code help+videos | done | prefs |
Write a RECURSIVE method that determines if it is possible to construct a string of a given length 'targetLength' by concatenating selected strings from an array of strings. If it is possible, return 'true' otherwise return 'false'. Your solution MUST be recursive, although you MAY also use a loop as long as you are not using it to SOLVE the actual problem. I highly recommend using a helper method! apr_9_2019_HL_recursiveStringLength(["this is a long string", "not as long as this one though", "some strings are longer than others and this one is really long"], 21) → true apr_9_2019_HL_recursiveStringLength([], 5) → false apr_9_2019_HL_recursiveStringLength([], 0) → true ...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: 450
Copyright Nick Parlante 2017 - privacy