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

 

pais@kinetigram.com > S24_repeatSeparator
prev  |  next  |  chance

APCS String 2, Problem 4. Given two strings, word and a separator, return a big string made of count occurrences of the word, separated by the separator string.


S24_repeatSeparator("Word", "X", 3) → "WordXWordXWord"
S24_repeatSeparator("This", "And", 2) → "ThisAndThis"
S24_repeatSeparator("This", "And", 1) → "This"

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

public String S24_repeatSeparator(String word, String sep, int count) { }

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

Copyright Nick Parlante 2017 - privacy