id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

jebbert@volusia.k12.fl.us > mar5_2020_APP1SLHL_interlace
prev  |  next  |  chance

Write a method that returns a string that interlaces the characters from the two input strings. For example, strings "AWESOME" and "good" when interlaced become "AgWoEoSd". Notice that some of the characters in the longer string are omitted. Look at the test data for further examples.


mar5_2020_APP1SLHL_interlace("Kunleneedstoslowdown", "Kunleisawesomeatsolvingmytestquestions") → "KKuunnlleenieseadwsetsoosmleoawtdsoowlnv"
mar5_2020_APP1SLHL_interlace("xyz", "123") → "x1y2z3"
mar5_2020_APP1SLHL_interlace("Cold", "Florida") → "CFollodr"

...Save, Compile, Run (ctrl-enter)

public String mar5_2020_APP1SLHL_interlace(String a, String b) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 290

Copyright Nick Parlante 2017 - privacy