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

 

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

Write a method that returns a string 'str' with a character 'ltr' "interlaced" within the characters of 'str'. Look at the test data for examples. As a precondition, you may assume that 'str' will have at least two characters.


quiz2020_12_15_APP1SLHL_interlaceChar("slash", "/") → "s/l/a/s/h"
quiz2020_12_15_APP1SLHL_interlaceChar("Win!", "=") → "W=i=n=!"
quiz2020_12_15_APP1SLHL_interlaceChar("Spring is not too far away", "$") → "S$p$r$i$n$g$ $i$s$ $n$o$t$ $t$o$o$ $f$a$r$ $a$w$a$y"

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

public String quiz2020_12_15_APP1SLHL_interlaceChar(String str, char ltr) { }

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: 230

Copyright Nick Parlante 2017 - privacy