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

 

amjadm@miamioh.edu > pushRight
prev  |  next  |  chance

Given a string of positive digits, right shift the digits n times. e.g. if the given str is "1010101010", and n = 6, the result should be "0000001010". n is always within the range.


pushRight("111", 1) → "011"
pushRight("1", 1) → "0"
pushRight("100", 1) → "010"

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

public String pushRight(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: 130

Copyright Nick Parlante 2017 - privacy