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

 

pais@kinetigram.com strings01 > S114_repeatEnd
prev  |  next  |  chance

APCS String 1, Problem 14. Given a string and an int N, return a string made of N repetitions of the last N characters of the string. You may assume that N is between 0 and the length of the string, inclusive.


S114_repeatEnd("Hello", 3) → "llollollo"
S114_repeatEnd("Hello", 2) → "lolo"
S114_repeatEnd("Hello", 1) → "o"

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

public String S114_repeatEnd(String str, 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: 100

Copyright Nick Parlante 2017 - privacy