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

 

String-2 > repeatSeparator
prev  |  next  |  chance

Given two strings, word and a separator sep, return a big string made of count occurrences of the word, separated by the separator string.


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

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

public String 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: 236.0

Copyright Nick Parlante 2017 - privacy