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

 

zbaharav@kehillah.org 30-nestedloops > repeatMe0
prev  |  next  |  chance

Given a String and two integers, m and n, return a String where each of the first m letters is repeated n times.


repeatMe0("abc", 2, 3) → "aaabbb"
repeatMe0("abc", 3, 2) → "aabbcc"
repeatMe0("a", 1, 5) → "aaaaa"

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

public String repeatMe0(String str, int m, int n) { }

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

Copyright Nick Parlante 2017 - privacy