about | help | code help+videos | done | prefs |
Write a method that accepts two strings as input parameters then returns an "interlaced" combination of the two strings. What that means is that a character is taken from str1, then a character from str2. This continues until there are no more characters left in whichever string is shorter. Note that either string could be the shorter one. Also note that you may only use the following string methods: .length, .charAt, .substring, .equals, and .compareTo may_14_2019_APSLHL_interlace("Computer", "Programming") → "CPormopgurtaemrm" may_14_2019_APSLHL_interlace("StarWars", "Dr.Who") → "SDtra.rWWhao" may_14_2019_APSLHL_interlace("INTERLACED", "strings") → "IsNtTrEiRnLgAs" ...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: 290
Copyright Nick Parlante 2017 - privacy