about | help | code help+videos | done | prefs |
Write a RECURSIVE method that accepts a string 'str' and another string 'insert'. Your goal is to return a string with all the characters from 'str' but backwards and with the contents of 'insert' inserted between each letter. Look at the test data for examples. For this problem you can use any or all of the .length, .substring, .charAt String methods but no other String methods. You may NOT use arrays, ArrayList, List, or any other similar structure. Your soluiton MUST be recursive! may12_2017_APSLHL_backwardsInsert("you", "<->") → "u<->o<->y" may12_2017_APSLHL_backwardsInsert("abcdefghijklmn", "-") → "n-m-l-k-j-i-h-g-f-e-d-c-b-a" may12_2017_APSLHL_backwardsInsert("run for the hills", "X") → "sXlXlXiXhX XeXhXtX XrXoXfX XnXuXr" ...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: 405
Copyright Nick Parlante 2017 - privacy